Minor questions connected to your dopersecution code:
1;
#determine the target religion, if not supplied by the popup decision
if not iReligion:
for iReligion in con.tPersecutionOrder[iStateReligion]:
here you loop through the religions' order in the consts.py based on the statereligion
but what happens if the AI civ doesn't have a state religion?
or the AI will never persecute without a state religion?
2;
you use the pCity.getReligionCount() function
AFAIK it was exposed to python, and RFCE already uses the function in a couple places (in c++ at least)
why is it needed then to add these lines in cycity.cpp?
// edead: start
int CyCity::getReligionCount()
{
return m_pCity ? m_pCity->getReligionCount() : -1;
}
// edead: end
3;
you added the new AttitudeExtra diplomacy modifier
(IIRC I already asked this earlier, but didn't found your answer)
Is it possible to add memory decays to this attitude too?
Is it possible to lose the attitude modifier when the other civ switches from that state religion?
4;
# chance to work: 50-75 based on piety
iChance = 50 + max(25, pPlayer.getFaith()/2)
I think you made a typo here
Didn't you want to add min(25, pPlayer.getFaith()/2) ?
5;
Another possible mistake here
Your code:
# kill / expel some population
if pCity.getPopulation() > 3:
pCity.changePopulation(-1)
elif pCity.getPopulation() > 9:
pCity.changePopulation(-2)
elif pCity.getPopulation() > 14:
pCity.changePopulation(-3)
Shouldn't it be this?
# kill / expel some population
if city.getPopulation() > 14:
city.changePopulation(-3)
elif city.getPopulation() > 9:
city.changePopulation(-2)
elif city.getPopulation() > 3:
city.changePopulation(-1)
I'm not sure, you may have it intentionally that way
I just wanted to mention, that currently your code always kills only one population (if it's at least 4 of course)