• 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.

Merkury90

First Lieutenant
20 Badges
Aug 3, 2016
222
2
  • Stellaris: Galaxy Edition
  • Stellaris: Synthetic Dawn
  • Stellaris: Apocalypse
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Prison Architect
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Humanoids Species Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Stellaris: Distant Stars Pre-Order
  • Crusader Kings II
Well, the title doesn't sound too good but I didn't know how to put it other way.

I have been trying to make a little cheaty mod for myself that would allow me to spawn special systems around my empire. The idea is I select a star/planet in a specific system, put event name.1 into console and then I have menu that allows me to select what special system I want to spawn.

However I got into trouble during testing because almost every time when I spawn more than 1 system, the other one is spawned exactly in the same spot as previous one making it impossible to access one or another depending which system has longer name...

I tried playing with min/max distance and number of jumps and it does not want to work...
When I use console command effect spawn_system (...) every system is spawned with some distance from other systems.

Here is a part of my file with events.
I will be much obliged for any help because I have really run out of ideas...

Main menu window
Code:
country_event = {
    id = systems.10
    title = systems.10.name
    desc = systems.10.desc
    picture = GFX_evt_archaeological_dig
    is_triggered_only = yes

    option = {
            name = systems.10.a
        country_event = { id = systems.20 }
    }

    option = {
            name = systems.10.b
        country_event = { id = systems.30 }
    }

    option = {
            name = systems.10.c
        country_event = { id = systems.40 }
    }

    option = {
            name = systems.10.d
        country_event = { id = systems.50 }
    }

    option = {
            name = systems.10.e
        country_event = { id = systems.60 }
    }

    option = {
        name = systems.exit
    }
}

Enclave Systems Spawner
Code:
country_event = {
    id = systems.20
    title = systems.20.name
    desc = systems.20.desc
    picture = GFX_evt_archaeological_dig
    is_triggered_only = yes

    #Spawn Artists
    option = {
            name = systems.20.a
        country_event = { id = systems.200 }
    }

    #Spawn Curators
    option = {
            name = systems.20.b
        country_event = { id = systems.201 }
    }

    #Spawn Traders
    option = {
            name = systems.20.c
        country_event = { id = systems.202 }
    }

    option = {
        name = systems.return
        country_event = { id = systems.10 }
    }
}

Events responsible for spawning selected system
Code:
country_event = {
    id = systems.200
    hide_window = yes
    is_triggered_only = yes
 
    immediate = {
        solar_system = {
            spawn_system = {
                min_distance = 20
                max_distance = 50
                initializer = "guardians_artist_init_01"
            }
        }
    }
}

country_event = {
    id = systems.201
    hide_window = yes
    is_triggered_only = yes
 
    immediate = {
        solar_system = {
            spawn_system = {
                min_distance = 20
                max_distance = 50
                initializer = "guardians_curator_init_01"
            }
        }
    }
}

country_event = {
    id = systems.202
    hide_window = yes
    is_triggered_only = yes
 
    immediate = {
        solar_system = {
            spawn_system = {
                min_distance = 20
                max_distance = 50
                initializer = "guardians_trader_init_01"
            }
        }
    }
}

//Edit
I uploaded screen shot which shows two system stuck upon each other. One is Fen Habbanis (FL home system) and second is called Bintu and contains relic world with rubricator dig site.
 

Attachments

  • screen.png
    screen.png
    969 KB · Views: 4
Last edited:

LogicSequence

Lightwave Alien
25 Badges
Sep 25, 2006
452
10
  • Stellaris: Humanoids Species Pack
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Age of Wonders: Planetfall - Revelations
  • Stellaris: Lithoids
  • Age of Wonders: Planetfall
  • Stellaris: Ancient Relics
  • Surviving Mars: First Colony Edition
  • Stellaris: Megacorp
  • Surviving Mars: First Colony Edition
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Ancient Space
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris
  • Cities: Skylines - After Dark
  • Cities: Skylines
  • Magicka
  • Crusader Kings II
Use separate events and use the orientation angle keys to determine an angle arc from the source that the system will spawn in.

Code:
spawn_system = {
    min_distance >= 20
    max_distance <= 30
    min_orientation_angle = 25
    max_orientation_angle = 50
    initializer = "my_system_init"
}
 

Merkury90

First Lieutenant
20 Badges
Aug 3, 2016
222
2
  • Stellaris: Galaxy Edition
  • Stellaris: Synthetic Dawn
  • Stellaris: Apocalypse
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Prison Architect
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Humanoids Species Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Stellaris: Distant Stars Pre-Order
  • Crusader Kings II
Use separate events (...)
What exactly do you mean by separate events if I may ask?
Should I not use menu style options to select which event triggers?

//Edit
Adding orientation parameter did not help so far :<

//Edit 2
When I call spawning event (200+) directly, not through my menu, everything seems to work fine.
So it is like this main event is attached to one specific set of placement rules and always puts systems in the same exact spot...
 

Attachments

  • screen.png
    screen.png
    1 MB · Views: 1
Last edited:

LogicSequence

Lightwave Alien
25 Badges
Sep 25, 2006
452
10
  • Stellaris: Humanoids Species Pack
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Age of Wonders: Planetfall - Revelations
  • Stellaris: Lithoids
  • Age of Wonders: Planetfall
  • Stellaris: Ancient Relics
  • Surviving Mars: First Colony Edition
  • Stellaris: Megacorp
  • Surviving Mars: First Colony Edition
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Ancient Space
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris
  • Cities: Skylines - After Dark
  • Cities: Skylines
  • Magicka
  • Crusader Kings II
What exactly do you mean by separate events if I may ask?
Should I not use menu style options to select which event triggers?

//Edit
Adding orientation parameter did not help so far :<

//Edit 2
When I call spawning event (200+) directly, not through my menu, everything seems to work fine.
So it is like this main event is attached to one specific set of placement rules and always puts systems in the same exact spot...

