Open GraionDilach opened 7 years ago
I agree. Sadly I do stuff like that from time to time too, depends on cofveve level.
Your new PR is also a great offender with your Explo... entries, so yes, this should really be decided ASAP.
I suggest using CapitalCase where each capital letter starts a a new level in a hierarchy. The first level should be the faction name or "Generic" while the second level should be the weapon type (Missile, Laser). The third level could be the target class (Air, Vehicle) and the fourth level could be the unit (if needed). Special cases (death animations, repairing) should follow that rule as long as that makes sense: CabalExplosionBuildingSmall
as an example.
We should also split the weapons into multiple files and maybe directories and group them by their name hierarchy.
Yeah will follow that rule now. Wroted it down on my commit list.
Not sure if we should do that right now, for later you get my go. ( Adding/Removing Weapons is not done yet )
So for Overseer it would be CabalBulletInfantry?
The weapon of the overseer would be CabalBulletInfantryOverseer
because the husk has a similar weapon too which would then be CabalBulletInfantryHusk
.
Agree with the above, but what about upgrades? Currently having upgrade.tibgas
is rather bad. I'd go for Nod.Upgrade.Tibgas
or something similar as we have millions of upgrades for forgotten and others
good point @Voidwalker 👍
Oh, that's something I didn't think about. I think it would make sense to use that as the fifth level (or fourth if the unit name part is missing) to get something like NodFlameDevilstongueBlueflame
. Another special case are multi step weapons (fire) where we should simply add the step number at the end.
Maybe we should be a bit more flexible with leaving out levels in case they not needed. But the order should be defined and my proposal is:
Generic
I am :-1:ing @jrb0001's proposal, because it's overkill and I would assume that the faction prefix is unnecessary. I'd write the unit first (or generic) then the weapon class and use separate files for separate factions.
One file per faction is not enough because we already have that and some files are >1k lines which makes it slow to find stuff. I can also live with unit first, then weapon class, then upgrade, then step number if that is more popular.
Then have one file for each faction's class (aircraft, infantry, vehicles (ships separated if that happens), and buildings), say cabal-infantry.yaml, with entries having unitname-weapontype-upgrade-stepnumber convention.
That would make it consistent with the rules yamls if the order of the actors between the two are kept.
There should be a guideline for setting up the names, because things like OverseerGun (using CapitalCase which IMO is good and readable) and cleansingaura (using lowercase which I find less so, it took me minutes to even realize it's about a cleansing-aura) doesn't look good when mixed.