Stellaris

Stellaris

Sosik's Ancient Worlds (OP Origin)
MegaPoggy 3 Jan, 2024 @ 2:29pm
How to spawn inside the galaxy
So in the old version, systems were added by "spawning" them after the game starts. This creates the weird borders issues as theyre added on top of the map. What we want is to spawn them in place of their neighbors. This is done in the same 'sosik_system' initializer:
At the end of the file under the last planet add:
planet = {
name = "Tryd"
class = "pc_broken"
orbit_distance = 35
orbit_angle = { min = 90 max = 270 }
flags = { ignore_startup_effect }
size = 9
has_ring = no
modifiers = none
deposit_blockers = none

init_effect = {
save_event_target_as = sosik_nexus_planet
clear_deposits = yes
add_deposit = d_minerals_10
}
}
neighbor_system = {
hyperlane_jumps = { min = 1 max = 1 }
min_distance >= 10
max_distance <= 30
initializer = sosik_resource
}
neighbor_system = {
hyperlane_jumps = { min = 1 max = 1 }
min_distance >= 10
max_distance <= 30
initializer = sosik_industry
}
neighbor_system = {
hyperlane_jumps = { min = 1 max = 1 }
min_distance >= 10
max_distance <= 30
initializer = sosik_black_hole
}
etc. do this for each additional system. the problem with this method is your origin has 6 systems and most spawns dont have 6 hyperlanes. If the game doesnt have enough hyperlanes, it just wont spawn the system this way. To counter this, i connect some systems 1 more jump away, and then fudge the hyperlanes later. Add a few systems(like the fortress one) with:
hyperlane_jumps = { min = 1 max = 2 }
close out the file and youre done with this part. The last step is we need a unique 'flag' to for this initializer. we use this later for making hyperlanes. i chose to call this one "sosik_home". each initializer will need something different from the others so you can call back to it. Anything else in this file that messes with hyperlanes can get deleted.
Every other initializer will get its new flag, as well as:
init_effect = {
every_neighbor_system = {
set_star_flag = empire_cluster
remove_hyperlane = { from = this to = prev }
}
}
This isolates each system. i chose NOT to do this to 'fortress' in order to keep that one gateway system with the guardian connected to the rest of the galaxy.

Lastly we need to add an event and an onaction to call to it. onaction looks like this:
on_press_begin = {
events = {
sosik_event.2
sosik_event.99 #this one is mine
}
}
i added 99 as my hyerperlane creating event. Im using on_press_begin because on_game_start didnt seem to work for me. this is slightly messier but honestly, you wont notice most likely.
The event we need to add looks like this:
country_event = {
id = sosik_event.99
hide_window = yes
is_triggered_only = yes
fire_only_once = yes
immediate = {
# tag systems
random_system = {
limit = {
has_star_flag = sosik_resource
}
save_global_event_target_as = sosik_resource
}
random_system = {
limit = {
has_star_flag = sosik_home
}
save_global_event_target_as = sosik_home
}
etc. repeating for each system and their unique flag. this is followed by in the same action:
# add hyperlanes
event_target:sosik_home = {
add_hyperlane = {
from = event_target:sosik_home
to = event_target:sosik_resource
}
}
event_target:sosik_home = {
add_hyperlane = {
from = event_target:sosik_home
to = event_target:sosik_industry
}
}
etc. repeating for every hyperlane we're trying to draw. close up the event wth brackets and thats it.
< >
Showing 1-1 of 1 comments
Starr 4 Jan, 2024 @ 6:20am 
absolute lifesaver, just installed this mod :c_hurry::c_hurry:
ty
< >
Showing 1-1 of 1 comments
Per page: 1530 50