Well for one thing you're not scoped properly as far as i can see. If you want to spawn new systems you have to scope to a specific system (be it random or otherwise), right now you're calling a country event which is scoped to (i'm assuming your) country and just saying solar_system, so the game doesn't know what solar system. If you want them to spawn say around your capital system, you'd want to fire the country event and then scope the spawn_system to it.

Code:
country_event = {
    id = systems.201
    hide_window = yes
    is_triggered_only = yes

    immediate = {
        capital_scope.solar_system = {
            spawn_system = {
                min_distance >= 20
                max_distance <= 30
                min_orientation_angle = 25
                max_orientation_angle = 50
                initializer = "my_system_init"
            }
        }
    }
}


Or if you don't want to use the DMS method:

Code:
country_event = {
    id = systems.201
    hide_window = yes
    is_triggered_only = yes

    immediate = {
        capital_scope = {
            solar_system = {
                spawn_system = {
                    min_distance >= 20
                    max_distance <= 30
                    min_orientation_angle = 25
                    max_orientation_angle = 50
                    initializer = "my_system_init"
                }
            }
        }
    }
}


The main thing is you have to scope to a specific solar system to spawn off of, it could even be something like:

Code:
random_system = {
    limit = { has_star_flag = my_spawn_system }
    spawn_system = {
        min_distance >= 20
        max_distance <= 30
        min_orientation_angle = 25
        max_orientation_angle = 50
        initializer = "my_system_init"
    }
}


In your current version you say spawn from a solar system, but don't tell it which one, so the game is working with incomplete parameters; which is, i'd guess, what is causing it to FUBAR the placement.

P.S.
capital_scope = your empire's capital planet, so you're saying start from your capital planet, then go to the solar system it's in, and then spawn a system from that location. So in summation, since it's a country event it's going: my country > my capital planet > it's solar system > spawn off of this.
 
Last edited:

Merkury90

First Lieutenant
20 Badges
Aug 3, 2016
222
2
  • Stellaris: Galaxy Edition
  • Stellaris: Synthetic Dawn
  • Stellaris: Apocalypse
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Prison Architect
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Humanoids Species Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Stellaris: Distant Stars Pre-Order
  • Crusader Kings II
This is very informative and helpful, thank you.

However, after modifying my event according to your advice (adding capital_scope) systems are still spawned on top of each other when I select them from event menu.
My idea was I can enter a system, select planet/star in such system and then run an event that will spawn whatever I want nearby said system. It is more or less working when I use direct call to event that spawns them but when I select an option from pop-up menu everything is spawned in the same place.

I am attaching my entire event file - maybe there is something else missing ;x

//Edit
Something like that also didn't do the trick:
Code:
event_target:spawner_target.solar_system = {
            spawn_system = {
                min_distance >= 20
                max_distance <= 30
                min_orientation_angle = 10
                max_orientation_angle = 320
                max_jumps = 0
                initializer = "guardians_artist_init_01"
            }
}
When I select system A and run the event, new system is spawned correctly one jump away.
I select system B and do the same - everything works fine.
However when I go back to system A or run the event one more time from system B the new system is spawned on top of the first one...
random_system_within_border also doesn't work for the same system twice... It looks like for some strange reason game is randomizing exactly the same values for position of newly created system.
 

Attachments

  • systems_events.txt
    17,3 KB · Views: 4
Last edited:

LogicSequence

Lightwave Alien
25 Badges
Sep 25, 2006
452
10
  • Stellaris: Humanoids Species Pack
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Age of Wonders: Planetfall - Revelations
  • Stellaris: Lithoids
  • Age of Wonders: Planetfall
  • Stellaris: Ancient Relics
  • Surviving Mars: First Colony Edition
  • Stellaris: Megacorp
  • Surviving Mars: First Colony Edition
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Ancient Space
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris
  • Cities: Skylines - After Dark
  • Cities: Skylines
  • Magicka
  • Crusader Kings II
Well for one you do realize all these systems you're attempting to spawn have a max limit set that you are trying to exceed when spawning. If you haven't overwritten the system initializers themselves to change this i don't event know how you're getting them to spawn at all because the error log is specifically telling me "FU you can't spawn it b/c there's already too many of those systems". So if you've not overwritten the initializers or made new ones to change that and have somehow found a bugged way of spawning the systems there's no telling what errors could creep in. I'd need to see your full mod structure to tell, but if you're just running this single event set then it's not going to work that way. You're going to have to mod other things to get it to work. It's all doable, it just depends on your skill level and if you have the time to do it.
 

LogicSequence

Lightwave Alien
25 Badges
Sep 25, 2006
452
10
  • Stellaris: Humanoids Species Pack
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Age of Wonders: Planetfall - Revelations
  • Stellaris: Lithoids
  • Age of Wonders: Planetfall
  • Stellaris: Ancient Relics
  • Surviving Mars: First Colony Edition
  • Stellaris: Megacorp
  • Surviving Mars: First Colony Edition
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Ancient Space
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris
  • Cities: Skylines - After Dark
  • Cities: Skylines
  • Magicka
  • Crusader Kings II
Ok so here are your corrected events. To use this you will need to select a planet in a system you want to spawn off of, and open the debug console and run the first first event:

[Select Planet] >>> hit ` >>> type event systems.target >>> hit `

Then call your main menu event. But remember you have to reset the planet target each time you want to change the system you're spawning off of by following the directions above.

Now for your work: you're going to have to go to EVERY system initializer used in the events and rewrite them to increase their max instances while ALSO adding a modifier to prevent the game from naturally spawning more than it's supposed to.

P.S.
You also had a few commenting errors as well. Things that should have been commented out weren't, and some where half commented then continued on another line without a comment flag. This too, can cause any number of errors. I'd recommend at least using Notepad++ with a language file for Stellaris syntax, you can find them in this forum. This will help avoid problems like that by letting you clearly see where syntax errors are.
 

Attachments

  • systems.txt
    16,3 KB · Views: 7
Last edited:

Merkury90

First Lieutenant
20 Badges
Aug 3, 2016
222
2
  • Stellaris: Galaxy Edition
  • Stellaris: Synthetic Dawn
  • Stellaris: Apocalypse
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Prison Architect
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Humanoids Species Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Stellaris: Distant Stars Pre-Order
  • Crusader Kings II
Ok so here are your corrected events. To use this you will need to select a planet in a system you want to spawn off of, and open the debug console and run the first first event:

[Select Planet] >>> hit ` >>> type event systems.target >>> hit `

Then call your main menu event. But remember you have to reset the planet target each time you want to change the system you're spawning off of by following the directions above.

Now for your work: you're going to have to go to EVERY system initializer used in the events and rewrite them to increase their max instances while ALSO adding a modifier to prevent the game from naturally spawning more than it's supposed to.

Thank you very much!
I compared your file and mine and man had I messed up ;x

But know I have a little better understanding how it has to look should I decide to make something more in the future.
Didn't realize some small mistakes can make such a problem as spawning systemes in exactly the same place.

You were a great help, thank you once again!

//Edit
About the initializers - I know more or less how they work and I'm preparing my own systems that are not allowed to be spawn by the game itself. What I made was just a test if it can work like I would like it to. Apparently it didn't before your input into this matter ;)