The Citynamemanager-development thread

nody

Emperor
Joined
Nov 28, 2004
Messages
1,168
Location
Noviomagus, Batavia
Since the final patch is released there is nothing more that going to be changed and added. This brings new opportunities, like this thread:

Are you too tired of, for example, Nouvelle Orléans renamed New Orleans by the Dutch, Vikings and Germans if conquered instead of being accurately renamed Nieuw, Ny or Neu Orleans? Do you want to change it for the better?

Join the 'Citynamemanager development'-thread! :goodjob:


Read carefully:

You must use the latest update and add your own adjustments or fixes to it. Then post it on this thread with the number of which update you have made together with a summary of what you have changed.

The goal is to make city naming and renaming more accurate each time to make the ultimate CityNameManager.py for RFC.

In the case of city renaming you have to bear in mind that you have to add your new name to all civs in the list.

For example: I've changed the 'New Orleans' for Germany into 'Neu Orleans', therefore I need to add a 'Neu Orleans' to all the civs that have a new name for 'New Orleans' in all its forms.

Note that this is for RFC BTS Version 1.187, not RAND or any other version!

Also, keep a backup of the original so that you don't have to re-install the whole mod in case of a bug. For example rename the file to: CitynamemanagerOriginal.py


Changes so far:

Version history:
Spoiler :
#1 by Nody

- Fixed city renaming for New Orleans in Dutch, German and 'Viking'.
- Added city renaming for New Orleans into Russian (Novyj Orlean)
- Added city renaming for New Orleans into 'Roman' (Nova Aurelianum)

#2 by Usi

Dynamic Japanese names for all cities on Japanese islands for classical, medieval, industrial and modern eras.

#3 by Nody (again)

Changed 'Nova Aurelianum' into 'Nova Aurelia'.

Fixed some Spanish city names for the French (founding and conquering):

- Lisboa = Lisbonne
- Santiago = Saint-Jacques
- Sevilla = Séville
- Zaragoza = Saragosse

#4 by Usi

Fixed a bug in Japanese city names in China and fixed French Séville.

#5 by Nody

* Ciudad Real (Chichen Itza when conquered by Spain) is now being renamed when conquered by several other European (colonial) powers then Spain:

- French = Ville Royale
- Dutch = Koningstad
- English = Royal Town
- Germans = Königstadt
- Vikings = Kongeby (Danish)
- Portugal = same name, renamed Ciudad Real if it has other name, like the Spanish

* York Factory, same story:

- French = Usine de York
- Dutch = York Fabriek
- Germans & Vikings = York Fabrik
- Spain = Fábrica de York
- Portugal = Fábrica de Iorque

* Jakutsk is now being renamed if conquered by Mongolia in the native Sakha language: D'okuuskaj.

* Expanded Mongolian city names map to the north-east, including D'okuuskaj, Kjusjur and Ajan.

Download: View attachment CityNameManager#5.zip
 
Do you have Python exceptions turned on? They can usually tell you where something's wrong with your code.

I expect an indentation mistake or a character somewhere where it doesn't belong.

Edit: since you seem kind of familiar with the topic, could you take a look at Russia's homeland as well. I've heard various times that there are some mistakes in their city names.
 
Warning! Bug Report.
The autoplay doesn't start, instead the message: 'You are defeated' shows.

You forgot some comma I think. Also most of mistakes are corrected with last update.

