How do I change the city names that a country founds by default?

TheRealMaestro

Chieftain
Joined
Aug 20, 2013
Messages
42
Location
Earth
I know how to re-name a city within a game, but
I want to know how to change the default names
a civilization (even AI) will give to its cities (e.g.,
changing files so Germany will found Köln, München,
Nürnberg; not Cologne, Munich, Nuremberg). How
do I change the game files so that countries will use
the names I have set for them and not those given by
Firaxis? In addition, how do I get this to run by default
instead of needing to start a mod each time?

I haven't modded before, but I would like to get
experience in modding and change the game to my
suit my preferences. Thank you for telling me how.
 
It is fairly simple, actually. To do this, you will need a text editing-tool because the files that decide the city names are XML files. I think you can use Notepad to do this, but I would use Notepad++ instead, as I think it is easier to use for these types of things.

First off, though, since you are new to modding, I will give you some advice. Always make backups of the files you are going to change, just in case you make an error. If you are going to be doing a lot of editing in one particular file, save a separate, fresh copy every so often so that you won't be overwhelmed with errors, and then have to try to fix 20 errors at the same time. To make changes to the default game, simply do all of your changes in the "Assets" folder in the main game directory.
Also, I am pretty sure that there is a way to program a shortcut to load up a mod without having to load up the default game, then load up the mod. If you search the website, I bet you can find it pretty easily. This could be very helpful if you want to get more into modding, and want to keep a fresh, working version available, and then build on it with your mod.

That said, city names can be changed in two different ways. The first way is through a file called "CIV4CivilizationInfos.xml". There is a section for each nation, and for each nation there is a bunch of tags for city names, looking something like this:
<City>TXT_KEY_CITY_NAME_WASHINGTON</City>
The first city in the cluster of "City" tags will be the capitol, and each city after that will be founded by the civ in descending order. To change the name, you must simply replace "TXT_KEY_CITY_NAME_WASHINGTON" part with the with new name. The reason the cities are named like this in this file is for language purposes. Those long names are actually linking over to a different file to find the different translations of the word. It is fine to replace them here, though, with your own names. This leads to the other way to change the spelling. You probably won't need this other way, but perhaps you simply want to change the spelling on a city, in which case, this is just as acceptable.

The second way is though a file called CIV4GameTextInfos_Cities.xml. In it, you can see all the cities' names, and how they will be translated when a player is using a different language in the game. Here you simply have to find the desired city, and then change the spelling in the correct tag that corresponds to the language you use in-game.
Happy modding!
 
To make changes to the default game, simply do all of your changes in the "Assets" folder in the main game directory.
Better don't. Use <Username>\Documents\My Games\Beyond the Sword\CustomAssets (this won't work for DLL changes AFAIK, but you don't seem to be at that point). This way you can easily remove your changes (and don't have to reinstall civ when screwing something up).

To create a mod-shortcut on Windows, take a civ shortcut, right click, select "properties" (or similar) and append
Code:
 mod="<Yourmod>"
in the "Target" (or similar) text field.
 
Very useful information, lfgr! I did not know of that modding method until now, but I wish I would have known it sooner. It would have saved me a bunch of double-checking when I started out to make sure I had all the folders and files in the correct directory within my mod.
 
I think you can use Notepad to do this, but I would use Notepad++ instead, as I think it is easier to use for these types of things.

Notepad works just fine.

To make changes to the default game, simply do all of your changes in the "Assets" folder in the main game directory.

No, you do not make changes of any of the base files. There's a Custom Assets folder in your (My) Documents folder for a reason. Any file that's placed in that will override the base files, so there's absolutely no need to change anything in the default Assets. You're asking for potential problems by doing that. If you don't get it right, then you'll need to reinstall the whole game. Using Custom Assets, you can just delete the faulty file and start over.
 
BTW, what is the priority between Custom Assets XML files and Modded XML files? Does the game use only one XML file and ignore the rest, or all of them, and use only the prior one where overlaps and contradictions exist?
 
BTW, what is the priority between Custom Assets XML files and Modded XML files? Does the game use only one XML file and ignore the rest, or all of them, and use only the prior one where overlaps and contradictions exist?

The game will treat Custom Assets as if they were default (for the most part) i.e. every mod you play will use these files in Custom Assets.

Modded files will overwrite any Custom Files. However, you can still mess things up with Custom Assets.

Generally you should only mod with new mods. Custom Assets can break things.
Custom assets modding will work, and it won't mess up your original game, but for the most part it's not recommended. This is because custom assets are loaded first before anything else, so this can cause conflicts with some mods. If you release a mod, you definitely should not have it install to custom assets (the exception being the BUG mod). The nice thing about custom assets is that they are loaded automatically, so many modders start out using custom assets, but in the long run it can be a hassle. To use custom assets simply find the file you want to alter, and copy it into the custom assets folder; ensure you maintain the same basic file structure as Civ4 does. For instance if tweaking Unit values with custom assets, copy your CIV4UnitInfos.xml from ProgramFiles/../BtS/Assets/XML/Units to MyGames/BtS/Custom Assets/XML/Units, then make the changes to the file in your custom assets folder.
 
Back
Top Bottom