Adding Provinces

This tutorial will teach you how to add a new province to the EU4 map in a step by step manner.

I recommend that you use Notepad++ for coding, and Photoshop CS4 or above for editing the image files. GIMP and Paint.NET will work with the files used in this tutorial, but I will not be including specific instructions for them.

Step 1 – Mod Setup

First, you need to create a mod. To do this on Windows, go to C:\Users\Name\Documents\Paradox Interactive\Europa Universalis IV\mod\ and create a folder.

I will be calling this mod new_provinces, but you can call the folder whatever you want.

Once we have created the new_provinces folder, we need to create a new_provinces.mod. This is what the game reads to detect your mod.

Below is a basic .mod file for this tutorial:

name="Tutorial - Adding a new province"
path="mod/new_provinces"
supported_version = "1.14.*.*"

The supported_version line should match the version of the game you are modding for. So in the future, you’d change the line to 1.15.*.* . The asterisks are wildcards used so your mod will work with any of the hotfixes pushed out for the version specified.

Now that we created our new_provinces.mod file, we need to place it in C:\Users\Name\Documents\Paradox Interactive\Europa Universalis IV\mod\.

Navigate to C:\Users\Name\Documents\Paradox Interactive\Europa Universalis IV\mod\new_provinces, and create these folders:

  • map
  • localisation

Now go to your game installation, which for me is J:\SteamLibrary\SteamApps\common\Europa Universalis IV\. Copy the files specified below into C:\Users\Name\Documents\Paradox Interactive\Europa Universalis IV\mod\new_provinces\map:

  • provinces.bmp
  • default.map
  • positions.txt
  • definition.csv
  • continent.txt
  • area.txt

Only the first four are vital, but you will probably want to assign any new provinces to a continent (otherwise clicking on the province will cause a crash to desktop) and area.txt is used to add provinces to specific areas within the game (i.e. the Scottish Highlands)

Go to J:\SteamLibrary\SteamApps\common\Europa Universalis IV\localisation and copy these files into C:\Users\Name\Documents\Paradox Interactive\Europa Universalis IV\mod\new_provinces\localisation

  • prov_names_l_english.yml

Go to C:\Users\Name\Documents\Paradox Interactive\Europa Universalis IV\mod\new_provinces\history and create a provinces folder. We will return to this folder once we have added the new province to the map files.

Step 2 – Editing the map

Now open default.map and change max_provinces to 4021 or higher. This number must be higher than the highest province id you are using, otherwise the game will not load any new province id definitions.

Open definitions.csv. Scroll to the bottom and you should see this:

4010;100;14;110;RNW
4011;100;14;111;RNW
4012;100;14;112;RNW
4013;100;14;113;RNW
4014;100;14;114;RNW
4015;100;14;115;RNW
4016;100;14;116;RNW
4017;100;14;117;RNW
4018;100;14;118;RNW
4019;100;14;119;RNW

The format following this pattern: province_id, red, green, blue, reference name. So, if I wanted to add a new province, I would do this:

4020;255;20;33;My province;x

I have added a new province definition for the province id of 4020, telling the game to look for the province with the colour (255, 20, 33) in provinces.bmp and to assign it the id of 4020.

We have now told the game to accept province IDs up to 4021 and added a province definition to for the province 4020.

Now open provinces.bmp in Photoshop. You should see a image very similar to this:

tut_1

Now, I want to add this new province to Iceland, so I will zoom in on the area containing the Icelandic provinces:

tut_2

Now, remember the colour code I set earlier for province ID 2026? It was 255, 20, 33.

So click on the Palette Picker and enter these values:

tut_3

Now to add this new province, use the Pencil Tool set to 1 pixel and draw it in, as below. If you use the Paint Bucket tool, ensure that Anti-alias is disabled and Contiguous is enabled. Otherwise you will get feathering which will break the provinces.bmp.

tutorial_4

Save provinces.bmp. You have now added the province ID 4020 to the province map, and will appear ingame like so:

tutorial_5

This is obviously not we want, so what we need to do now is add the actual province information.

Step 3 – Adding province information

Navigate to C:\Users\Name\Documents\Paradox Interactive\Europa Universalis IV\mod\new_provinces\history\provinces.

Copy this file into that folder: J:\SteamLibrary\SteamApps\common\Europa Universalis IV\history\provinces\370 – Reykjavik.txt.

Now copy it and rename it 4020 – Province Name. You can name the province anything you want after the hyphen.

Now open this new file and edit it so it looks like this:

#4020- Cold Place
owner = NOR
controller = NOR
add_core = NOR
is_city = yes
base_tax = 1
manpower = 1
culture = norwegian
religion = catholic
trade_goods = fish
hre = no
capital = "Chilly Capital"
discovered_by = western

This will give the new province to Norway and give it the Norwegian culture and the Catholic religion. Now launch your game with the mod enabled and you should see:

tut_6

Almost there! We will now add the province to continent.txt and region.txt.

Open up continent.txt and under europe = { add 4020, telling the game that province id is on the European continent.

Then open area.txt and under subarctic_islands_area = { and add 4020 to the list there.

Which area a province belongs to is dependent on where you are adding new provinces, and if you have created a new area, in which case you might want to make a new area. To do so, you’d add this to the bottom of area.txt:

my_new_area = {
    4021 4022 4023 # Provinces within this area
}

Step 4 – Adding localisation

We have now added a new province to Iceland, but the province name is PROV4020. This means that province does not have an entry in prov_names_l_english.

Therefore we need to add one. Go to C:\Users\Name\Documents\Paradox Interactive\Europa Universalis IV\mod\new_provinces\localisation\prov_names_l_english and open it with Notepad++.

Now scroll to the bottom and add a new entry:

PROV4020: "Cold Place"

Make sure you have a space in front of this new entry to maintain the correct format.

Save this file and in game you should see:

tut_7

Step 5 – Adding new positions

We will now add the new province to positions.txt. Launch EU4 and once in game, use the nudge command in the console to open up the positions editor. Below is an example of me using the positions editor.

Have an experiment with the various modes to ensure the province matches your desires.

tut_8

Once you have modified the information, click Save.

The game will generate a new file in C:\Users\Name\Documents\Paradox Interactive\Europa Universalis IV\map\ called positions.txt.

Copy it to C:\Users\Name\Documents\Paradox Interactive\Europa Universalis IV\mod\new_provinces\map and overwrite the current positions.txt within your mod.

Return to C:\Users\Name\Documents\Paradox Interactive\Europa Universalis IV\map\ and delete the positions.txt, otherwise the game will load this version over the version within your mod.

Conclusion

You have now added a new province to the Europa Universalis 4 map. In addition to the steps above, you may need to add new province IDs to these files found in the common folder:

  • 00_colonial_regions.txt – Assigns the province id to a specific colonial region for use with colonial nations.
  • 00_tradenodes.txt – Assigns the province to a trade region. Without adding a new province here the province will belong to no region.
  • 00_trade_companies.txt – Assigns the province id to a specific trade company region.
  • 00_natives.txt – Controls which natives, if any appear in a province. If your province is not found in this file and is colonisable, then the Kill Natives button with Armies will fail to work.
Replacing Emoji...
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s