After the release of Stellaris I decided to challenge myself with building a map of the Star Wars galaxy, which slowly turned into the learning experience of making a full mod. I've come a long way, thanks to a lot of help from other modders and the various tools hidden around. I've had a few people ask advice for various things, although I'm far from an expert, I figured I'd share my knowledge for any people that might not know where to start. This guide is both me sharing my processes and meant to help organise the resources I've found whether in the wiki or the forums for easy access.
If you are a modder, feel free to post things you feel should be added or tips and tricks you have learned.
________________________________________________________
Useful Links
Making Your First Mod: A Guide For Primitives
This guide will take you over the steps of setting up your mod folder, image and getting it into the workshop.
Stellaris Wiki: Modding
The wiki page that goes over a number of different elements for modding and has links to a variety of other information on modding for the game from the Maya Exporter to Defines.
Stellaris Wiki: Species Modding
This article is about creating new species to add in addition to the ones already in Stellaris. It covers the processes of portrait design, folder arrangement and more.
Paradox's Rules for Mods
Thread by the devs about rules regarding modding the game.
Notepad++
A free and easy to use notepad that makes writing and editing code infinitely easier.
Stellaris Notepad++ Syntax
A compiled Stellaris Syntax Highlighting file for Notepad++
A Guide to Stellaris Modding
________________________________________________________
Contents
0-Introductory Tips and Tricks
1-Building a Custom Galaxy
2-Empires & Static Spawns
3-Events
4-Loading Screens and other Interface Modding
5-Music
6-Models
________________________________________________________
0-Introductory Tips and Tricks
1-Building A Custom Galaxy
________________________________________________________
Making the Map (1.3)
What drove me to start this was Retalyx's map generator, a wonderful tool, which I gave a try for a while when I started. But, I soon learned that if I had wanted to make a galaxy with over a thousand systems, it would be too difficult and accurately positioning a thousand planets by hand is simply insane. Asking around, I was invited by the great group of modders at STNW to ask questions and their map maker Osito gave me plenty of useful advice that set the base for my map.
Before I start, I'll go over how to actually create the map base. Below you'll see the difference between the normal RNG Stellaris map generator file and the custom galaxy one I've built. Note the differences in the starting code. An important note is that maps have a maximum grid size of 1000x1000.
For my own map, I used an Excel spreadsheet, taking atlas coordinates and converted them so they could be used within the 1000x1000 size of the Stellaris maps. I inputted the x and y coordinates and used it to build the code I would use. By the end I would get something like this:
Not only did this save me time, but it kept it organised for easy adjustments that were needed. I started off with about 2000 systems and as I built the hyperlanes, I went through the process of removing non iconic/essential planets not found on the hyperlane routes. It took hours of looking at the map in game with my spreadsheet and code on the side, deleting planets that were sitting around and ensuring all the planets were connected. Eventually some will not be connected, such as Rakata Prime, but for a basic map I wanted everything to be usable lest someone spawns there randomly and is stuck.
Issues
It took me hours of playing around with code and bug fixing, and I ran into my fair share of issues.
Game crashing on map load because of broken hyperlane code
Often my game would crash because my hyperlane code was broken, usually because I misplaced a number and ended up with it outside of the brackets or with a classic "".
Spawning on random planets or black holes
Though my planets were all positioned nicely, my empires would spawn on random barren worlds or even a black hole once. POPs didn't seem to happy living on a Toxic world. This was fixed by adding in an event on startup that turned the capital of the empire into its ideal planet class. Which led to the next problem.
Preferred planet with no buildings
Although I got the ideal class working, no buildings were spawning. (Though space stations and such seemed to work) To fix this, I used another event on startup to spawn random tile blockers and buildings on the homeworld.
Planet Sizes
Another issue was the planet size was that of the original planet they spawned on. I put in code that added tiles for those who had smaller planets.
Randomly generated AI renaming planets
This is apparently a bug no one has been able to crack, I thought I fixed it by removing the homeworld and home system names from the name_lists, but it just makes it blank.
Sol and Other Special Systems Spawning
Sol always like to force himself into the galaxy, and I fixed that by removing the game.start.1 and .2 from triggering. To remove spawns like Sanctuary, I changed it so the chance of occurrence was 0.
FEs not spawning
Another problem with the random empire generator, they also don't seem to like static galaxies.
Going from 2000 to 1000
This was time consuming, perhaps the most because I had to scour through the galaxy atlas and sources to decide what planets had no info on them or were simply too cluttered. Often times I just deleted clusters and such because there was not enough space on the map.
Hyperlanes by hand, making them with confusing code
I had to build the hyperlane routes by hand, with a large amount of add_hyperlane = { from = "y" to = "x" } which will have to be organised better once I add in initializers.
If you are a modder, feel free to post things you feel should be added or tips and tricks you have learned.
________________________________________________________
Useful Links
Making Your First Mod: A Guide For Primitives
This guide will take you over the steps of setting up your mod folder, image and getting it into the workshop.
Stellaris Wiki: Modding
The wiki page that goes over a number of different elements for modding and has links to a variety of other information on modding for the game from the Maya Exporter to Defines.
Stellaris Wiki: Species Modding
This article is about creating new species to add in addition to the ones already in Stellaris. It covers the processes of portrait design, folder arrangement and more.
Paradox's Rules for Mods
Thread by the devs about rules regarding modding the game.
Notepad++
A free and easy to use notepad that makes writing and editing code infinitely easier.
Stellaris Notepad++ Syntax
A compiled Stellaris Syntax Highlighting file for Notepad++
A Guide to Stellaris Modding
________________________________________________________
Contents
0-Introductory Tips and Tricks
1-Building a Custom Galaxy
2-Empires & Static Spawns
3-Events
4-Loading Screens and other Interface Modding
5-Music
6-Models
________________________________________________________
0-Introductory Tips and Tricks
- When it comes to modding in things that aren't hard coded in Stellaris files, such as techs, ethos, etc. Do your best to make your own files rather than overwrite base files. This is to help avoid conflicts with other mods.
- Keep your files organised, if you're working with larger mods especially it helps to have naming conventions like XYZ_ethics or whatever works for you.
- Never replace or edit files in your actual Stellaris folder, copy/paste the file you want to change and put it into your mod folder. Playing with original files is a recipe for disaster.
1-Building A Custom Galaxy
________________________________________________________
Making the Map (1.3)
What drove me to start this was Retalyx's map generator, a wonderful tool, which I gave a try for a while when I started. But, I soon learned that if I had wanted to make a galaxy with over a thousand systems, it would be too difficult and accurately positioning a thousand planets by hand is simply insane. Asking around, I was invited by the great group of modders at STNW to ask questions and their map maker Osito gave me plenty of useful advice that set the base for my map.
Before I start, I'll go over how to actually create the map base. Below you'll see the difference between the normal RNG Stellaris map generator file and the custom galaxy one I've built. Note the differences in the starting code. An important note is that maps have a maximum grid size of 1000x1000.
static_galaxy_scenario = { }
#This is used as the outer code bracket for your galaxy, everything will go in this.
name = "X"
#The name of your galaxy
priority = 0
#priority decides in which order the scenarios are listed
default = yes/no
#This determines if your map is the default pick during game setup
num_empires = { min = X max = X }
#limits how many empires players can choose to spawn
num_empire_default = X
#This determines the default amount of empires at game setup
fallen_empire_default = X
#This determines the default amount of Fallen empires at game setup
fallen_empire_max = X
#limits the maximum of Fallen Empires that can spawn
advanced_empire_default = X
#This determines the default amount of advanced empires at game setup
colonizable_planet_odds = X
#Determines that default for the odds of colonization planets
random_hyperlanes = yes/no
#Do you want the game generate random hyperlanes?
num_nebulas = X
#Number of nebulas spawned
nebula_size = X
#Size of Nebulas
nebula_min_dist = X
#Distance between nebulas
#This is used as the outer code bracket for your galaxy, everything will go in this.
name = "X"
#The name of your galaxy
priority = 0
#priority decides in which order the scenarios are listed
default = yes/no
#This determines if your map is the default pick during game setup
num_empires = { min = X max = X }
#limits how many empires players can choose to spawn
num_empire_default = X
#This determines the default amount of empires at game setup
fallen_empire_default = X
#This determines the default amount of Fallen empires at game setup
fallen_empire_max = X
#limits the maximum of Fallen Empires that can spawn
advanced_empire_default = X
#This determines the default amount of advanced empires at game setup
colonizable_planet_odds = X
#Determines that default for the odds of colonization planets
random_hyperlanes = yes/no
#Do you want the game generate random hyperlanes?
num_nebulas = X
#Number of nebulas spawned
nebula_size = X
#Size of Nebulas
nebula_min_dist = X
#Distance between nebulas
For my own map, I used an Excel spreadsheet, taking atlas coordinates and converted them so they could be used within the 1000x1000 size of the Stellaris maps. I inputted the x and y coordinates and used it to build the code I would use. By the end I would get something like this:
system = { id = "1" name = "Arami" position = { x = -351 y = 161 } [Initializer will go here]}
Not only did this save me time, but it kept it organised for easy adjustments that were needed. I started off with about 2000 systems and as I built the hyperlanes, I went through the process of removing non iconic/essential planets not found on the hyperlane routes. It took hours of looking at the map in game with my spreadsheet and code on the side, deleting planets that were sitting around and ensuring all the planets were connected. Eventually some will not be connected, such as Rakata Prime, but for a basic map I wanted everything to be usable lest someone spawns there randomly and is stuck.
Issues
It took me hours of playing around with code and bug fixing, and I ran into my fair share of issues.
Game crashing on map load because of broken hyperlane code
Often my game would crash because my hyperlane code was broken, usually because I misplaced a number and ended up with it outside of the brackets or with a classic "".
Spawning on random planets or black holes
Though my planets were all positioned nicely, my empires would spawn on random barren worlds or even a black hole once. POPs didn't seem to happy living on a Toxic world. This was fixed by adding in an event on startup that turned the capital of the empire into its ideal planet class. Which led to the next problem.
Preferred planet with no buildings
Although I got the ideal class working, no buildings were spawning. (Though space stations and such seemed to work) To fix this, I used another event on startup to spawn random tile blockers and buildings on the homeworld.
Planet Sizes
Another issue was the planet size was that of the original planet they spawned on. I put in code that added tiles for those who had smaller planets.
Randomly generated AI renaming planets
This is apparently a bug no one has been able to crack, I thought I fixed it by removing the homeworld and home system names from the name_lists, but it just makes it blank.
Sol and Other Special Systems Spawning
Sol always like to force himself into the galaxy, and I fixed that by removing the game.start.1 and .2 from triggering. To remove spawns like Sanctuary, I changed it so the chance of occurrence was 0.
FEs not spawning
Another problem with the random empire generator, they also don't seem to like static galaxies.
Going from 2000 to 1000
This was time consuming, perhaps the most because I had to scour through the galaxy atlas and sources to decide what planets had no info on them or were simply too cluttered. Often times I just deleted clusters and such because there was not enough space on the map.
Hyperlanes by hand, making them with confusing code
I had to build the hyperlane routes by hand, with a large amount of add_hyperlane = { from = "y" to = "x" } which will have to be organised better once I add in initializers.
Last edited:
- 2