Updated: uhm, checked city names, some (little) mistakes are forgotten:
Izevsk - Izhevsk
Blagoveshhensk (not correctly) - Blagoveschensk
And one of three Vilna is forgotten also (should be Vil'na)
IIRC there are no more mistakes.

Also Nody, look at city renames - there are now some russian translations and there is one mistake:
Seattle - Siehtl, should be Sietl

Some new aditional cities:
Philadelphia - Filadel'fija
Baltimore - Baltimor
Jacksonville - Dzheksonvill
Charleston - Charl'ston
New Orleans - Novyj Orlean
Houston - Kh'juston
 
Was it a mistake to use the Windows XP Notepad, perhaps?

EDIT: What is Python exceptions and how do you turn it on?

Also, I already added Philadelphia and Baltimore and fixed Sietl in my 'corrupt' file.


Could anyone download my file and check what's wrong?
 
Get Notepad++ (it's free)
 
EDIT: What is Python exceptions and how do you turn it on?
Think of exceptions as error messages the game creates when it can't interpret the code correctly. You can enable them by opening the _Civ4Config file and change the entry HidePythonExceptions from 1 to 0.
 
Read up on debugging here.

Spoiler :
If you don't wanna mess around with Python programming you could always use PyScenario instead. :mischief: City renaming is supported. Example:
Trigger().lost("New Orleans",con.iRussia).name("Novyj Orlean")
 
Thank you, Lena! Seems like a lot of work, though.
I double-checked everything and I see no wrong comma's or anything...

I have to keep reminding me you're a dude, because I sometimes want to kiss your avatar. :p

Is she 18 yet, I don't want to sound like a 'perv'... ;)
 
Thank you, Lena! Seems like a lot of work, though.
I double-checked everything and I see no wrong comma's or anything...

I have to keep reminding me you're a dude, because I sometimes want to kiss your avatar. :p

Is she 18 yet, I don't want to sound like a 'perv'... ;)

She's 19 :)
 
It's okay then, I'm only 26... :p

Not that I could be her dad or anything, although I wouldn't mind 'being her daddy', if you know what I'm talking about... ;)
 
Thank you, Lena! Seems like a lot of work, though.
I double-checked everything and I see no wrong comma's or anything...
You can't mod the game without utilizing debugging - it simply won't work!

If you download Python (python.org) then you get a application called IDLE. It can check the syntax of your code for you, before you launch the game...

But you're right - its a lot of work to learn how to do Python... :p

I took a look at your code and found two syntax errors. Firstly you had missed one "or" and secondly you used tabs instead of blank space for indentation. Try this line (#4067) instead (copy-paste):
Code:
                        elif (sName == 'Nueva Orleans' or sName == 'Nouvelle Orléans' or sName == 'Nova Orleães' [COLOR="Red"]or[/COLOR] sName == 'Ny Orleans' or sName == 'New Orleans' or sName == 'Nieuw Orleans' or sName == 'Neu Orleans' or sName == 'Nova Aurelianum'):
 
Thanks again. I didn't know Python was a program you could download... (I guess I'm a python noob!)

It must be the missing 'or', but I never guessed it would crash the whole game at start...

But common, tabs/blank spaces before the sentence?
Why would that matter, it's only for a more organized view.


EDIT: I didn't find the 'or' missing in my file. Strange, don't remember added it after I uploaded the file.

2nd EDIT: I did find an 'or' missing in line 4800 (America renaming)

Lines must be a bit off since I added some more Russian renames since uploading.
 
But common, tabs/blank spaces before the sentence?
Why would that matter, it's only for a more organized view.
Are you aware what indentations are?
 
I suggest you learn some basic Python before trying to mod RFC. Indentation would be the first thing to read up on.

Or we could make this into a PyScenario project instead. Then there would be no programming required, no indentation to bother with what-so-ever. Non-programmers could easily learn how to do this also. What do you think?

Line #4067 (the one causing the exceptions) would be implemented like this (note that here is no white space in front of the code):
Code:
Trigger().lost(eReciever=con.iRussia,bConquest=None).find('Nueva Orleans','Nouvelle Orléans','Nova Orleães','Ny Orleans','New Orleans','Nieuw Orleans','Neu Orleans','Nova Aurelianum').name('Novyj Orlean')
There is also another way of doing basically the same thing:
Code:
Trigger().lost(None,con.iRussia,(23,42),None).name("Novyj Orlean")
The difference is that the first example looks for cities with any of the names listed, while the second one looks for a specific map tile.

You can add any number of these "Triggers" into a PyScenario script. :goodjob: No need for non-programmers to mess around with Rhye's files either. :rolleyes:
 
The bug is FIXED!

You can now savely use this download!

I've added all the renames and changes of Corovanrobber and added an additional rename of Amsterdam in 'Roman' (Amstelodamum).

Of course if a Roman Amstelodamum is conquered by any other European civ (including Netherlands) it is renamed Amsterdam again.
 
The tile that is Monterrey for the Spanish doesn't turn into that when captured from Aztec, also Sacramento is in California
 
suggestion
 
Top Bottom