Stellaris

Stellaris

70 ratings
How to set up an Origin
By Cheesemongle
This is a short guide to create an Origin. For this guide i will assume that you, the reader, have created a mod using Stellaris' mod tools.

Applications used: Notepad++ or another text editor, and an image editor that can open .dds files.
This guide uses Visual Studio Code, and GIMP.
2
   
Award
Favorite
Favorited
Unfavorite
> Create the Origin itself
Inside your main mod folder, create 4 folders. Name them "common", "gfx", "interface" and "localisation" (s, not z). Your mod files should look like this



Now to create the Origin itself. Inside the "common" folder, create the "governments" folder, and the "civics" folder inside of that.



Then, inside of the "civics" folder, open up your text editor of choice and create a .txt file. Name it whatever you want, the game will read it anyway.

Inside of it:

Footnote: last bit is outdated - to make a civic or origin completely unusuable by the AI, use `ai_playable = { always = no }` in place of the random weight.

Most of the code is the same as any old Civic, but as for the parts that are important:



You can kind of guess what these do. Keep an eye on "picture", this is where you will put your GFX_event_picture later on.


Also this will be the "effects" the origin shows. More in localisation section
> Create the Origin's graphics (thumbnail)
In the "gfx" folder, create the folders "event_pictures", and "interface".



First we want a nice looking thumbnail for the origin. Inside the "event_pictures" folder, create the "origins" folder.



Using GIMP or literally any other program that can export .dds files, create the picture for the Origin and place it in the folder. The image should be 218x114 pixels in size.
Here's one i prepared earlier:


(hot tip: shift cmd E to export a file, make sure to select .dds or change the file extension to it)

After that is all done and good, we have to declare it using a .gfx file.

In your main mod folder, go to the "interface" folder and create a .gfx file inside of it.



Inside of it:


"name" should be the same as the GFX_event_picture in the Origins file
"texturefile" should refer to the actual .dds thumbnail image.
I'm not entirely sure what "alwaystransparent = yes" does, but it seems like it's required

Feel free to add as many spriteType declares in the spriteTypes list as you need.
> Create the Origin's graphics (icon)
In the "gfx/interface" folder, create the folder "icons", then "origins" inside of that.



With your IESOC (image editing software of choice), create the icon for the Origin. It should be 40x40px. Here is the base Origin icon, if you like: icon_blank[i.ibb.co]
Here's the one i prepared earlier:


Then just place that .dds image inside the folder.
> Localisation

This file needs to be named with l_english or l_otherlanguage to the end of the file name, and it needs to be a .yml file encoded in UFT-8-BOM.

Inside of it:


(If your software is unable to transfer file encodings for whatever reason it would be a good idea to copy a locales file from stellaris and rename and edit to your desire)
> Afterwards...


Remember, this is the BARE MINIMUM for creating an Origin. You'll have to add in any parts you want the Origin to do, like a civic. To check for an origin, use "has_origin", just like you'd use "has_civic", or "has_valid_civic"

Thank u for reading. If you have any thoughts or things i may have missed, comment below
68 Comments
Nosnek199 28 Oct, 2023 @ 2:34pm 
bit of a necropost, but does anyone have a template mod for this?
Cheesemongle  [author] 18 Jun, 2023 @ 9:48pm 
When you save the file there should be an encoding selection at the bottom of the menu
Default is UFT-8
Mei_was_taken 18 Jun, 2023 @ 1:51pm 
"and that it is encoded in UFT-8-BOM." how do you choose how to encode it? I'm using windows built in text editor
bbt104 9 Apr, 2023 @ 10:20pm 
@Risk of Santa 2 @Cheesemongle

I figured out the issue with the picture not showing up, you need to pull the "interface" folder and its contents out of gfx and have it in the main folder with next to gfx. Im betting Risk of Santa 2 was doing the same thing as me and putting the .gfx file into the gfx/interface folder.
Risker the 34th 28 Jan, 2023 @ 3:16pm 
Ya, i don't understand what the issue is. As a temp fix i ended up just reusing some of the other origin images.
Cheesemongle  [author] 28 Jan, 2023 @ 2:36pm 
That should be fine, but it still doesn't work? Hrm...
Risker the 34th 28 Jan, 2023 @ 8:11am 
this is what the origin looks like



origin_spqr = {
is_origin = yes
icon = "gfx/interface/icons/origins/origins_hegemon.dds"
picture = GFX_origin_republic
max_once_global = yes
Risker the 34th 28 Jan, 2023 @ 7:40am 
is there any sort of compression or anything that should be applied? When i export it i leave the compression to none and the format to default.
Cheesemongle  [author] 27 Jan, 2023 @ 10:27pm 
If the origin itself uses GFX_origin_republic correctly then i have to assume somethings wrong with the .dds file itself, can try re-exporting or similar
Risker the 34th 27 Jan, 2023 @ 9:33pm 
I copy and pasted the origin_republic.dds from the file itself in the origins folder so it should be the exact same as the name of the file.