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.
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 :
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.
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:
I’ll use Gimp from now on.
We need the DDS plug in for GIMP:
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.
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.
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:
We just finished the alpha channel aka transparent layer. Now create a new layer, fill it with white.
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.
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.
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):
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:
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.
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!
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:
Close Enough!
Let’s scale the pic, so image -> Scale Image -> 128x128 -> Scale.
We now have our empire flag! Delete everything Except the layer with our flag:
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!
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.
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.
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:
By default, if you don’t create the file, the game will read this:
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 :
- Secondly, the localization. You have a very ugly “FLAG_CATEGORY_Exotic” category ingame, this where localization files are used.
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:
Explanation:
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 !
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.
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.
- 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.
- 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.
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.
- 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:
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.
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.
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:
We just finished the alpha channel aka transparent layer. Now create a new layer, fill it with white.
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.
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.
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):
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:
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.
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!
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:
Let’s scale the pic, so image -> Scale Image -> 128x128 -> Scale.
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!
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.
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.
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.
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*
Warning : the name of the category folder IS CASE SENSITIVE.
Finished !
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
- 2
- 1