Bad Player
Deity
Hi, I'm making a scenario using MNAI modmod for FFH2. I added a bunch of python code in CvEventManager (and modified some values in .xml files) so I assume the problem is from something I did since the AI works fine in regular MNAI for FFH2.
I played more than 100 turns and all the AI civs build a settler but keep them in their capital cities. The game speed is normal and the map is large and has plenty of space for the AI to expand.
To prove that the issue isn't an economic one, I gave each AI civ 500 gold at the start of the game and placed a few cottages for each civ (via WB). Still, the AI didn't build additional cities with their settlers.
I wondered if it is perhaps because I started the evil civs at war with the good civs? Or perhaps to do with the python declare war using WARPLAN_TOTAL?
Here is the complete CvEventManager.py code http://pastebin.com/yBWxy5GH
Here is some of my code (from the above link) which might be relevant
I played more than 100 turns and all the AI civs build a settler but keep them in their capital cities. The game speed is normal and the map is large and has plenty of space for the AI to expand.
To prove that the issue isn't an economic one, I gave each AI civ 500 gold at the start of the game and placed a few cottages for each civ (via WB). Still, the AI didn't build additional cities with their settlers.
I wondered if it is perhaps because I started the evil civs at war with the good civs? Or perhaps to do with the python declare war using WARPLAN_TOTAL?

Here is the complete CvEventManager.py code http://pastebin.com/yBWxy5GH
Here is some of my code (from the above link) which might be relevant
Code:
def onGameStart(self, argsList):
'Called at the start of the game'
...
#Find and set the Team (i.e. player) ID numbers for each civ in the game (could be done manually since it is a scenario with fixed civs)
#ID's need to be remembered for the onBeginGameTurn section (so if code is moved away from CvEventManager.py to other files then use pickle + Bugdata to remember it perhaps?)
for iGoodAndEvilPlayer in range(gc.getMAX_PLAYERS()):
pGoodAndEvilPlayer = gc.getPlayer(iGoodAndEvilPlayer)
if pGoodAndEvilPlayer.isAlive():
if pGoodAndEvilPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_BANNOR'):
iBannorTeamID = gc.getPlayer(iGoodAndEvilPlayer).getTeam()
if pGoodAndEvilPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_CALABIM'):
iCalabimTeamID = gc.getPlayer(iGoodAndEvilPlayer).getTeam()
if pGoodAndEvilPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_CLAN_OF_EMBERS'):
iClanOfEmbersTeamID = gc.getPlayer(iGoodAndEvilPlayer).getTeam()
if pGoodAndEvilPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_DOVIELLO'):
iDovielloTeamID = gc.getPlayer(iGoodAndEvilPlayer).getTeam()
if pGoodAndEvilPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_ELOHIM'):
iElohimTeamID = gc.getPlayer(iGoodAndEvilPlayer).getTeam()
if pGoodAndEvilPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_KURIOTATES'):
iKuriotatesTeamID = gc.getPlayer(iGoodAndEvilPlayer).getTeam()
if pGoodAndEvilPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_LJOSALFAR'):
iLjosalfarTeamID = gc.getPlayer(iGoodAndEvilPlayer).getTeam()
if pGoodAndEvilPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_LUCHUIRP'):
iLuchuirpTeamID = gc.getPlayer(iGoodAndEvilPlayer).getTeam()
if pGoodAndEvilPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_SHEAIM'):
iSheaimTeamID = gc.getPlayer(iGoodAndEvilPlayer).getTeam()
if pGoodAndEvilPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_SVARTALFAR'):
iSvartalfarTeamID = gc.getPlayer(iGoodAndEvilPlayer).getTeam()
#Make the good civs at permanent peace with eachother, the evil civs at non-permanent peace with eachother, and the good and evil civs at war
#If the setPermanentWarPeace boolean is True then the civs cannot change their peace or war status. Use declareWar first to keep them at war with the True boolean.
#If the declareWar boolean is True then you get a pop-up message that the civ declares war on you, if it is False then there is no pop-up message
#If the meet boolean is True then you get a pop-up message that you met them for the first time, if it is False then there is no pop-up message
for iWarAndPeaceTeam in range(gc.getMAX_CIV_TEAMS()):
pWarAndPeaceTeam = gc.getTeam(iWarAndPeaceTeam)
if pWarAndPeaceTeam.isAlive():
#Make good civs meet other good civs
if iWarAndPeaceTeam == iBannorTeamID:
pWarAndPeaceTeam.meet(iElohimTeamID, False)
pWarAndPeaceTeam.meet(iKuriotatesTeamID, False)
pWarAndPeaceTeam.meet(iLjosalfarTeamID, False)
pWarAndPeaceTeam.meet(iLuchuirpTeamID, False)
if iWarAndPeaceTeam == iElohimTeamID:
pWarAndPeaceTeam.meet(iKuriotatesTeamID, False)
pWarAndPeaceTeam.meet(iLjosalfarTeamID, False)
pWarAndPeaceTeam.meet(iLuchuirpTeamID, False)
if iWarAndPeaceTeam == iKuriotatesTeamID:
pWarAndPeaceTeam.meet(iLjosalfarTeamID, False)
pWarAndPeaceTeam.meet(iLuchuirpTeamID, False)
if iWarAndPeaceTeam == iLjosalfarTeamID:
pWarAndPeaceTeam.meet(iLuchuirpTeamID, False)
#Make evil civs meet other evil civs
if iWarAndPeaceTeam == iCalabimTeamID:
pWarAndPeaceTeam.meet(iClanOfEmbersTeamID, False)
pWarAndPeaceTeam.meet(iDovielloTeamID, False)
pWarAndPeaceTeam.meet(iSheaimTeamID, False)
pWarAndPeaceTeam.meet(iSvartalfarTeamID, False)
if iWarAndPeaceTeam == iClanOfEmbersTeamID:
pWarAndPeaceTeam.meet(iDovielloTeamID, False)
pWarAndPeaceTeam.meet(iSheaimTeamID, False)
pWarAndPeaceTeam.meet(iSvartalfarTeamID, False)
if iWarAndPeaceTeam == iDovielloTeamID:
pWarAndPeaceTeam.meet(iSheaimTeamID, False)
pWarAndPeaceTeam.meet(iSvartalfarTeamID, False)
if iWarAndPeaceTeam == iSheaimTeamID:
pWarAndPeaceTeam.meet(iSvartalfarTeamID, False)
#This section makes the evils civs at war with the good civs
if iWarAndPeaceTeam == iCalabimTeamID:
pWarAndPeaceTeam.declareWar(iBannorTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iBannorTeamID, True)
pWarAndPeaceTeam.declareWar(iElohimTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iElohimTeamID, True)
pWarAndPeaceTeam.declareWar(iKuriotatesTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iKuriotatesTeamID, True)
pWarAndPeaceTeam.declareWar(iLjosalfarTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iLjosalfarTeamID, True)
pWarAndPeaceTeam.declareWar(iLuchuirpTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iLuchuirpTeamID, True)
if iWarAndPeaceTeam == iClanOfEmbersTeamID:
pWarAndPeaceTeam.declareWar(iBannorTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iBannorTeamID, True)
pWarAndPeaceTeam.declareWar(iElohimTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iElohimTeamID, True)
pWarAndPeaceTeam.declareWar(iKuriotatesTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iKuriotatesTeamID, True)
pWarAndPeaceTeam.declareWar(iLjosalfarTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iLjosalfarTeamID, True)
pWarAndPeaceTeam.declareWar(iLuchuirpTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iLuchuirpTeamID, True)
if iWarAndPeaceTeam == iDovielloTeamID:
pWarAndPeaceTeam.declareWar(iBannorTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iBannorTeamID, True)
pWarAndPeaceTeam.declareWar(iElohimTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iElohimTeamID, True)
pWarAndPeaceTeam.declareWar(iKuriotatesTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iKuriotatesTeamID, True)
pWarAndPeaceTeam.declareWar(iLjosalfarTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iLjosalfarTeamID, True)
pWarAndPeaceTeam.declareWar(iLuchuirpTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iLuchuirpTeamID, True)
if iWarAndPeaceTeam == iSheaimTeamID:
pWarAndPeaceTeam.declareWar(iBannorTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iBannorTeamID, True)
pWarAndPeaceTeam.declareWar(iElohimTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iElohimTeamID, True)
pWarAndPeaceTeam.declareWar(iKuriotatesTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iKuriotatesTeamID, True)
pWarAndPeaceTeam.declareWar(iLjosalfarTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iLjosalfarTeamID, True)
pWarAndPeaceTeam.declareWar(iLuchuirpTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iLuchuirpTeamID, True)
if iWarAndPeaceTeam == iSvartalfarTeamID:
pWarAndPeaceTeam.declareWar(iBannorTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iBannorTeamID, True)
pWarAndPeaceTeam.declareWar(iElohimTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iElohimTeamID, True)
pWarAndPeaceTeam.declareWar(iKuriotatesTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iKuriotatesTeamID, True)
pWarAndPeaceTeam.declareWar(iLjosalfarTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iLjosalfarTeamID, True)
pWarAndPeaceTeam.declareWar(iLuchuirpTeamID, False, WarPlanTypes.WARPLAN_TOTAL)
pWarAndPeaceTeam.setPermanentWarPeace(iLuchuirpTeamID, True)
#This makes good civs be at peace with good civs
if iWarAndPeaceTeam == iBannorTeamID:
pWarAndPeaceTeam.setPermanentWarPeace(iElohimTeamID, True)
pWarAndPeaceTeam.setPermanentWarPeace(iKuriotatesTeamID, True)
pWarAndPeaceTeam.setPermanentWarPeace(iLjosalfarTeamID, True)
pWarAndPeaceTeam.setPermanentWarPeace(iLuchuirpTeamID, True)
if iWarAndPeaceTeam == iElohimTeamID:
pWarAndPeaceTeam.setPermanentWarPeace(iKuriotatesTeamID, True)
pWarAndPeaceTeam.setPermanentWarPeace(iLjosalfarTeamID, True)
pWarAndPeaceTeam.setPermanentWarPeace(iLuchuirpTeamID, True)
if iWarAndPeaceTeam == iKuriotatesTeamID:
pWarAndPeaceTeam.setPermanentWarPeace(iLjosalfarTeamID, True)
pWarAndPeaceTeam.setPermanentWarPeace(iLuchuirpTeamID, True)
if iWarAndPeaceTeam == iLjosalfarTeamID:
pWarAndPeaceTeam.setPermanentWarPeace(iLuchuirpTeamID, True)