View Full Version : Scripts? (Set max culture for a city)


Dismal
Jan 23, 2006, 04:01 PM
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)

The Great Apple
Jan 23, 2006, 05:19 PM
Yes, in CvGameUtils.py under doCulture simply add:if gc.getActivePlayer().getCity(pCity.getID()).getCul ture(gc.getActivePlayer().getID()) >= 2500:
[tab]return True between pCity = argsList[0] and 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.

Dismal
Jan 23, 2006, 09:52 PM
Yes, in CvGameUtils.py under doCulture simply add:if gc.getActivePlayer().getCity(pCity.getID()).getCul ture(gc.getActivePlayer().getID()) >= 2500:
return True between pCity = argsList[0] and 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.

The Great Apple
Jan 24, 2006, 08:25 AM
Ok, if you want it to be for only the 2 cities:
if pCity.getName() == "Suez" or pCity.getName() == "Panama City":
if gc.getActivePlayer().getCity(pCity.getID()).getCul ture(gc.getActivePlayer().getID()) >= 2500:
return True

Dismal
Jan 24, 2006, 10:15 AM
Much thanks!