Opened 8 years ago

Closed 6 years ago

#4147 closed defect (fixed)

[PATCH] Classes and VisibleClasses cleanup

Reported by: fatherbushido Owned by: fatherbushido
Priority: Should Have Milestone: Alpha 21
Component: UI & Simulation Keywords: patch simple
Cc: Patch:

Description (last modified by fatherbushido)

Since some releases like r15195, the difference between Classes and VisibleClasses is mainly visual (gui). The aim of the ticket is:

  • update the classes list and add the visualclass list in xml schema help (Identy component)
  • move the classes which should be moved to visibleclasses which (or finish that transition see r15315, r15196)
  • remove useless or duplicate or inconsistencies (and do the ad hoc checks/modifications to the simulation code, the gui code, the ai code).
  • not use adjective light "Heavy" "Light" "Medium" as classes which can be misleading (something can be Light and Medium and Heavy at the same time).

When the ticket was written, we had:

List of Classes Animal, Apadana, ArmyCamp, Ashoka, BarterMarket, BoltShooter, Bow, Camel, Catapult, Celt, Chariot, Citizen, CitizenSoldier, City, CivCentre, Colony, ConquestCritical, Defensive, Domestic, DropsiteFood, DropsiteMetal, DropsiteStone, DropsiteWood, Elephant, Female, Fireship, FishingBoat, ForestPlant, GarrisonFortress, GarrisonTower, Gates, Healer, Heavy, Hero, Human, Human, Iberian, Immortal, Italian, Juggernaut, Kennel, Light, Lighthouse, LongWall, Market, Melee, Mercenary, MercenaryCamp, Naval, Naval, NavalMarket, Organic, Organic, Palace, Palisade, Player, PtolemyIV, Ram, Ranged, SeaCreature, SeaCreature, Shipyard, SiegeTower, SiegeWall, SpecialBuilding, StoneWall, Structure, Support, Syssiton, Theater, Tower, Town, Unit, Warship, Wonder, WoodenTower, Worker

List of VisibleClasses Archer, Barracks, Blacksmith, Camel, Cavalry, Champion, Chariot, Citizen, City, Civic, CivilCentre, Corral, DefenseTower, Defensive, Dock, Dog, Economic, Elephant, Embassy, Farmstead, Field, Fortress, Healer, Hero, House, Infantry, Javelin, Market, Mechanical, Medium, Melee, Mercenary, Military, Outpost, Pike, Ranged, Resource, Ship, Siege, Slave, Sling, Soldier, Spear, Stables, Storehouse, Support, Sword, Temple, Town, Trader, Village, Warship, Worker

Attachments (1)

classescleanup.diff (50.1 KB ) - added by fatherbushido 8 years ago.
thx sanderd17 elexis and s0600204 for the remarks

Download all attachments as: .zip

Change History (14)

comment:1 by fatherbushido, 8 years ago

Description: modified (diff)

comment:2 by fatherbushido, 8 years ago

Here is attached a first cleanup:

  • fixes some inconsistencies: like some stuff wich was in VisibleClasses sometimes and in Classes other times.
  • fixes many identation inconsistencies.
  • removes useless and misleading "Heavy" "Light" "Medium", removes Bow from the bireme (it was useless and only here, perhaps an old artefact), removes Camel from the seleucid archers cavalry as it's not a Camel...
  • adds missing Javelin and Ranged class to the corresponding hero (like for others)
  • Updates the lists in documentaion of the schema.

The current choices i did for VisibleClasses and Classes are not optimal, but that cleanup will provide a good base to start with. Moreover, with the updated documentation, a growing mess will be prevented.

Last edited 8 years ago by fatherbushido (previous) (diff)

comment:3 by fatherbushido, 8 years ago

Keywords: review added
Summary: Classes and VisibleClasses cleanup[PATCH] Classes and VisibleClasses cleanup

comment:4 by fatherbushido, 8 years ago

Keywords: patch added

comment:5 by fatherbushido, 8 years ago

Description: modified (diff)

comment:6 by s0600204, 8 years ago

Is there a reason why female citizens are now classed as Infantry and Soldier?

Also, in the VisibleClasses help attribute,

These classes will also be visible in various GUI elements, if the classes need spaces. Underscores will be replaced with spaces.

would be better as

These classes will also be visible in various GUI elements. If the classes need spaces, underscores will be replaced with spaces.

(Note difference in punctuation.) Not your mistake, but as you're editing the line anyhow...

I note you've modified the indentation of the trained and attack sound groups in template_unit_mechanical_siege_ram.xml. I understand why the change is necessary, but it's still not quite right.

comment:7 by fatherbushido, 8 years ago

thx for noticing that.

by fatherbushido, 8 years ago

Attachment: classescleanup.diff added

thx sanderd17 elexis and s0600204 for the remarks

comment:8 by fatherbushido, 8 years ago

In 18616:

Updates Identity classes and visible classes documentation. Cleans inconsistencies (identation, some classes were sometimes in Classes and other times in VisibleClasses, adds missing class for javelinist cavalry hero, removes Camel classes from traders and seleucid cavalry, removes unused and misleading Light, Medium, Heavy classes). Comments by Sanderd17, elexis and s0600204. Refs #4147

comment:9 by fatherbushido, 8 years ago

Keywords: review removed

comment:10 by fatherbushido, 8 years ago

Description: modified (diff)

The next part of this cleanup could be:

  • do more clever choice of what should and shouldn't be visible (Barracks ? Adapana ? Wonder ? Elephant ? ...)
  • do a deep check of templates (units and structures must have the expected classes)
  • choose to keep or delete some useless classes. For example, i guess Ram should be keep (even if it's not used).

2 & 3 should be done carefully (for example, Petra uses many classes in his code).

Last edited 8 years ago by fatherbushido (previous) (diff)

comment:11 by fatherbushido, 8 years ago

In 18705:

Fixes village, town, city classes inconsistencies in templates. Reported by WarBeast. Refs #4147.

comment:12 by fatherbushido, 8 years ago

Milestone: Alpha 21Backlog

comment:13 by fatherbushido, 6 years ago

Description: modified (diff)
Milestone: BacklogAlpha 21
Resolution: fixed
Status: newclosed

Let's consider that as fixed. Some classes are still useless but could become usefull, so there is no real benefit to remove them.

Note: See TracTickets for help on using tickets.