so i made alittle python function to automatically add buildings to newly founded cities depending on some prereqs... It works perfectly fine for human players, however AI players doesn't seem to get the benefit of this ... And I'm kindow clueless to why... Any help would be appreciated!
here's how the code looks like under: OnCityBuilt in CvEventManager
here's how the code looks like under: OnCityBuilt in CvEventManager
Code:
# SETTLERS EXTRA STUFF XUUL! ##
pPlayer = gc.getPlayer(city.getOwner())
iTeam = gc.getTeam(pPlayer.getTeam())
if iTeam.isHasTech(gc.getInfoTypeForString('TECH_CARTHOGRAPHY')) == true:
city.setNumRealBuilding(gc.getInfoTypeForString("BUILDING_MILITARY_ENCAMPMENT"), 1)
if (pPlayer.getCivilizationType() == gc.getInfoTypeForString("CIVILIZATION_INCA")):
city.setNumRealBuilding(gc.getInfoTypeForString("BUILDING_INCAN_TERRACE"), 1)
elif (pPlayer.getCivilizationType() != gc.getInfoTypeForString("CIVILIZATION_INCA")):
city.setNumRealBuilding(gc.getInfoTypeForString("BUILDING_GRANARY"), 1)