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

HFY

The Only Cosmological Constant is Change
28 Badges
May 15, 2016
12.760
30.910
  • Cities: Skylines - Green Cities
  • Victoria 3 Sign Up
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Cities: Skylines - Campus
  • Stellaris: Megacorp
  • Cities: Skylines Industries
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Ancient Space
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Mass Transit
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Pillars of Eternity
  • Cities: Skylines
I want to make some extragalactic clusters which have wormhole exits that are not close to each other.

What's the best way to do so?

Can I chain distance limits? e.g.:

Code:
save_global_event_target_as = cluster_exit_01 # when creating wormhole #1
Code:
           limit { # later, when creating exit #4
                distance = { source = event_target:cluster_exit_01 min_jumps = 20 }
                distance = { source = event_target:cluster_exit_02 min_jumps = 20 }
                distance = { source = event_target:cluster_exit_03 min_jumps = 20 }
                # ...
          }

Or do I need to put a flag on every system within N jumps of the previous exits?

Or something else?

Thanks!
 
I want to make some extragalactic clusters which have wormhole exits that are not close to each other.

What's the best way to do so?

Can I chain distance limits? e.g.:

Code:
save_global_event_target_as = cluster_exit_01 # when creating wormhole #1
Code:
           limit { # later, when creating exit #4
                distance = { source = event_target:cluster_exit_01 min_jumps = 20 }
                distance = { source = event_target:cluster_exit_02 min_jumps = 20 }
                distance = { source = event_target:cluster_exit_03 min_jumps = 20 }
                # ...
          }

Or do I need to put a flag on every system within N jumps of the previous exits?

Or something else?

Thanks!
Your code will work, but you also have to include max_jumps and type = hyperlane parameters. Also, you will be hard-pressed to find a suitable system with three points of reference as far as 20 jumps away, unless they are literally next to each other on a large galaxy. Test it on a shorter distance first.

Stellaris Modding Den
 
  • 1
Reactions:
Your code will work, but you also have to include max_jumps and type = hyperlane parameters. Also, you will be hard-pressed to find a suitable system with three points of reference as far as 20 jumps away, unless they are literally next to each other on a large galaxy. Test it on a shorter distance first.

Is there an example of how I can figure out a reasonable scale factor for galaxy size & connectivity?

Ideally the 4 points would exist in different quadrants of the galaxy, not being too close to each other, but yes as you say what "too close" means is going to vary with galaxy generation choices.

I tried this and it was okay on even a Medium (600 star) galaxy:

Code:
# one of them
			save_global_event_target_as = cluster_exit_01

# second one
				distance = { source = event_target:cluster_exit_01 min_jumps = 15 max_jumps = 20}

# third one
				distance = { source = event_target:cluster_exit_01 min_jumps = 30 max_jumps = 60}

... but I'd really like to do something smarter.
 
You could do some magic with Variables. Like, count the systems in the galaxy, do <some math> with it, and then use that variable to generate dynamic values for min_jumps and max_jumps.

Bonus-points for accounting for Hyperlane density via:
Code:
check_galaxy_setup_value - Checks the value for a specific option from the galaxy setup
check_galaxy_setup_value = { setting = <string> value >=< <float>/<variable> }
possible values: num_empires, num_advanced_empires, num_fallen_empires, num_marauder_empires, mid_game_year, end_game_year, victory_year, num_guaranteed_colonies, num_gateways, num_wormhole_pairs, num_hyperlanes, habitable_worlds_scale, primitive_worlds_scale, crisis_strength_scale, tech_costs_scale
Supported Scopes: all


Or you could keep it very simple and use the precursor-clusters for a decent average outcome, since they are spread around the galaxy. They can overlap though, so the result will not be ideal. Still, doesn't get much easier to create a system that will generally generate acceptable results, and the "odd" outcomes where things don't generate too well may still create interesting gameplay.
 
  • 1Like
Reactions:
You could do some magic with Variables. Like, count the systems in the galaxy, do <some math> with it, and then use that variable to generate dynamic values for min_jumps and max_jumps.

Bonus-points for accounting for Hyperlane density via:
Code:
check_galaxy_setup_value - Checks the value for a specific option from the galaxy setup
check_galaxy_setup_value = { setting = <string> value >=< <float>/<variable> }
possible values: num_empires, num_advanced_empires, num_fallen_empires, num_marauder_empires, mid_game_year, end_game_year, victory_year, num_guaranteed_colonies, num_gateways, num_wormhole_pairs, num_hyperlanes, habitable_worlds_scale, primitive_worlds_scale, crisis_strength_scale, tech_costs_scale
Supported Scopes: all


Or you could keep it very simple and use the precursor-clusters for a decent average outcome, since they are spread around the galaxy. They can overlap though, so the result will not be ideal. Still, doesn't get much easier to create a system that will generally generate acceptable results, and the "odd" outcomes where things don't generate too well may still create interesting gameplay.
This is pretty good, but it can be even better!

Code:
get_galaxy_setup_value - Copies a value from the galaxy setup into a variable, optionally scaling it by an int value
get_galaxy_setup_value = { which = <string> setting = <string> [ scale_by = <float> ] }
possible values: num_empires, num_advanced_empires, num_fallen_empires, num_marauder_empires, mid_game_year, end_game_year, victory_year, num_guaranteed_colonies, num_gateways, num_wormhole_pairs, num_hyperlanes, habitable_worlds_scale, primitive_worlds_scale, crisis_strength_scale, tech_costs_scale
Supported Scopes: all
 
  • 1Like
  • 1
Reactions:
How do I do that?
There's a simple trigger for it:

Code:
num_galaxy_systems - Checks number of star systems in the galaxy
num_galaxy_systems > 400
Supported Scopes: all

In case you weren't aware, you can find these things in:
Paradox Interactive\Stellaris\logs\script_documentation

That's pretty much the library of things you can do in script, and a few keyword searches will almost always lead you to what you're trying to do if it's possible.
 
  • 1
Reactions:
Thanks, that gets me started on finding a scale factor.

Ah my amortized graph traversal homework from decades ago is coming back to haunt me...
 
There is a condition for checking the galaxy size setting directly.
galaxy_size = tiny/small/medium/large/huge

By default a list of conditions will be AND'ed, meaning they all have to be true at the same time to pass. The way you are doing it would be fine, although you should probably check simply the linear distance instead of number of jumps. The default wormholes are kept at a minimum distance with simply the following check.
Code:
distance = {
    source = prev
    min_distance >= 500
}
I'm not sure exactly what the galactic units are but this is not scaled by galaxy size. The event is id=game_start.31 in events\game_start.txt
 
  • 1Like
Reactions: