How to port your A24 mod to A25

This lists (most) of the template-changing commits, and how to fix them. And also some other breaking changes.

Other notes

  • The gamesetup has been partly reworked - mods that rework it majorly should expect needing to update. See details at r25077, r25096, r25099 and r25101
  • UnitAI has been seriously cleaned, the actions are performed using their respective components now.
  • The ProductionQueue code has been cleaned a bit.
  • The way mirages are handled has changed. If you want a component to be miraged, add the respective component to cmpFogging and add the correct functions to the component (see r25089).
  • GarrisonHolder has been seriously cleaned.
  • The Attacking-helper has been renamed to AttackHelper.


In UnitAI, the NaturalBehaviour of animals was deprecated in favour of more options for Stances. As a consequense of significant changes in UnitAI for animals (they can behave more like other units now), animals now need vision range to attack and chase.


In Garrisonable, a Size now needs to be specified.


In ResourceSupply, there is now an option for timers, hence Amount is changed to Max (with a possibility for Initial). One can use find . -type f | xargs sed -i 's/Amount>/Max>/g' to fix their templates.


Treasures now have their rewards in a separate component. So instead of:


one should now write:


(yes, this means one can reward multiple resources with one treasure). Also the people gathering those treasures don't need a rate in their ResourceGatherer component anymore, but they have a separate component as well :)


Notice here that rate was previously unused for treasures and there is no such entry now.


The elephant_stables was renamed to elephant_stable. Some templates need to be moved around, but e.g. maps and referencing templates can be fixed using: find . -type f | xargs sed -i 's/elephant_stables/elephant_stable/g'


DisabledTemplates, DisabledTechnologies, StartingTechnologies have been removed from map script settings. Instead, you should use triggers to mimic this behaviour. See the commit for examples.


The functions to mirage are now stored in their respective components, meaning mods that introduce a component (and want it miraged) should add the functions there. Also, mods modifying components need to include the mirage functions there from unmodded 0 A.D.


Turret points -- a.k.a. visible garrison points -- are now internally fully separated from a garrison holder. This means that e.g. walls do not need the GarrisonHolder component anymore. This also means that the aura for entities on walls is now a different type: turretedUnits instead of garrisonedUnits (the latter only affects entities which are inside the holder). Entities which you'd like to be able to be turreted need a new component now <Turretable/> in their templates.


The 'Builder' class is used for entities that can build structure, instead of assuming the 'Worker' class implies it.


With the use of the same schema for all attack types, Slaughter attack now needs an repeat time.


Calling trigger actions now expect 'On[triggerName]' like RegisterTrigger. This changes nothing for maps, but component mods may need updating.

Last modified 6 months ago Last modified on May 19, 2021, 5:17:17 PM
Note: See TracWiki for help on using the wiki.