Hearts of Iron IV Guide

How to make a good leader portrait in HOI4 for Hearts of Iron IV

How to make a good leader portrait in HOI4

Overview

Ever wanted to make a good-looking leader portrait? Now you can! Well, not now, but after you read this guide. If you want to make something that looks at least kinda close to vanilla portraits after 5 minutes in GIMP, look no further.

Tools needed

  • GIMP or Photoshop
  • Paint.NET, or anything that saves .dds files (optional)
  • A good text editor, such as Notepad++ or Atom
  • An image
  • Hearts of Iron IV

You’ll only need Paint.NET if you don’t have the GIMP .dds plugin. I’ll be using GIMP in this guide, but Photoshop should have similar tools.

Making the background

First off, you’ll need a background for your leader. There are ones that you can get online (places like r/hoi4modding), but here we’ll be making our own. It’ll only take three steps, so it’s not gonna be super detailed.

Make an image that measures 156×210 pixels (width x height).

Now, for that gradient, use #5D5C4D for the dark green and #E9E4D5 for the off-white. Use the gradient tool, and play around with it until you get something that looks like this.
You can make the darker green more or less prominent if you like. Now we’re done with the background! It’s as easy as conquering Europe with console commands.

Now, for this next part, get your leader image ready. It can be whatever you want, but this next section will deal with colorizing black-and-white pictures. It’ll still be really easy, I swear. I’ll be using a picture of Iraqi leader Rashid Ali al-Gaylani, which I actually need for a mod I’m working on, so I’ll be killing two birds with one stone here.

Colorizing your leader

Colorizing can be a time-intensive and confusing process for someone who’s never done it before. But not to worry, because we can do it all online! That’s right, just head on over to [link] and put an image URL in the box. Let it load and you’ll have your AI-colored picture.

Click the “download colorized image” link and get your image. You’ll notice from the picture that it adds a watermark in the corner, so if it’s too obtrusive you might want to put your picture in your image editor and add another 50-ish pixels of height before you colorize.

Get your colorized leader and put it in your image editor, because now it’s time to put this portrait together.

Making the portrait

All right, now it’s portrait-making time. Use the free select tool to, well, select your leader.

Copy and paste him or her into the background, and adjust the size and positioning until it looks good enough. Remember to paste it into a new layer! If you don’t, the filters that’ll be used after this will also apply to the background.

So once you’ve gotten it looking good enough, go to Filters > Blur > Selective Gaussian Blur…

…and apply it.

Fiddle with the radius and delta until you’ve got it looking just slightly blurred, and the edges and shadows are still distinguishable. Next up, go to Filters > Edge-Detect > Edge…

Now, don’t change anything on the window that shows up. Your leader looks like a demonic hellspawn, right? Good! Thankfully we won’t be keeping them like this for long.

Head on over to Edit > Fade Edge…

Now, choose whichever mode you like (I prefer to use Subtract) and adjust the opacity as necessary. You should aim to at most have it at the point just before it starts to look bad.

Next up, we’re almost done and it’s time for our last filter. Go to Filters > Enhance > Sharpen (Unsharp Mask)…

Here, you can fiddle with these settings as much as you want. High radius and low amount? Sure. Low radius and high amount? Why not? Do whatever you want, as long as you think it looks good. If you want to make something deep-fried, go for a high amount and radius.

And now we’re done with the editing! Merge the layers together and save/export. If you can save it as a .dds right now, go ahead and skip the next section. But, I’m a brainlet and never figured out how to install the damn .dds plugin, so I’ll export it as a .tga file.

Saving the portrait as a .dds

If you need to, now’s the time to open up Paint.NET. Navigate to whatever folder in which you saved your portrait, and open it.

Now, just save it as a .dds in the correct folder. No more editing needed.

When saving, make sure to select A8R8G8B8 and turn Generate Mip Maps off.

And you’re done, and now we can apply it to the game.

Adding the portrait into HOI4

Obligatory reminder to not edit the actual game files. Always make changes in your mod folders!
All right, so first thing to do is, if you haven’t already, get the history file of the country whose leader you want to change and copy it into your mod’s historycountries folder. Scroll down until you see the country’s leaders (which are usually right after the part that sets the parties’ popularity values and ruling party). On the leader whose portrait you want to change, change the “picture” value to your portrait’s location, in quotes. For example, I would change it to

picture = “gfx/leaders/IRQ/Portrait_Iraq_Rashid_Ali_al-Gaylani.dds”


And that’s it! You’ve successfully made a custom leader portrait. But now you should check if it was successfully added into the game. Start up a new game and play as the country that you just changed. Use the set_ruling_party console command if you have to. If it doesn’t show, check if you’ve either accidentally misspelled the filename, or saved it with the right settings.

SteamSolo.com