How do you increase the number of characters allowed in a city name?

Smooth Olaf

Chieftain
Joined
Aug 9, 2006
Messages
11
The default amount is 15 letters. Is it possible to change this to allow more characters? Thanks.
 
You need to edit the __eventEditCityNameBegin() function in Assets\Python\CvEventManager.py and change the "15" to a higher number:
Code:
	def __eventEditCityNameBegin(self, city, bRename):
		popup = PyPopup.PyPopup(CvUtil.EventEditCityName, EventContextTypes.EVENTCONTEXT_ALL)
		popup.setUserData((city.getID(), bRename))
		popup.setHeaderString(localText.getText("TXT_KEY_NAME_CITY", ()))
		popup.setBodyString(localText.getText("TXT_KEY_SETTLE_NEW_CITY_NAME", ()))
		popup.createEditBox(city.getName())
		[COLOR="Blue"]popup.setEditBoxMaxCharCount( 15 )[/COLOR]
		popup.launch()
If you want more than 30 you'll also have to change the __eventEditCityNameApply() function below it although as you can see in the screenshot, 30 characters doesn't fit very well on the city bar so hopefully it's more than enough. Note that I've only tried this on BTS and of course standard modding caveats apply: copy the file to CustomAssets and/or make a backup before you edit it.

1227946186.jpg


1227946207.jpg
 
Back
Top Bottom