Reproduced your crash. The reason is that the barbarians have 8191 units, and that's the limit - it crashes when they try to create their 8192nd! Underlying this is that something strange must have happened to the animals and Neanderthal spawning in that game -the entire world is literally crawling with them.
I could up the limit, but at the cost of more memory usage and some performance penalty, but I think that misses the point. 8192 barbarian units in play on turn 485 seems a bit crazy, even with raging Barbs.
Having found that out I have now looked at the spawn code and the spawn definitiosn and I see several errors:
- The code that AIAndy added for totalAreaDensity is broken and the net effect is to use the total area density number as the LOCAL density, which means the Neanderthal spawns will keep pumping out Neanderthals as long as there is less than 1 per 10 tiles around the spawn points, irrespective of the total numbe in the wider area
- The specified local density in the Neanderthal spawn info seems wrong (and would result in too FEW Neanderthlas), but this isn't having any effect anyway due to (1)
- The spawn rates from iTurns and iGlobalTurns are addative, so if both are used you're effectively getting the sum of the rates from using one or the other. Currently the Neanderthal spawns use both - this is fine but the numbers likely need to be toned down
- The third wave is specified as spawning Neanderthals from any forest tile, but it doesn't have any lower a per-tile rate than the bonus-restricted waves!! In your game this means each of 1624 tiles can spawn a Neadnerthal with a probability (after game speed adjustments) of about 1 in 40 from wave 3 - so over 40 per turn
I will fix (1), and leave Eldrin (who tuned the XML) to retune it.
@Eldrin - iMaxLocalDensity is currently set to 48 (so max of 1 in 48 tiles locally) and almost certainly needs to be lower (else no spawns will occur if more than 1 Neanderthal already exists within 3 tiles of the spawn point). Wave 3 almost certainly needs MUCH increased iTurns (since the contribution from iTurns dominates totally with a large number of possible spawn points, over that from iGlobalTurns which adjusts for the number of spawn points)
If you care enough to want desperately to rescue this game you can probably get away with changing the global define in xml/assets/A_New_Dawn_GlobalDefines.xml as follows:
Code:
<Define>
<DefineName>NEANDERTHAL_SPAWN_MODIFIER</DefineName>
<iDefineIntVal>1</iDefineIntVal>
</Define>
Changing this value from 100 (the default) to 1 will cut Neanderthals spawns down 100 times (0 should turn it off but its bugged currently, which I'll also fix). That will PROBABLY allow the natural death rate to prevent the limit being hit in your current game, though obviously the save is already very close to it.