Scripts? (Set max culture for a city)

Dismal

Boo
Joined
Aug 27, 2002
Messages
79
I'm making some modifications to the huge world map for personal play with a friend of mine. I would like to create two cities, Panama City & Suez in their proper locations, which I have done. The problem lies with them getting WAY too large. We tend to found these cities are fast as we can (if not modding them into the start of the game) and their culture just grows and groes. I was wondering if there is a way to script it so that their culture stops growing at a certain level (say 2500)
 
Yes, in CvGameUtils.py under doCulture simply add:
Code:
if gc.getActivePlayer().getCity(pCity.getID()).getCulture(gc.getActivePlayer().getID()) >= 2500:
[tab]return True
between
Code:
pCity = argsList[0]
and
Code:
return False

This will stop cities gaining any further culture past 2500. If you want it to just be Panama and Suez that stop growing then yell.
 
The Great Apple said:
Yes, in CvGameUtils.py under doCulture simply add:
Code:
if gc.getActivePlayer().getCity(pCity.getID()).getCulture(gc.getActivePlayer().getID()) >= 2500:
     return True
between
Code:
pCity = argsList[0]
and
Code:
return False

This will stop cities gaining any further culture past 2500. If you want it to just be Panama and Suez that stop growing then yell.

yes pleaaaase. Just explain to me how I define which cities to limit.
 
Ok, if you want it to be for only the 2 cities:
Code:
if pCity.getName() == "Suez" or pCity.getName() == "Panama City":
     if gc.getActivePlayer().getCity(pCity.getID()).getCulture(gc.getActivePlayer().getID()) >= 2500:
          return True
 
Back
Top Bottom