• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

__Dwaine__

Montjoie ! Saint-Denis !
20 Badges
Jan 3, 2011
38
40
  • Victoria 2: A House Divided
  • Tyranny: Archon Edition
  • Crusader Kings II
  • Victoria 2
  • Magicka
  • Leviathan: Warships
  • Europa Universalis IV
  • Europa Universalis III Complete
  • Dungeonland
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • The Showdown Effect
  • Warlock: Master of the Arcane
  • War of the Roses
  • 500k Club
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Cities: Skylines
I just finished to do my own flags and wished to share what I learned and show how to do it yourself. It's a very easy endeavor, and probably a good start if you want to mod, the results are immediate and need no debuging whatsoever. I found the wiki informations to be somewhat misleading and severly lacking, so here is mine!

Let's start.


1) Create your mod

There are many advantages to add flags through a mod folder instead of tempering with the steam folder. Let’s start by using the handy mod creator in the game launcher, give it a name a directory (I beg you, don’t use a common name like “flags” "flags++" or “better_flags”, use your imagination, for the purpose of this tuto, we will create the mod “Exotic Flag” and we will name the folder “exotic_flag”), tag it for “Graphics” and we are done, hit the “create mod” button.

Now go to Documents\Paradox Interactive\Stellaris\mod\exotic_flag folder. Create a “flags” folder, create a subfolder, this will be the new category where the flag will appear, give it a name, here we will use “Exotic”, once that is done, inside this folder create 2 new folders: “Map” and “Small”.

Recap :
  • Exotic_Flag\mod\flags\Exotic
    Here will be stored the flags in DDS format, the standard size is 128x128, they’ll be used for almost every screens.
    Dnw9Y88.png
  • Exotic_Flag\mod\flags\Exotic\Map
    Here will be stored the flags in DDS format, the standard size is 256x256, they’ll be used for the galaxy view.
    NZ7ZxM6.png
  • Exotic_Flag\mod\flags\Exotic\Small
    Here will be stored the flags in DDS format, the standard size is 24x24, they’ll be used for the little icons near the planet, fleets or bases.
    oPicrLs.png

Note : PLEASE don’t use the original categories, namely “blocky”, “domination”, “human”, “ornate”, “paradox”, “pirate”, “pointy”, “special”, “spherical”, “zoological”, or this may cause unexpected behavior, namely your flags appearing for random empires and causing save game issues. More to that later.


2) Create your flag

Now the most time consuming part, the flag creation itself, you can use many software on the market, free or not. I personally use GIMP but here is a list of software:

  • Free:
    GIMP: the free reference of graphic manipulation, a plug in is necessary for DDS Support.
    Paint.NET: a solid alternative and a powerful tool.
    Photofiltre: a good soft to start, easy to use and pretty powerful. Good for a novice, but limited.
    MS Paint: Best used for Polandball.
    bQjO8ke.png

  • Paid:
    Photoshop: THE reference, but overwhelming for a novice and outrageously expensive.
  • Other:
    Waifu algorithm: it’s an algorithm that is used to enlarge comic pictures by using the so called neural network method, it’s surprisingly effective and do a better job than most specialized soft. If you have an pic that needs to be uscaled, use it.
    DDS converter 1.4: found this handy tool for batch processing png to DDS, but can"t save uncompresed, use DXT5, but this is a bit lossy nonetheless.

I’ll use Gimp from now on.
We need the DDS plug in for GIMP:
For 64 bits: Link to Google API
For 32 bits: Link to Google API
If you have doubts, use 32 bits.

Let’s start with the empire flag, make it 512x512, better start big and then downscale to save quality.
File -> New -> 512 width and 512 height, advanced option, “fill with” choose white.
Take the pencil tool, increase the size and paint the whole thing in black, and then switch to white and start making the shape of your flag. NO other color than pure black and pure white for now.
TwfquMo.png

We will make a round flag, for that, the ellipse tool is the best (Tips: press shift to have a perfect round when doing the selection), use it to make a circle and start painting the area in white.
odqOYjD.png

We will add some more details, like more round shapes on the right side, by alternating circle selections with black and white painting, we arrive to this:
Uj4yDsQ.png

We just finished the alpha channel aka transparent layer. Now create a new layer, fill it with white.
n4PJxUm.png

Now to gradient color, we will have to determine the foreground color and the background color. It’s the 2 rectangles in the left bar, put the foreground color to RGB: 209,208,185 and the background color to RGB: 120,93,15. Drag from top to bottom to create the gradient color.
eXDobnz.png

lxnmnt9.png

You can also do it from right to left, from top right to bottom left, do it as you like.
We will have to use something called a mask layer, we first have to create it, righ click on the gradient layer and chose "Add Layer Mask" and click add.
yak1J8a.png

Now, select our black & white layer we created at the start, CTRL+C to copy it, the select the white layer right next to our gradient (the layer mask) and CTRL+V to paste it, right click on the floating layer and anchor it. If it worked well, here is the result (don’t forget to hide the black & white pic by click on the eye next to it):
WqQSFj1.png

Good, this is starting to look good. We have a, emblem with transparency and a gradient color mimicing the paradox style. The final touch is the borders. That’s where we use the “select by color” tool. Use it to select the white area of the mask layer. It should select the border like this:
Srbm9k6.png

