Here is what I want to do to help with Neanderthals, and also lay some other foundations. Treat this as a proposal for comment. It's not hard to do (like a day's work):
Introduce a new XML file Civ4UnitSpawnInfo.xml, which defines directly-spawning (as in not built in cities) units and how they spawn. An example info would look something like this:
Code:
<UnitSpawnInfo>
<Type>UNIT_SPAWN_NEANDERTHAL</Type>
<UnitType>UNIT_NEANDERTHAL</UnitType>
<StartYear>-11500</StartYear>
<EndYear>-5000</EndYear>
<SpawnBonuses>
<BonusType>BONUS_NEANDERTHAL_CAVE</BonusType>
</SpawnBonuses>
<SpawnRate>10</SpawnRate>
<MaxPopulationDensity>10</MaxPopulationDensity>
</UnitSpawnInfo>
Each <SpawnInfo> in the file defines the way one type of unit spawns during a particular timeframe (you can have multiple spawn infos for the same unit type if you want, for instance to modify the spawn rate over time).
Tags operate as follows:
Type - unique id for this spawn info
UnitType - the type of unit which will spawn from processing this spawn info
StartYear - first game year the spawn starts operating (could use eras but I wanted finer control)
EndYear - when it stops operating
SpawnBonuses - list of the bonus types from which the spawn occurs. Spawns may happen on any such bonus in neutral territory if it is not occupied (even if visible, else it's too easy to stop them all)
SpawnRate - average number of turns between spawns for any given bonus plot
MaxPopulationDensity - number of tiles/per this unit type in the local area after which the spawn will be inhibitted
The advantages of doing this in the DLL and controlling it through XML are:
- XML modding is easier so it'll be easier for modders to fiddle with and make new uses of
- DLL based code is higher performance so it will impose less overheads than doing it in Python
- It's a generic system that can be used for a number of purposes. Obviously Neanderthals, but also potentially animals, or future alien menaces
Obviously this could just spawn Neanderthals from existing bonuses, but I'd quite like to see a Neanderthal Cave bonus added anyway. It could allow buildings (Neanderthal embassy obviously) for cities that have it as a vicinity bonus, but also have continued use after Neanderthal spawns have stopped - e.g. - archaelogical dig building, that requires a neranderthal cave in the vicinity and yields a science boost.
I won't jump into this if those that would be likely to make use of it (DH primarily I would think, Hydro maybe) don't think it's a good idea, but I repeat - it's very easy to do.
Opinions...?