primordial stew
Emperor
Yeah, it's an expansion of what Edgecrusher started rather than the original post which is only about capping growth. Exporting excess is the next step though. If iMaxPlayerInstances can be changed in python then I'm pretty sure it can all be done in python. The hard part is the mutex buildings since there's no native support in XML, but if choices are limited by techs (mutex techs could be handled in python), then a working system can be created.
Limiting city size is almost trivial, just override onCityGrowth to set pop = pop -1 if ( pop > maxPop). Where maxPop = 3 + functionCallWhichFindsCottagesEtcInCityRadius(). This will likely stall the AI, but maybe giving a very high GROWTH flavor for cottages would be enough?
I suppose we'd have to check every turn in case the cottage/etc.. got destroyed (and the people were living there), so it would go into onBeginPlayerTurn maybe instead of just checking on growth.
Limiting city size is almost trivial, just override onCityGrowth to set pop = pop -1 if ( pop > maxPop). Where maxPop = 3 + functionCallWhichFindsCottagesEtcInCityRadius(). This will likely stall the AI, but maybe giving a very high GROWTH flavor for cottages would be enough?
I suppose we'd have to check every turn in case the cottage/etc.. got destroyed (and the people were living there), so it would go into onBeginPlayerTurn maybe instead of just checking on growth.