DoGyAUT / cd

Crystallized Doom a mod for OpenRA
20 stars 2 forks source link

There's no naming convention used in the weapon YAML entries. #148

Open GraionDilach opened 7 years ago

GraionDilach commented 7 years ago

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.

trempler commented 7 years ago

I agree. Sadly I do stuff like that from time to time too, depends on cofveve level.

GraionDilach commented 7 years ago

Your new PR is also a great offender with your Explo... entries, so yes, this should really be decided ASAP.

jrb0001 commented 7 years ago

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.

trempler commented 7 years ago
  1. Yeah will follow that rule now. Wroted it down on my commit list.

  2. Not sure if we should do that right now, for later you get my go. ( Adding/Removing Weapons is not done yet )

ZxGanon commented 7 years ago

So for Overseer it would be CabalBulletInfantry?

jrb0001 commented 7 years ago

The weapon of the overseer would be CabalBulletInfantryOverseer because the husk has a similar weapon too which would then be CabalBulletInfantryHusk.

CDVoidwalker commented 7 years ago

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

trempler commented 7 years ago

good point @Voidwalker 👍

jrb0001 commented 7 years ago

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:

GraionDilach commented 7 years ago

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.

jrb0001 commented 7 years ago

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.

GraionDilach commented 7 years ago

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.