View Single Post
Old 06-12-2019, 04:33 PM   #4
joefromchicago
Hall Of Famer
 
joefromchicago's Avatar
 
Join Date: Jun 2011
Posts: 3,630
V. Making Changes to the World Default File - A. Adding Ethnicity Information (for ALL versions of OOTP)

"Ethnicity" information is now located in the world_default.xml file, which can be found in your game's Database Folder. That information is necessary so that (1) you can access a nameset by using the in-game nation editor; and (2) the game can accurately create facegens for players that utilize that nameset. The ethnicity ID and the nameset ID are identical. If you are adding a nameset to the game, you will, therefore, need to add the ethnicity information for that nameset in the world default file.

The ethnicity information in the world default file looks like this:

Name:  ethnicities screen.jpg
Views: 7088
Size:  139.9 KB

Up until OOTP19, it was clear that the values for the individual ethnic groups (african, asian, east indian, caucasian, hispanic) had to equal 1000. The values for the newest nameset (Israeli), though, only add up to 100, so maybe that's not a requirement any more. Still, it would be advisable to make your numbers equal 1000, just to be safe. The values represent the percentage chance that a player with a name drawn from a particular nameset will have a particular facegen. So, for example, if a nameset's values equaled 1000 and it has "asian=300," that means that 30% of the players drawn from that nameset will, on average, have Asian facegens.

For each nameset that you add to the names files, you will need to add a corresponding ethnicity line in the world default file. You can simply copy an existing entry and paste it to the end of the list while making appropriate changes.

VI. Making Changes to the World Default File - B. Changing Nation Information

If all you want to do is make a one-time change to the namesets, you don't need to make any additional changes to the world default file. Once you've made the above edits, you can then make any additional changes to a nation using the game's nation editor, which can be found by going to a nation's profile under the "Explore World" screen (note: you must be in commissioner mode to access the nation editor). To add a nameset to a nation, go to that nation's page, choose "Nation Editor," and then press the "Add a Language" button located in the upper right-hand corner of the screen. A new "Ethnicity/Language/Name Origin" will appear under the "Ethnicities" header on the left-hand side of the screen. You can change the nameset by choosing it and then using the pull-down menu to select a new one. Then you can assign a percentage to that nameset in the third column. If you want to delete a current nameset, simply assign it a percentage of zero.

If, on the other hand, you want to re-use your modded names and world default files, you should also change the relevant nation information in the world default file. That way, you won't have to make the same changes each time you start a new game. The world default file contains information for all of the nations on earth, listed alphabetically by continent. The information looks like this:

Name:  dominican screen graphic.png
Views: 5966
Size:  92.9 KB

The only values that you will need to modify are the "etid" ID located in the header and the "ETHN_PCTS" ID(s) and value(s). Together, this information is used by the game when creating players from a particular nation. For instance, in the above example, the Dominican Republic is assigned ethnicity ID ("etid") "1," the Hispanic nameset, and it has an ethnic percentage ("ETHN PCT") value of "100," meaning that 100% of the players created for this nation will have names drawn from the Hispanic nameset and will have facegens created using the percentages listed for that nameset. The values for all of the namesets listed for a nation's "ETHN PCTS" should equal 100, although that evidently isn't a hard-and-fast rule (e.g. Canada's values equal 105, Puerto Rico's equal 90). Still, to play it safe, you should make sure that the ethnic percent values you modify end up equalling 100.

If you want a nation to use your modded nameset instead of or in addition to the one(s) assigned to it, you may or may not need to edit the ID in the "etid=" field. For instance, if, in the above example, you want Dominican players to use your new "41" nameset instead of the "1" set, just insert "41" where the "1" currently is in the header after "etid=". Some nations have more than one ethnicity, but there's only one etid ID in the nation's header. I'm not sure if the changes made with OOTP19 made this irrelevant. To be safe, always assign the etid ID to the ethnicity with the highest ETHN PCT value.

Do the same with the ETHN PCT values. Change the etid(s) in this field to the nameset ID(s) that you want. That will tell the game that it should take names from the new nameset(s) when it is creating players for that nation. It will also tell the game to create facegens for those players based on the percentages listed in the ethnicity information for the nameset(s) at the beginning of the world default file.

NOTE: any time you are making changes to the game's files, you should make back-up copies of the original files and also of your modded files. When the game updates, it may overwrite your modded files, so it is very important to keep your backups in a separate folder.

VII. Adding New Names to an Existing Game

If you have made the necessary changes to the names and world default files, any OOTP game that you start after you made those changes will use the modded files and your changes should be reflected in the game from the start. If, on the other hand, you have a game in progress and want to incorporate your new names into that existing game, you will need to reload the names and world default files. To do that, go to the Game Settings screen and choose the Database tab. In the upper-right corner of that tab is a pull-down menu named Tools. Select that menu. Among the options are "Re-import name & ethnicity database" and "re-import world database from XML file." You will need to choose both of those options. Be advised that each will take some time to load.

Name:  nation pulldown screen graphic.png
Views: 5867
Size:  255.6 KB

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