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.
You are using an out of date browser. It may not display this or other websites correctly. You should upgrade or use an alternative browser.
I have been thinking about creating some custom starting systems; however, I cannot find any guides for how to make them, either for starting options for custom empires or randomly-occurring ones for the game itself. Is there a guide currently online for how to mod starting systems?
If there is no such guide currently available, can somebody who has figured it out post one in this forum?
Also, it would be helpful if it mentioned how to set the chance that a system would appear, both for use with new systems and to change it for stuff like "Sanctuary".
I would also like to know! This would be really helpful to me. The example file gets me going in the right direction but it's still fairly vague on the details and tricks...
A good place to start is the example.txt file in the common/solar system initializers folder, it explains almost everything.
As far as the chance for them to appear it's all odds based so the chance to appear is based on the total usage_odds of all potential candidates. For example, if you have 5 systems and they all have a usage_odds of 20 that means they each have a 20% chance to appear but if you have 10 systems and they all have a usage_odds of 20 they only have a 10% chance to appear. This means you will need to increase the odds of some special systems if you add a lot of new custom systems, for instance the black hole system has a default usage_odds of 2 so it's infrequent with the standard files and will become even less frequent if you add more systems into the mix. This makes it hard to do multiple changes without having to touch all of the default files and alter some usage odds.
The other thing to remember is that you'll mainly be working with four types of systems based on their defined usage:
The first is no defined usage which means the system will not be used unless specifically called by a trigger. A good example of this is the neighbor systems used in the empire_initializers.txt or the AI revolt systems triggered by an event.
The next is custom_empire, this is used for places like SOL and Deneb which you can find in prescripted_species_systems.txt
Third are the empire_init systems used for random starts, they're all in empire_initializers.txt
Finally you have misc_system_init and this is used for just about everything else. This includes all of the empty systems in the galaxy as well as all of the starting "hostile" systems and those with primitive species. Essentially if it's placed when the map is generated and it isn't an empire starting systems it's probably using misc_system_init.
Now, there are some cool tricks you can try. You can limit the number of a specific system definition, "Sanctuary" is a perfect example of this:
The crazy high usage_odds mean it will always pass the odds check, max_instances limits it to only allow 1 in this case (you can use higher numbers) and then spawn_chance becomes a literal chance to appear rather than trying to balance the usage_odds over a ton of system types. Unfortunately we can only use fixed values, so nothing really cool like setting max_instances of a drone system to equal the number of starting empires in your game, at least if there is a way to do that none of my attempts have worked.
Most of the default systems use a lot of random settings but you don't have to. They have a random star class orbited by random planet types with random moons. But, you can define exactly which star or planet class you want or you can limit it to colonizable or non-colonizable planet classes. I used this to control the frequency of habitable planets and make sure that no system had more than one. I also use fixed system inits per star class so I have different solar system layouts based on the star class rather than the default method which uses the same inits for all star classes and relies on the planet class definitions to control frequency a limit planet types by star class.
Well, that was longer than planned... and sorry it's not really a guide but hopefully it will get you off to a good start.
I'll use this system I put together as an example and forgive me if some of what I post seem obvious. I just want to cover as much as I can from what I learnt while making these.
First, the name if the file in your mod folder should be something that will place it alphabetically after the the existing files (eg prefix with 'z_'). This is so when creating a custom empire, it will be placed after "Sol" and "Deneb" when selecting your starting system. This is not strictly a requirement, it's just for the sake of neatness.
Code:
@distance = 30
This is used at the end in for
Code:
neighbor_system = {
distance = { min = 10 max = @distance }
initializer = "neighbour_system_toltec"
}
to determine how close neighbour systems will be placed.
@base_moon_distance
is used for placing moons around planets fairly uniformly like this, but it's used for randomly generated systems.
Code:
planet = {
orbit_distance = 20
count = { min = 1 max = 4 }
change_orbit = @base_moon_distance
moon = {
count = { min = 0 max = 1 }
orbit_angle = { min = 90 max = 270 }
orbit_distance = 5
}
}
Starting the system with this
Code:
ringworld_dead_system = {
Here you must make a unique name for your system
Code:
name = "Abyss"
All these lines can be anything and localization is not required.
Code:
class = "sc_m"
Sets the background for your system, the 'stellar glow' applied to all stellar objects and what icon is used on the galatic map. This code can be selected from "common\star_classes\00_star_classes.txt"
Code:
asteroids_distance = 100
Sets the distance for the asteroid belt. Note you can only have one of these.
For this section which applies to all planetary objects
Code:
class = "pc_black_hole"
The planetary objects used here can be found in "common\planet_classes\00_planet_classes.txt".
Normally you would use "class = star" which would use the planet class determined by "class = "sc_m"".
But you can use a different class here to generate stars with different colours or specific backgrounds.
Code:
entity = "black_hole_entity"
This line isn't required unless you're placing a star different from "class = "sc_m""
Code:
orbit_distance = 0
This sets the orbital distance from the previous orbiter. In this case, it's 0 meaning the star at the centre of the system.
I've found 40 for the first planet and 20 for each other planet is a good start. Don't forget your asteroids in the belt.
Using orbit_distance = 0 can also be used to place orbiters in the same orbit (eg twin earths) or asteroids in the belt.
Code:
orbit_angle = 0
This isn't required for the star unless you want your starting world to always be in the same orbital position. Assuming you've used fixed orbit angles for inner planets. The starting angle for "orbit_angle" would be at 90° assuming 0° is at the top. Then planets are moved anti-clockwise from the previous orbiter.
Code:
size = 20
This is the size of the stellar body. Generally cosmetic except for habitable planets where it determines the number of tiles.
That's all so far, it's late and I'll type up more tomorrow.
planet = {
name = "Primary"
class = "pc_gas_giant"
orbit_distance = 55
orbit_angle = 90
size = 20
has_ring = no
moon = {
name = "One"
class = "pc_frozen"
size = 10
orbit_distance = 10
has_ring = no
}
moon = {
name = "Two"
class = "pc_frozen"
size = 10
orbit_distance = 10
has_ring = no
}
These are placed much the same way as planets with one difference. Their "orbit_angle =" is inherited from the primary for the first moon and each successive moon from the previous moon. In the one above it's 90.
Using normal map directions, N(top), S(bottom), E(right) and W(left).
If the primary orbit_angle is 0, Both "One" and "Two" would be at 'E'.
If the primary orbit_angle is 45, "One" would be at NE and "Two" at N.
If the primary orbit_angle is 90(like the above example), "One" would be at N and "Two" at W.
If the primary orbit_angle is 135, "One" would be at NW and "Two" at S.
If the primary orbit_angle is 180, "One" would be at W and "Two" at E.
And so on.
This is also the purpose of that size 1 asteroid "Udr" in my system above. It's used so I can adjust the orbit angle of the secondary star without changing the angles of the orbiting moons or changing the orbit_angle of the larger asteroids. It makes sense to me and I'm not sure how to explain it.
"Outer" is another size 1 asteroid, but is used to move the FTL border further out. Asteroids don't have a ring showing their orbit. Once both of these are surveyed, they disappear into the background since they are set to have no anomalies or resources.
Next specifics beginning with this section "init_effect =" which is used to add specific things to each planet.
Probably obvious, "prevent_anomaly = yes" is used to prevent anomalies on planets. In the case above, it ensures an anomaly can't spawn and replace the resouce specified, which can happen.
When a system is generated, anomalies and resources are randomly added. You need to use "clear_deposits = yes" otherwise those random resources which also spawn will combine with placed resources. You could for example get both Engos gas and Pitharian dust on a toxic planet.
Code:
add_deposit = d_dark_matter_deposit
These values are found in "common\deposits\00_deposits.txt"
Code:
modifiers = none
This removes any randomly placed modifiers. To place a modifier, you use "add_modifier" inside an "init_effect = {" section like this -
These values for habitable planets are found in "common\static_modifiers\00_static_modifiers.txt" in the section "Generated Planet Modifiers". You could use the others, but I haven't done any testing for them. "days = -1" makes this modifier permanent. Note also that you can't place planetary modifiers on planets in your capital system due to an event in "events\game_start.txt" which removes them. This one -
These sections allow you to specify all the tile resources.
Code:
limit = { has_blocker = no has_building = no }
set_blocker = "tb_failing_infrastructure"
Note that these two lines are needed as "random_tile =" will place resources anywhere, even on previously placed resources and you can end up with a mess unless stopped by "limit =".
"set_blocker" values are found in "common\tile_blockers\00_tile_blockers.txt"
You can use any tile blocker, but some are scripted and in some cases unremoveable.
"set_building" values are found in "common\buildings\00_buildings.txt"
Again, you can use any building, but I don't know the effect of placing special buildings.
The values for "resource =" are found in "common\strategic_resources\00_strategic_resources.txt"
I haven't done any testing with adding strategic resources to tiles.
As I mentioned previously, resources are randomly generated everywhere so you will need "replace = yes" or placed resources will be combined with the generated ones.
To add multiple resources on a tile, it's done like this