Smooth Olaf
May 19, 2008, 09:36 PM
The default amount is 15 letters. Is it possible to change this to allow more characters? Thanks.
|
View Full Version : How do you increase the number of characters allowed in a city name? Smooth Olaf May 19, 2008, 09:36 PM The default amount is 15 letters. Is it possible to change this to allow more characters? Thanks. Smooth Olaf Jun 14, 2008, 09:16 PM Just putting back up top in case it's possible. Smooth Olaf Nov 28, 2008, 09:20 PM The third time's the charm? Dresden Nov 29, 2008, 02:13 AM You need to edit the __eventEditCityNameBegin() function in Assets\Python\CvEventManager.py and change the "15" to a higher number: 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()) popup.setEditBoxMaxCharCount( 15 ) 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. http://www.isarapix.org/pix90/1227946186.jpg http://www.isarapix.org/pix78/1227946207.jpg Smooth Olaf Nov 30, 2008, 01:54 PM Thanks a bunch. I'll try it out. |
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.