Maximum city allowed

bilbon_s

Chieftain
Joined
Dec 30, 2006
Messages
7
Hi all,

I'm searching for a way to limit the number of cities thar can be created. Do you know where this can be set ?

Thanks

Sylvain
 
you can use Python and create a CustomEventManager which increase a variable each time a city is build... to prevent building more cities you like you may can disable the city-build-option of the settlers or simply showing a msg instead of creating the city if the limit is reached
 
Hi,

I'm afraid the AI will still try to build settlers and become too easy to play.
But this may be a solution :)

Thanks

Sylvain
 
You didn't say if it's a total limit or a limit per player or per team or... so I'm assuming it's total number.

CvGameUtils.py
Code:
	def cannotFoundCity(self,argsList):
		iPlayer, iPlotX, iPlotY = argsList
		if CyGame().getNumCities() > limit:
			return True
		return False
limit being the number you want.
The AI should understand it can't found any new cities (since there's no plot where it's allowed).

You will need to activate the callback in PythonCallbackDefines.xml.
 
Top Bottom