Names
All player names in OOTP can be found in the names.xml file located in the /data/database folder. This is a large file containing over 250,000 lines consisting of First Names (30,000+), Last Names (220,000+) and Nicknames (4000+). As with the world database file (world_default.xml) the use of an advanced text editor is highly recommended.
File Structure
The names.xml has three sections for each name type.
<FIRST_NAMES> </FIRST_NAMES>
<LAST_NAMES> </LAST_NAMES>
<NICK_NAMES> </NICK_NAMES>
All three sections use the same format for each name and each name is on a single line. Here is an expanded example:
<N nid="121664">
<EN>Markus</EN>
<ES>Markus</ES>
<KR>마커스</KR>
<JP>マーカス</JP>
<CN>馬庫斯</CN>
<NL>
<L lid="0" dist="2"/>
<L lid="6" dist="1"/>
<L lid="7" dist="1"/>
<L lid="10" dist="6"/>
<L lid="11" dist="1"/>
<L lid="12" dist="1"/>
<L lid="32" dist="1"/>
<L lid="39" dist="1"/>
</NL>
</N>
The first line <N> contains a unique name ID (nid). The name ids do not need to be in a sequential order, they just need to be unique.
The second section contains the name and language localization versions of the name. The default name is within the English <EN> tags.
The next section is the Names List section and this is where the name is associated with the Ethnicity IDs in the world_default.xml file. In the example the first "Language ID" lid is "0", this corresponds with the Ethnicity ID of 0 which is "U.S. (Modern)". The second is "6" which corresponds with "Dutch".
"dist" is used to set how frequently the name will appear in that specific Languague ID "lid". As with the world_default.xml file this number is not a set percentage, it is a relative value. As an example the name "Smith" has a distribution value of "34859" in the U.S. Modern lid, whereas "Smithers" has a distribution value of "54"
Player Name Selection
When the game creates a player it will first generate the country of origin (Nation id) based on the league settings and the type of player being created. Within that Nation the game will check the distribution of the Ethnicity IDs and select one. The game will then "randomly" select a name matching that ethnicity from the names file with the likelihood of selection based off of the distribution weights.
Importing the names.xml File
New Game
Option 1: Overwrite the names.xml file in the /data/database folder (make a backup of the original file)
Option 2: OOTP provides a method to use custom files without the need to overwrite the default files in the database folder. To do this create a New Custom Game from the main screen and enter Advanced Mode by clicking the button at the bottom of the League Creation Wizard. Click on the Advanced tab at the top. Under Source Database Settings you can now select any custom database files you wish to use in your new custom game, if a file is missing OOTP will use the default file(s).
Note: Whenever a game patch is installed the default files in the database folder will be overwritten so be sure to keep a separate copy of your custom file.
Existing Games
The names.xml file can be imported in to an existing game from the Game Settings section. From the Game menu go to Game Settings and navigate to the Database tab. In the top right click the Database Tools drop down and select Re-import name & ethnicity database. It is recommended to backup your league file before re-importing the edited data.
Tips for Editing the names.xml File
If you just want to add a few names into your game they can simply be added to the file in the appropriate section. Just make sure to use a unique Name ID number.
However, If you are working with larger amounts of data it is best to use spreadsheets to edit and manipulate your data.
Unlike the world_default.xml file the names file is a bit more complicated due to the way Language IDs are linked to names. It's more difficult to organize namesets based on ethinicities.
One option, and the simplest, is to not worry about duplicate name entries and simply have an individual spreadsheet sheet for each ethnicity. Just make sure that each name still has a unique ID.
Another option is to take everything from option one, combine it into one sheet, sort by name and then manually merge each individual lid name into one name with multiple lid and dist
As with the the world_default.xml file, xml tags can be inserted into spreadsheet columns to build the individual xml lines. See world_default.xml Advanced Editing Tips
Old Information
So, you want to create a Finnish league, but don't want players named "Zack Maloney"? Names are one of the most frequently customized aspects of OOTP, and it's a pretty easy process, too. OOTP comes with an extensive database of first and last names of many different ethnicities, with over 18,000 first names, and over 80,000 last names. There are also over 1,000 player nicknames.
OOTP's name database consists of three text files: first_names.txt, names.txt and nick_names.txt. These are located in the datadatabase directory in your OOTP installation directory. These name files are used to generate all player and personnel names in the game.
All three names files are comma-separated text files. If you're not familiar with those, see thisscreenabout comma-separated files. In particular, if you're looking to edit the names.txt file with Microsoft Excel, see this section of the page.
The names database is used for all leagues in a given saved game. There is no way, for example, to use one set of names for "League A" in your saved game, and a different set for "League B" in your saved game.
By default, the name files are used only upon the creation of a new saved game. At that time, all the names in the name files are converted into a file called "names.dat" that is stored in the saved game directory. OOTP uses names.dat to generate names any time new players or personnel are created. However, if you wish to change the names database for an existing saved game, you can modify the names files, and then re-import them into your saved game using the Re-Import Name and Ethnicity Database option on the Global Setup page.
New players are created at the start of a game, and during any subsequent first-year player drafts. In leagues that do not have first-year player drafts, some free agents are created annually. New personnel are created at the start of the game, and occasionally thereafter to replace those who have retired.
Read the following sections for more information:
The Names FilesPutting Names and Nations TogetherHands-on: Names