Victoria 3

Victoria 3

View Stats:
Change countries name : how?
My colony became a country with a dumb name.
How can I rename it?
(Allready searched for, and couldn't find countries.txt. No console access either)
< >
Showing 1-5 of 5 comments
GrandfatherBones May 30, 2024 @ 12:13pm 
:lunar2019deadpanpig: :lunar2019deadpanpig: Ok I'll stick with my dumb name.
Thanks for the answer, I'm sure it'll be usefull for someone smarter than me.
Last edited by GrandfatherBones; May 30, 2024 @ 12:13pm
John Hadley May 30, 2024 @ 3:48pm 
The names of the countries are part of the localization data since they are different for every language. You will find them in the game's installation at Victoria 3\game\localization\english\countries_l_english.yml. You should not change them there. If you want to change them you should make a mod that will mod that file only when you apply the mod and leave it unchanged otherwise.

FIND THE ORIGINAL FILES THAT YOU CAN MOD

First find the game's installation folder. In Steam library right click Victoria 3, click "Properties", click "Installed Files", then click "Browse". The game data that can be modded is in the "game" sub-folder here so switch into that folder.

CREATE A MOD

To make a mod, load the VIctoria 3 launcher then select "All installed mods", then "Mod Tools". Select a name without any punctuation other that dashes to be safe. It'll create a mod skeleton for you in your Victoria 3 user data folder. Click the three dots to the right of it then "Show in folder" to open the mod folder.

DUPLICATE THE FOLDER HIERARCHY FOR WHATEVER FILES YOU WANT TO MOD

Now you need to duplicate the folder hierarchy of the file(s) you want to change in your mod folder, so duplicate the folder structure that comes after Victoria 3\game for any file that you need to replace In this case you need to first create a "localization" folder then change into that and create an "english" folder, presuming you are playing the english version, if not browse the folders and find the one that corresponds to your language and make sure you make the appropriate folders for your language.

COPY THE FILES YOU WANT TO MODIFY INTO YOUR CORRESPONDING MOD FOLDERS

Change into the "english" folder after having created it, then copy the file from the game's installation folder "Victoria 3\game\localization\english\countries_l_english.yml" into it. If you open it in an editor, you'll see that there is some kind of resource identifier name, a colon, a number, then in quotations is the text that will be used to replace that identifier. You need to keep the identifier as it is and change the text.

MAKE ANY CHANGES YOU WANT TO THE FILES IN THE MOD FOLDER

There will be two lines for each country, one that has the name of the country and one that has the adjective that describes people from that country, for instance if I want to change the country "Sweden" to "Hadley" I search for "Sweden" and I find these lines:

Before:
SWE:0 "Sweden" SWE_ADJ:0 "Swedish"
After:
SWE:0 "Hadley" SWE_ADJ:0 "Hadlonian"

Be sure to SAVE after you make the changes. Your mod is complete now.

CREATE A PLAYSET TO USE YOUR MOD

Your mod isn't actually active unless you create a playset that uses the mod and launch using that playset. Right below the play and resume buttons in the launcher there is a pulldown menu you can use to select a playset or create a new one, or you can click on Playsets in the menu on the left then use the pulldown at the top of the screen. Create a new playset. Click "Add Mods" to add the mod you created to the playset. Finally, check the mods you want to play with then in the lower left corner click the button to add the checked mods to the playset.

LAUNCH USING YOUR PLAYSET TO PLAY WITH YOUR MOD

Under the play button select your mod playset with the pulldown menu then click Play to launch. Your mod should now be active and the country name should be changed.
Last edited by John Hadley; May 30, 2024 @ 3:52pm
John Hadley May 30, 2024 @ 11:17pm 
MAKING YOUR MOD COMPATIBLE WITH OTHER MODS THAT CHANGE COUNTRY NAMES

If you followed the instructions earlier you have a mod that can change the name of as many countries as you want, but if also contains the localization strings of all the countries you didn't change. If two mods were made in this same way they would both have a file named "countries_l_english.yml" and whichever comes last would be the only one that applies since they have the same name. You couldn't use the name for Sweden from one mod and the name for Canada from another mod at the same time if they are written this way. However, you can revise the mod to fix this and make it more compatible.

STEP 1: REMOVE ALL UNMODIFIED LOCALIZATION SETTINGS FROM YOUR MOD FILE

You created a working mod by copying the entire localization file and changing the ones you wanted but it contains the localization strings for ALL the countries. If you leave it like that then either your mod will override the changes that any other mod makes to them or their mod will override yours. You now need to edit the YML file that you mpdified and delete all the lines you didn't change except the very first line that must always say "l_english:" in any English localization file. Do that and save the file. You'll only have three lines left in my example:
l_english: SWE:0 "Hadley" SWE_ADJ:0 "Hadlonians"

STEP 2: PICK A UNIQUE NEW NAME FOR YOUR LOCALIZATION FILE

You can't name the file "countries_l_english.yml" anymore if you aren't duplicating all the contents of that file, because it will replace the original and you will not have the entries that you didn't copy into the file at all. If the files have different names then one can apply changes to the other instead of replacing it. All English localization file names must end in "l_english" and must have the file extension ".yml". Since you are renaming a country that has a three letter code, you could make a unique file name by appending that to the part of the filename before "l_english", so you could for instance name the file "countries_swe_l_english.yml" if you are changing the country name for the country with the three letter code SWE. If you made another mod file that changes the name of DEN it would have a different name and wouldn't conflict with this one, No one else would make a file with the same name in another mod unless they also had the intent to change that country name.

STEP 3: ENSURE YOUR FILE GETS LOADED AFTER THE DEFAULTS

As long as the files don't have the same name in which case one overrides the other, the load order that the game applies localization files is reverse alphabetical order and whichever is last gets the last chance to override everyone else if they both set the same variable. As all the localization files start with an alphabetical letter all you have to do is put a number at the start of the filename and you will always apply after the defaults do, so the default won't override your setting after you apply them. Also, if you start your filename with a number, there's no chance that you will have exactly the same filename as one of the game files and prevent it from loading its settings unintentionally.

Knowing these two things, you might choose to rename your localization filename again, this time tto "99_countries_swe_l_english.yml". If you wanted another localization file to override this when you use the two together it could have any legal localization filename except the number at the front could be a two digit number lower than 99 and it will come after this one in reverse alphabetical local order, so the number acts as a priority setting for your localized files with different names with the lowest number making the final changes.


If you did all three of the above three things, your localization file can now work nicely with others in the same mod or as part of a different mod and they will be able to modify the existing localization defaults.
John Hadley May 30, 2024 @ 11:20pm 
Finally some links that might also be helpful for someone wanting to understand the modding system and country files in particular to modify or define new countries and the localizations related to them.

Country modding wiki page
https://vic3.paradoxwikis.com/New_country_modding

Dev Diary 60 country modding tutorial
https://forum.paradoxplaza.com/forum/developer-diary/victoria-3-dev-diary-60-modding.1545200/
< >
Showing 1-5 of 5 comments
Per page: 1530 50

Date Posted: May 30, 2024 @ 11:34am
Posts: 5