Just pushed to SVN the new XML-mediated spawn mechanism. Right now all that uses it is the Neanderthals (and I have removed the Python that used to do this), and their spawn is governed by the XML in assets/modules/Custom Units/Neanderthal/NeanderthalCiv4SpawnInfos.xml.
This defines three separate spawn waves which run layered on top of one another at different dates. The effect is a lowish base spawn rate between 11000BC and 5000BC, increasing between 10000BC and 7000BC, and peaking between 9000BC and 8000BC, the idea being to give you a while to ready yourself before the worst.
Below is the XML for the base wave, with a detailed explanation following:
Code:
<SpawnInfo>
<Type>SPAWN_NEANDERTHAL_BASE</Type>
<UnitType>UNIT_NEANDERTHAL</UnitType>
<iTurns>15</iTurns>
<iMaxLocalDensity>5</iMaxLocalDensity>
<iStartDate>-11500</iStartDate>
<iEndDate>-5000</iEndDate>
<bTreatAsBarbarian>1</bTreatAsBarbarian>
<rateOverrideDefineName>NEANDERTHAL_SPAWN_MODIFIER</rateOverrideDefineName>
<BonusTypes>
<BonusType>BONUS_BISON</BonusType>
<BonusType>BONUS_IVORY</BonusType>
<BonusType>BONUS_DEER</BonusType>
</BonusTypes>
</SpawnInfo>
Type - unique name for this spawn
UnitType - the type of unit it spawns
iTurns - average number of turns between spawns for each possible spawn resource (this is then normalized for game speed, so the number here is for epic, and gets larger with slower game speeds in proportion)
iMaxLocalDensity - number of local tiles per unit already present after which further already present units (of the spawned type) will inhibit the spawn - so this is saying to stop spawning if there is one Neanderthal per 5 tiles locally
iStartDate - start year for this spawn
iEndDate - end year for this spawn (year is self-normalizing to game speed which is why I went that way)
bTreatAsBarbarian - if set to 1, indicates the spawned unit is effectively a barbarian, and hence is turned off by game option NO_BARBARIANS and doubled by RAGING_BARBARIANS
rateOverrideDefineName - name of a global define value which can be used to adjust the spawn rate - it is a percentage and can be any value from 0 upwards (set to 100 in what I have pushed). Higher numbers imply more spawns, with 100 being the pure XML-defined rate - I put this in to give players an easy way to adjust the overall setting
BonusTypes - the bonuses the unit can spawn from. Spawn is inhibitted if the tile containing the bonus is owned or is occupied by a non-barbarian unit