Go to “Select” -> “Border” Use 3 minimum and up to 8 for 512x512, find what suits you the best, make sure you have “Feather Border” checked.
Y2VU0FP.png

Select the layer (NOT the mask), go to “Colors”, select “Brightness-Contrast” and play with it, you can use the presets I used. This will alter the borders to simulate a border. We’re almost done!
JjdRp7W.png

My advice: Save it as a PNG right now, it’s always useful to have a backup, so File -> Export as -> Exotic01-backup.png, ignore options and export. It’ll your backup. put it somewhere safe.

Comparison:
gsjBksx.png
Close Enough!
Let’s scale the pic, so image -> Scale Image -> 128x128 -> Scale.

S1kZhiI.png
We now have our empire flag! Delete everything Except the layer with our flag:
EM7OIEi.png

Once this is done, File -> Export as -> Exotic01.dds; no compression, no mipmaps; save it in Exotic_Flag\mod\flags\exotic. IF there is ANY error message, make sure there is only ONE layer!
3VdCUhD.png

Now do the previous steps for the small flag, scale it to 24x24 and export it as a DDS in Exotic_Flag\mod\flags\exotic\Small. Export it with the same name as above.

Finally, we have to do the galaxy flag, open the 512x512 backup and open the “Contrast-Brightness” once more, put the brightness and the contrast to max, and boom, we have our galaxy map, scale it to 256x256 and export it as a DDS in Exotic_Flag\mod\flags\exotic\Map.
YBZ6wpN.png

We’re done! Remember, the name of the flags across the 3 folders MUST BE THE SAME. Otherwise the game won’t be able to link them.
To sum up :
Exotic01.dds (256x256) in "Exotic_Flag\mod\flags\exotic\Map", completely white.
Exotic01.dds (128x128) in "Exotic_Flag\mod\flags\exotic", colored.
Exotic01.dds (24x24) in "Exotic_Flag\mod\flags\exotic\Small", colored.


3) Put the final touches

Your mod is done and is working, but …… it’s not localized and the flag will be used for the random empires. Let’s put the final touches to polish it. Can't complain about unfinished games if you don't polish your own work.

- First, the usage.txt file that should be located in Exotic_Flag\mod\flags\Exotic:

There are two parameters:

random: This determine if the flags in the category will be used when the game create random empires. The problem is save game compatibilities.
show_in_designer: This determine if the flags in the category should be visible when creating custom empires.​

By default, if you don’t create the file, the game will read this:

Code:
random = yes
show_in_designer = yes

If you want to change that, then you’ll have to create the usage.txt file and change it as you see fit.
I advice this :

Code:
random = no
show_in_designer = yes

- Secondly, the localization. You have a very ugly “FLAG_CATEGORY_Exotic” category ingame, this where localization files are used.
I9GMEVp.png

In the root folder of your mod, create a “localization” folder, it should be right next to the “flags” folder.

Start your usual editor, notepad will suffice, but Notepad++ is the reference, Sublime Text is also a very good tool. Paste this:

Code:
l_english:
FLAG_CATEGORY_exotic:0 "Exotic"

Explanation:
Code:
l_*language*:
FLAG_CATEGORY_*Name of the category folder*:0 *The name you want to give to the category*
Save it as *Whatever you want*_l_english.yml, here it will be Exotic_l_english.yml, encode as UTF8-BOM and we’re done. If you're courageous, you should do that for other languages or they'll have the ugly "FLAG_CATEGORY_Exotic" too.
Warning : the name of the category folder IS CASE SENSITIVE.

Finished !

Io2YTam.png

A note on the compatibilities.

I suggest to NOT use the random function. Doing so will cause the game to use the new flags in galaxy creation. If the mod is deactivated, the custom backgrounds and flags will be replaced by nothing, effectively crippling the save game where it’s used. Nothing game breaking, but definitely an annoyance.

If you’re reading this paradox, it’ll be cool if the game when loading the save and realizing it’s calling for non-existent flags, to replace them with random ones. Just an idea.




You'll find attached to this post the Flag mod, you can use it as a base for doing your own if you want !
If you have questions, I'll try to answer them.
 

Attachments

  • ExoticFlag.zip
    130 KB · Views: 5
  • 2
  • 1
Reactions:

Conqueristo

Captain
91 Badges
Feb 7, 2001
384
53
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Call to arms event
  • Heir to the Throne
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Res Publica
  • Victoria 2: A House Divided
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Pre-order
  • Stellaris: Synthetic Dawn
  • Cities in Motion
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Conquest of Paradise
  • A Game of Dwarves
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Deus Vult
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Stellaris: Humanoids Species Pack
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • 500k Club
  • Crusader Kings II: Conclave
  • Stellaris: Digital Anniversary Edition
  • Victoria 2
  • Stellaris: Galaxy Edition
  • Victoria 3 Sign Up
  • Crusader Kings II: Way of Life
  • Hearts of Iron IV Sign-up
  • Europa Universalis IV: El Dorado
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Field Marshal
This is so good, I think we should sticky it!
 
  • 1
Reactions: