Hi
I am making a mod that changes the game so you will get more stars and empires in the center of the galaxy, and then fewer and fewer. Currently it looks like this:
As you can see it does indeed generate a ton of stars in the core and fewer in the mid and outer rim. I would have preferred to have the core still be empty as in vanilla Stellaris, but the galaxy generation only allows me to change the distribution of stars inside or outside the core. Therefore I have to put stars inside the core to have any variation. If anyone here knows how to change this please feel free to help.
The next step is getting more empires to spawn in the middle. This does not seem to be possible via the galaxy generation files, so my best idea is to do it via an event. However I am horrible at this. My current, not working, script looks like this:
Currently it does nothing when triggered ingame.
My goal for the event is:
1. Run automatically on startup.
2. First check every star within the core, if they have a colonizable planet and not owned the event should spawn a randomly generated empire (flag, name, species, civics, etc.) in every second system.
3. Then check the mid rim and do the same with every fourth system
4. Finally the same but in the outer rim and every sixth system.
(though this might not be necessary as there are more planets in the core anyways, so the density might be fine)
So my big hurdle is figuring out how to spawn AI empires by event. Any help here would be much appreciated.
I am making a mod that changes the game so you will get more stars and empires in the center of the galaxy, and then fewer and fewer. Currently it looks like this:

As you can see it does indeed generate a ton of stars in the core and fewer in the mid and outer rim. I would have preferred to have the core still be empty as in vanilla Stellaris, but the galaxy generation only allows me to change the distribution of stars inside or outside the core. Therefore I have to put stars inside the core to have any variation. If anyone here knows how to change this please feel free to help.
The next step is getting more empires to spawn in the middle. This does not seem to be possible via the galaxy generation files, so my best idea is to do it via an event. However I am horrible at this. My current, not working, script looks like this:
Code:
namespace = GG
event = {
id = GG.1
hide_window = yes
is_triggered_only yes
immediate = {
every_system = {
limit = {
distance_to_core_percent > 60
distance_to_core_percent < 80
NOR = {
exists = owner
is_star_class
}
}
every_system_planet = {
limit = {
not = { exists = owner }
is_colonizable = no
OR = {
is_planet_class = pc_barren
is_planet_class = pc_barren_cold
}
}
create_country = {
name = <string/random>
adjective = <string>
contact_rule = <string>
type = <key>
auto_delete = <bool>
name_list = <key>
ship_prefix = <string>
authority = <key>
civics = random / { civic = <key> civic = random }
species = <target>
flag = <random / { icon = { category = <key> file = <filename.dds> } background = { category = <key> file = <filename.dds> } colors = { <key> <key> } }
ethos = <random / { ethic = <key> ethic = <key> }>
restrictions = { <restrictions, see "common\governments\readme_requirements.txt"> }
effect = { <effects executed on country> }
}
}
}
}
}
Currently it does nothing when triggered ingame.
My goal for the event is:
1. Run automatically on startup.
2. First check every star within the core, if they have a colonizable planet and not owned the event should spawn a randomly generated empire (flag, name, species, civics, etc.) in every second system.
3. Then check the mid rim and do the same with every fourth system
4. Finally the same but in the outer rim and every sixth system.
(though this might not be necessary as there are more planets in the core anyways, so the density might be fine)
So my big hurdle is figuring out how to spawn AI empires by event. Any help here would be much appreciated.
Last edited: