Ability Category 26: Unit Spawning

From AGEWiki

Jump to: navigation, search

This ability kind allows elements to create others elements, depending of certain circumstances.

The appliance level is always 'Self'.

These custom parameters apply:

  • Param 0: reference to a unit UID to create
  • Param1: weighted probability to create such unit
  • Param 2: reference to a unit UID to create
  • Param3: weighted probability to create such unit
  • Param 4: reference to a unit UID to create
  • Param5: weighted probability to create such unit
    • Weighted means that if UID 1 has 20% chance to happen, UID2 has 30% to happen and UID3 has 0% chance, then there is a 50% chance to have a unit creation, and then in 40% of the case it will be with UID1.
  • Param 6 ' ModPerOffspring':change to probability per offspring ELEMENT alive (generally a penalty, but can be 'fun' if positive!). Emphasis on per element, because the code tracks for each spawned element who is his parent, and for each parent the number of live offsprings.
  • Param 7 ' OnlyBesieging': No element can be created if the parent element is not besieging.
  • Param 8 ' OpenTerrainMod': If the terrain is flagged as 'open', then this modified is applied to the dice roll (of each possible category, i.e UID1 , UID2, UID3)
  • Param 9 ' WildTerrainMod': If the terrain is flagged as 'wild', then this modified is applied to the dice roll (of each possible category, i.e UID1 , UID2, UID3).
    • Warning, 'Wild' here is a static terrain flag and is not related to the dynamic value 'civilization level', check the terrain DB. For example Desert is in many games both an open and a wild terrain, whereas all forests are only wild.
  • LstParam0: a list of valid terrain where spawning can happens can be indicated.


Destruction of spawned elements

New attributes can be added to models, that will allow the element to be destroyed, if it is a spawn and something happened:

*SpawnKillNoParent* : if the parent is dead, the offspring dies.
*SpawnKillNoRegion*: if the parent is dead or not in the region of the offspring, it dies.
*SpawnKillNoBesiege*: if the element is not besieging, it is destroyed.


Examples and ideas

In an ancient era game, it can be possible to have Roman Legions create one siege train each (and only one) if they besiege a structure, provided the terrain is not without trees. The Siege train would disappear when the legion moves away or the siege ends.

In a 'hide&seek' game, it is possible to have a partisan cell with extremely high hide value, create mobile partisans units, but only if in mountains or wild terrains. The partisan cell can be calibrated to be able to control at most 5 partisans bands.

Forums