Adding city names to civs

Rabbit_Alex

Prince
Joined
Oct 29, 2005
Messages
597
Location
Gaylord, Michigan, USA
I was looking at the Civ4CivilizationInfos.xml file and tried adding city names to the civs in between the <City> tags. But when I go into the game they won't be "useable" names for the civs to use.

Instead of having "Stalingrad" as a city name, it says TXT_KEY_CITY_NAME_STALINGRAD. I also noticed that the city names are added in the order that they are listed in the file. That's why Washington is always the first American city to be built.

Is there a way to add city names without getting them to display like TXT_KEY_CITY_NAME_*?

Thanks
 
well you'll want to get rid of 'TXT_KEY_CITY_NAME_' part...thats the easy fix

I'm not gonna explain the right way of doing it though...but it involves adding all the cities to the 'TEXT/CIV4GameTextInfos_Cities.xml' file also...but just do it the easy way...
 
Moosebox said:
well you'll want to get rid of 'TXT_KEY_CITY_NAME_' part...thats the easy fix

I'm not gonna explain the right way of doing it though...but it involves adding all the cities to the 'TEXT/CIV4GameTextInfos_Cities.xml' file also...but just do it the easy way...

The TXT_KEY_CITY_NAME_* is how all the default cities have their names enterd in the file which is why I did TXT_KEY_CITY_NAME_STALINGRAD. I'll do it the easy way now :goodjob:
 
I'm confused. Do you need to edit both files? Exactly how do you add or change a civ's default city names?

Thanks.
 
What the files do is have one that referrs to text, and another file that lists all the different text for all languages.

So it has "TXT_KEY_CITY_NAME_STALINGRAD" which refers to a different .xml file, where the actual text matching that key is located.

The reason they did it this way is so that it can have different text for the same "TXT_KEY" depending on what language you're playing the game in. So "TXT_KEY_CIVILOPEDIA_ARCHER" would have the Civolopedia text for the Archer unit, but in 4 different languages with <English> <French> or whatever tags around the different paragraphs. This way they have just one .xml file with statistics and stuff, and another .xml file with the actual text that's going to be displayed on the screen, so you don't have 4 languages of stuff clogging up every single .xml file.

So if you want to do it RIGHT, this is what you'd do.

Edit the Civ4CivilizationInfos.xml file to have the new city names. Use the "TXT_KEY_CITY_NAME_STALINGRAD" format. Add as many as you like, but remember which ones you added.

Edit the CIV4GameTextInfos_Cities.xml file. Use the existing entries as a model. Re-enter in all your city names in the format of the existing entries.

For completeness, you should copy and paste your city names into other languages, so that germans and frenchmen who download your mod won't have their systems crash.

If you want to go ABOVE AND BEYOND the call of modding duty, you'll add different text for other languages' versions of these cities. It annoys the French, for instance, when you don't have correct accent marks. Also, certain city names (like "New York") are translated in different languages ("York Neuveau").
 
Using the TXT_KEY files are the way to go, for sure. For cities, though, I wouldn't knock yourself out. It's one thing to have a Civilopedia entry in French or Spanish so that it can be read, but I'm guessing most people would figure out that 'Roma' is 'Rome' or vice versa.

If you're doing it simply for your own benefit, save yourself the time and just put the names in directly to CivInfo.
 
Back
Top Bottom