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

CylonBunny

Recruit
19 Badges
Jul 15, 2013
1
0
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Crusader Kings II
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Field Marshal
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Pre-order
  • Cities: Skylines
I am creating a mod with a custom starting solar system that should have four custom neighbor systems.

My testing seems to suggest that neighbor_system doesn't actually create a system, rather it just checks to see if there is a system within the min and max distance and changes it. This is close to what I want, but I'd rather be able to state exactly how far away the neighbor systems are, or at the very least guarantee they spawn.

Is there a way to do this? Could an event be used to add new systems?
 
I am creating a mod with a custom starting solar system that should have four custom neighbor systems.

My testing seems to suggest that neighbor_system doesn't actually create a system, rather it just checks to see if there is a system within the min and max distance and changes it. This is close to what I want, but I'd rather be able to state exactly how far away the neighbor systems are, or at the very least guarantee they spawn.

Is there a way to do this? Could an event be used to add new systems?

If you look at the Sol system example, it seems like it works better if you make a neighbor, and then in that neighbor make another neighbor.

if you want to be certain the stars spawn, it might be better to make a cluster or have a couple spawn_system calls and make the stars yourself.

If you are making a static galaxy, it is pretty easy to specify exactly where each star goes. I haven't figured out how to position a new star as an offset of the current star, if the main star is in a random location. You may also be able to use an event and have a call something like:
Code:
event = {
    id = whatever_you_want
    on_trigger_only = yes
    trigger = condition

    immediate = {
        spawn_system = {
            initializer = "your_init_script"
            distance = 5           
            # or:
            distance = { min = 5 max = 15 }
         }
    }

and just make all the neighboring systems you want that way.

or: whatever_you_want = yes to trigger the event, if that was the id for it.
 
Last edited: