Hearts of Iron IV

Hearts of Iron IV

98 Bewertungen
Portrait Modding Guide
Von Crimson_Nomad
This guide will show you the easy process of creating portraits for use in Hearts of Iron, as well as how to add new leaders, and change the names and portraits of already existing leaders.
2
2
3
2
   
Preis verleihen
Favorisieren
Favorisiert
Entfernen
Preface
Hello! And welcome to Crimson_Nomad's guide to portrait modding! In this guide I hope to show you an easy way to change portraits, add leaders, and create your own portraits for historical immersion, fixing Hirohito's chins, or just memeing the game to hell.

For the purposes of this guide I will be using paint .net, which is an app that can be found on the Microsoft Store, there is a free version, and you should be able to get away using that.

Let's get started!
Creating the Portrait
Step 1:
To begin this guide, we will begin by choosing a portrait that we want added into the game. In this example I have decided to replace Joseph Stalin with Russia's greatest love machine: Rasputin.

Step 2:
In order to make this as simple as possible, we are going to "overwrite" a vanilla portrait with the portrait we want to make. For the sake of coding simplicity, I will be overwriting Stalin's portrait. All of Hoi4's portraits can be found in:
C:\Program Files (x86)\Steam\steamapps\common\Hearts of Iron IV\gfx\leaders

Make a copy of the portrait you need on your desktop, or somewhere that is easily reachable.

Step 3:
Now, open your image and the template portrait up in your preferred program, I will be using paint.net.

After this, select the "Rectangle Select" tool, and use it to select a vertical rectangle in the area that you want the portrait to show.



Copy and paste the selected area into the template portrait.

Now you should get a pop up that says something like this:



Select "keep canvas size", as expanding the canvas will make things more difficult to format.

Now, the image you have pasted may be a bit larger the the portrait. If this is the case, simply shift-left click while dragging the borders of the image inward to minimize the image while still maintaining the ratio.



Once you have minimized and toyed with the image a bit to your liking, save the portrait as either the same image or one with your preferred name, MAKE SURE TO SAVE IT AS A DDS FILE. For the purposes of this guide, I will be overwriting the copy of Stalin's portrait I made, so I don't have to change the portrait path. However, for custom leaders, I will be showing you how to set a custom path later in this guide.

Now let's move on to the next step: having your portrait appear in game.
Replacing Portraits (1.11+)
With the 1.11/No Step Back update, the way to create new leaders has now been changed.

To begin, let's create a mod for our new portrait. To do this launch Hearts of Iron, then on the left hand side, click on the button that says "Installed Mods". From there click "Upload Mod", and then "Create Mod".



Next fill in the boxes with the information you want, such as your mod name and the directory, which does not have to match your mod's name. As for version number, fill out the necessary version you mod will be for, currently Hearts of Iron is 1.11.9. However, if you don't want to be switching that third number out every time there is a patch for the game, simply substitute it with an asterisk, like this 1.11.*, and the game will automatically list it as compatible with the latest patch.



Now go to your mod directory, which can be found in C:\Documents\Paradox Interactive\Hearts of Iron IV\mod

(Note: "Documents" is the actual folder on your computer that comes with it's own graphic, not the folder that you may have created at some point, this file is usually under Quick Access or Users.)


Open you mod file, which will be named what you inputted in the directory box when creating the mod. Within the directory, create the folder, "gfx" (all lowercase).

Within the "gfx" folder create a new folder named "leaders".

Within the "leaders" folder create another folder named "SOV" (This is for replacing Stalin's portrait, for other countries, name the folder after the country's tag ex: GER for Germany, ENG for England. All of the country tags can be found in C:\Program Files (x86)\Steam\steamapps\common\Hearts of Iron IV\history\countries)

Place your leader portrait into SOV or whatever folder is within "leaders".

If you also want to change your leader's name, create a "localisation" folder within the main mod folder, and within that create a folder titled the language that you are creating the mod in (english for English, braz_por for Portugese speakers etc...) Then copy and paste "nsb_characters_l_english.yml" from Hearts of Iron's localisation folder (found here: C:\Program Files (x86)\Steam\steamapps\common\Hearts of Iron IV\localisation\english) and open it.




Find the leader's name you want to replace, and within the quotation marks type it in, and save the document.



And you're done! Simply launch the game and conquer the world with your newish leader!




Adding New Leaders (1.11+)
Adding new leaders with the NSB update follows a similar process to the one above.

Add two folders to your mod folder in addition to "gfx" and "localisation" called "history" and "common".

Within "common", create another folder called "characters".
- Within this folder, copy and paste your respective country's character folder, in this case it would be the "SOV.txt".

Within "history" create another folder called "countries".
- Copy and paste the "SOV.txt" country file from "C:\Program Files (x86)\Steam\steamapps\common\Hearts of Iron IV\history\countries"


Open up the "SOV.txt" character folder.

For creating a new leader, copy and paste any of the country leaders, such as Stalin, and substitute the information you want.



Now head over to your country's history file, and add the following line where the rest of the "recruit_leader" section is.



And you're done!
Getting the Portrait in Game (pre-1.11)
The next step is to get the portrait to appear in game.

Step 1:

Launch up Hearts of Iron, and go to the "mods" section of the launcher, underneath which, you will see an option that says "Mod Tools".

Select this option and click "Create New Mod".



Next fill in the boxes with the information you want, such as your mod name and the directory, which does not have to match your mod's name. As for version number, as of publishing this guide, Hearts of Iron 4 is in 1.9.



Step 2:

Go to your mod directory, which can be found in C:\Documents\Paradox Interactive\Hearts of Iron IV\mod

(Note: "Documents" is the actual folder on your computer that comes with it's own graphic, not the folder that you may have created at some point, this file is usually under Quick Access or Users.)

Open you mod file, which should be called whatever you previously named it whenever you created the mod. Within the directory, create a folder named "gfx" (all lowercase).

Within the "gfx" folder create a new folder named "leaders".

Within the "leaders" folder create another folder named "SOV" (This is for replacing Stalin's portrait, for other countries, name the folder after the country's tag ex: GER for Germany, ENG for England. All of the country tags can be found in C:\Program Files (x86)\Steam\steamapps\common\Hearts of Iron IV\history\countries)

Place your leader portrait into SOV or whatever folder is within "leaders", and you're done! Simply launch up the game with your mod enabledand see your portrait!



Step 3 (for changing leader names/traits):

Create a second folder named "history" within your mod file and create another folder named "countries" within the aforementioned "history" folder and copy/paste the corresponding country file from C:\Program Files (x86)\Steam\steamapps\common\Hearts of Iron IV\history\countries.

It should look something like this:



Open up the country document and scroll down to the leader you want to modify.



Rename the leader to whatever you want here, add any traits you wish and save the document.



Now you can play the mod!

The final product:

Adding a Leader (Pre-1.11)
Adding a leader to the game is very simple. Follow the previous steps in creating a portrait and creating the "gfx" and "history" folders. Once you get to the country document, copy one of the pre-existing leaders, preferably from their own leader type and paste them below. Here's a picture of the German country file from my Inglorious Basterds Spy Pack:



Notice that Hans' portrait directory is different from the other spies. This is the custom directory to get a custom image for a leader. Simply copy and paste this and fill on the appropriate information in order to have a custom portrait for your custom leader!

portrait_path = "gfx/leaders/GER/portrait_hans_landa.dds"

That's pretty much it for adding a new leader.
Editing Portraits for Workshop Mods (Legacy/NSB)
I've gotten quite a few questions regarding how to change the portraits for total overhaul mods such as Kaiserreich or Red Flood. For a while I never really looked into it and just assumed you followed the same process as modding the base game. As it turns out there is a slight change you need to make.

In order to change a portrait or change any of the files in a preexisting mod, we're going to need to edit the descriptor.mod file within your mod folder. Open up the file using your preferred text editing software and add:

dependencies = { "Mod Name" }

The "Mod Name" should be whatever the mod is called in the workshop, so Red Flood for example would be:

dependencies = { "Red Flood" }

Adding this to the descriptor file will tell the game to override the main mod with whatever files are in your mod. Note that the changes you can make using this method are not limited to editing portraits, ANY file that you add can be used to change a total conversion mod to however you like , so have fun adding the Japanese Empire to Old World Blues!

Conclusion
I hope you found this guide helpful, and are able to create new portraits for Hearts of Iron!

Please make sure to leave any feedback, errors, and anything that you find to be unclear in this guide in the comments below and I will try to get back to you!

Enjoy the wonders of portrait modding!
63 Kommentare
Swisher 19. Juli 2023 um 14:16 
Can't change soviet image
the_neutral_man 25. Apr. 2023 um 16:26 
The steps described in Replacing Portraits for 1.11+ section worked perfectly for me, but strangely enough this only seems to work when running the mod off local files. Despite having the exact same size, the steam version uploaded to the workshop of my name & portrait edit just does not work at all, and I'm honestly dumbfounded since it's both the exact same files. Any clue what could be wrong?
Milk_Man 2. Feb. 2023 um 5:12 
So, I am changing the names of leaders in the localization files, however, I don't see any name changes in-game. Should I follow the steps for adding new leaders, but instead of adding information, I replace some?
Fghost 8. Jan. 2023 um 3:38 
I replaced a portrait in "ukrainian state redux" mod, my game now crashes.
Crimson_Nomad  [Autor] 25. Nov. 2022 um 21:42 
@NateB5, Where did you change the name to emmy?
NateB5 25. Nov. 2022 um 18:21 
i tried to change Hitlers name to "emmy" but ingame it just says GER_adolf_hitler ? any answers
poop_fart_yum 12. Nov. 2022 um 14:38 
do you know how to change the flag? i changed the tga files but they come up as black in-game, any idea why?
poop_fart_yum 12. Nov. 2022 um 14:31 
@Crimson_Nomad ok thankyou!!
Crimson_Nomad  [Autor] 12. Nov. 2022 um 14:15 
@zubbyi Paradox has a fun habit of making things tedious for modders. I need to clarify that some leaders have their names in the localisation file. However, other characters have their names defined in the character files. It's kind of a mess, but both methods work for adding names, so just do whatever is easiest for you.
poop_fart_yum 12. Nov. 2022 um 13:42 
@Crimson_Nomad thanks it worked, but i am confused as you said to change it in the localisation folder? should i also change then in common/characters?