View Single Post
Old 03-29-2018, 01:09 AM   #2
joefromchicago
Hall Of Famer
 
joefromchicago's Avatar
 
Join Date: Jun 2011
Posts: 3,630
NOTE: This guide is for modding OOTP version 22 and earlier. For version 23 and later, see this post.

Guide to Modding Namesets

I. Introduction


Creating your own nameset can be an easy and fun way to enhance your OOTP game-playing experience, but you need to follow a few basic rules. This will provide simple step-by-step instructions. More information can be found in the OOTP manual, but be aware that the manual is, in many important respects, outdated. This guide, in contrast, reflects all of the changes that have been made to the way that the game handles namesets since version 19.

Namesets consist of a list of comma-separated values. Each line contains three pieces of information, separated by commas: (1) the name; (2) the frequency of that name; and (3) the nameset ID number.

Name:  name screen graphic.png
Views: 6043
Size:  71.6 KB

The first and last values need little explanation. The name is the name that the game assigns randomly to players created using that nameset. The nameset ID is the number assigned to that nameset in the world_default.xml file. You can find a list of nameset IDs at the beginning of that file, listed under <ETHNICITIES>.

The frequency value is a relative number, not a percentage. It determines how often a name appears relative to other names in the same nameset. So, for instance, if "Smith" has a frequency of 100 while "Jones" has a frequency of 1, that means that "Smith" will, on average, appear 100 times more often than "Jones." Consequently, the frequency value can be any number.

II. Creating a Nameset

There are two basic ways to create your own nameset. The first is to enter all of the information into a simple text program, such as Notepad. The second is to enter all of the information initially into a spreadsheet program and then transfer it to a text program.

The first method is fairly straightforward. All entries should follow the same format: name,frequency,ID. The manual recommends that you do not put spaces before or after the commas. You can enter all of the information on a single line, but you will probably find it easier to read the file if you put each entry on a separate line. You do not need to enter the names in alphabetical order, although you may find that it's easier to avoid duplications if you do so.

The second method involves a little extra work, but it allows for more flexibility in handling your data and also allows you to catch errors before they creep into your nameset. I will use OpenOffice for this example, as it is a free open-source spreadsheet program available for download on the internet. You can use other spreadsheet programs, such as Excel, but the commands and format might be different. After creating a spreadsheet, enter the name and frequency values in the first two columns (no need, at this stage, to enter the nameset ID). Your spreadsheet, then, will look something like this:

Name:  nameset screen.jpg
Views: 5986
Size:  59.2 KB

Column A will, therefore, contain all the names and Column B will contain the frequency values. After entering all of your data, you may want to perform a sort to put the entries into alphabetical order. That's not necessary, but, as noted above, you may find that it helps to organize your data and it can make it easier to scan for any duplicate names. Next, in cell C1, enter a comma, and then fill down to the end of the list. Once you are satisfied with your work, enter the following string in cell D1:

Code:
=A1&C1&B1&C1&*
That will create the comma-separated values that can then be incorporated into the OOTP names files. For the * in the above example, replace that with the ID number that you want to assign to your nameset. After inserting the string in cell D1, fill down to the end of your data. Once you have done that, select that same column and copy it to a text program. Only the values will be copied, not the code, so the end result should look exactly like a regular comma-separated list of values in an OOTP nameset.

When choosing a text program, remember: the simpler the better. In particular, avoid programs that have "smart" punctuation, such as apostrophes, that might not appear correctly in OOTP. Also, OOTP has had some problems in the past with displaying foreign diacritical marks and characters, such as tildes and umlauts. If you find that the game is not displaying your names correctly, you may need to edit out some of those foreign characters.

CONTINUED

Last edited by joefromchicago; 05-16-2022 at 08:06 AM.
joefromchicago is offline   Reply With Quote