There are four .txt files in MTW2 that control what and how the character names will appear in the game. Below I’ve listed them and their locations in the MTW2 folders. (Keep in mind that to find these files you must use the unpacker tool that came with patch 1.1. For everyone's convenience and reference I have posted the vanilla names files at the bottom of this post.)
1.)
descr_names.txt – located in MTW2/data
2.)
names.txt.strings.bin – located in MTW2/data/text
3.)
descr_names_lookup.txt – located in MTW2/data
4.)
descr_strat.txt – located in MTW2/data/world/maps/imperial_campaign
What To Know About The Files
1.) descr_names.txt – The most important of these files is the
descr_names.txt. Unlike the other files, it is organized firstly by faction; then by male first names, surnames and female first names. When the program creates a name for a newly created character in the game, it searches this file first. Therefore, no matter what names you have listed in any of the other three files, if that name is not listed in the
descr_names.txt, you will never see it appear in the game (but the game will still function).
2.) names.txt.strings.bin – After choosing a name in the
descr_names.txt file, the program comes to this file to see how the name should appear in the game. This file is auto-created by the program from the names.txt file that the user provides for it.
If the names in
descr_names.txt are not listed in the
names.txt.strings.bin file, the character who is supposed to receive that name will instead receive no name at all. If a
starting character's name is not found in the
names.txt.strings.bin, the game will usually crash when you try to start a new campaign. Inside the .txt form of this file you will see names listed:
{Henry}Henry
{Agatha}Agatha
{von_Sachsen}von Sachsen
It's important to know that in
names.txt you can alter how a name is actually displayed in the game. For example, if you have the following name:
{Henry}Henry
…the game will display Henry in-game. However if you change that name listing to:
{Henry}Heinrich
…anytime the program hits Henry
in descr_names.txt, and then moves to
names.txt, it will think you wish to have Heinrich rather than Henry show up in-game. Why this works is not clear to me, but it is useful in changing the names of starting characters without altering those names in the descr_strat.txt (a file that all most modders alter for other reasons; see below).
Keep in mind however, that the above example would change the name Henry to Heinrich for every faction that uses that name since the names.txt file is not organized by factions. Thus, in this case the HRE, England and France would be affected by changes made to the line {Henry}Henry, as these three factions contain a reference to Henry in their
descr_names.txt listings.
Probably the most frustrating thing about creating new character names and editing the names.txt to include them, is the sensitivity of the file to special characters (such as the German ü, ö, ä, ß, etc). The file sometimes accepts special characters without any error issues and sometimes it doesn't; so my policy has always been to avoid using special characters between the {}s in the names.txt (and hence in the
descr_namest.txt and
descr_strat.txt as well). To avoid these issues, make sure to do the following to the names inside the {}s in the
names.txt file:
1.) For double names such as "von Sachsen", substitute an underscore between the two words, so that the entry appears: {von_Sachsen}von Sachsen
2.) For names that contain apostrophes such as "d'Altavilla", substitute an underscore for the apostrophe, so that the entry reads: {d_Altavilla}d'Altavilla
3.) For name using special characters, such as "Inês", substitute the special character with the next closest standard character, so that the entry reads: {Ines}Inês.
Finally, when you add your modified names.txt file to the MTW2/data/text folder and start the game, the program will convert your names.txt into a names.txt.strings.bin file and place it in the same folder. If you make any further changes to the
names.txt, you won't need to delete the .bin, because the game recreates the .bin automatically each time you start the game.
3.) descr_names_lookup.txt – This file is similar to names.txt in that it is one list with every name in the game organized alphabetically; one per line. What it's purpose is or should have been is unknown. I do know that, as far as I can tell, it is
not used by the program. Don't bother modding this file as it's unnecessary; the game functions fine without it (thanks to SicilianVespers for pointing this out to me).
4.) descr_strat.txt – This file contains a load of data that effects what you find on the map when you start a new campaign; including character names. Since every faction begins a campaign with a family and a few characters already on the map, a section of the descr_strat.txt is dedicated to giving them all names. The problem with this is that when you change the names in the other three .txt files, you may have deleted some starting character names. So before ever starting a new campaign with your new names lists, you need to make sure that all the names in
the descr_strat.txt are also in the
names.txt and
descr_names.txt. If you don’t, you will get kicked back the main menu when you start a new campaign. Also, when modding names in this file, be careful as the the family tree portion of the descr_strat.txt is space sensitive. Read through
this thread for more information on that.
File Proofing
It's important that the names in each of these four files match up with each other. The easiest way to do this is to use
tornnight's "Names Verifier" tool. It will hunt down most of the problems you may have with your custom names files; though it should be noted that it is possible to still have errors despite fixing all the problems detected by the tool.