• 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.
In events/country_events.txt:

ship_event {
id and bla
bla
bla
immediate = {
solar_system = {
spawn_system = {
min_distance = 20
max_distance = 50
initializer = "some_system_initializer"
}
}
}
}

where some_system_initializer is the solar system initializer of your choice, examples of which can be found in common/solar_system_initializers.

Hope this helps.
 
Seems that spawn_system (it would be nice to see the exact code of the function ~_~) actually creates a new system... from what I can see (and it's a bit hard for me to understand for certain), depending on the scope it's run on, it creates a nearby system using whatever system initializer and with a min/max distance. However... I don't see any spawn_planet or other spawn function that might be used to create planets.

Is there a way to save everything in a system and perhaps respawn it with desired additions? Somehow I doubt it.. and it would probably break things :(