Valkrionn
The Hamster King
THAT would require python.
Should be easy to write a postcombatwon script for the unit, that checks the opponent's unittype, and creates a new unit.

if opponent.getunittype() == gc.getInfoTypeForString('UNIT_SLAVE'):
iUnit = gc.getInfoTypeForString('UNIT_SLAVE_LIBERATED')
newUnit = pPlayer.initUnit(iUnit, unit.getX(), unit.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
You silly people burrying my issues! Let's not forget that!My guess is that FlavourMod creates Brigit and then kills it directly (not doing it led to duplicate brigits) and it upsets UnitStatistics because the brigit killed hadn't been "initialized". Of course, it may be another thing... and if I'm right, I don't get why the error log come so often in game.
No idea how to fix it, though...
0 => 1
1 => 9 (+8)
2 => 21 (+12)
3 => 37 (+16)
[4 => ? (+18 ?)]
To conclude this: A = 2r² + 6r + 1 where A is the number of plots in the city radius and r the city radius.
There is a fairly extensive method for handling city radii in FlavourMod for differently shaped areas. Take a look at the area classes in CvFlavourInterface.py, if you are interested.
I may be mistaken, but from simulation, I found a non polynomial behavior due to rounding. I went up to r=12 and considered the number of tiles whose distance to the center of the city was between r-0.5 and r+0.5
How does the formula consider rounding ?
Rounding? There is no rounding going on here.
I suppose, Im' not getting, what you are trying to accomplish.
for i = -12 to 12
for j = -12 to 12
D = sqrt((i)^2 + (j)^2)
if round(D) <= r then
A = A + 1
Wouldn't it be simpler to write some sort of script to do it all simultaneously? just search for full sets of opening/closing tags of i or b type, with 0 as the only value, and delete them. Isn't that what regex are for?
if (pLoopPlot->getImprovementType() != NO_IMPROVEMENT)
{
if (GC.getImprovementInfo(pLoopPlot->getImprovementType()).getSpawnUnitType() != NO_UNIT)
{
pLoopPlot->setImprovementType(NO_IMPROVEMENT);
}
}