Okay, well I think I've officially run out of ideas on this one and would really appreciate another set of eyes. The idea here is to use be able to use the console to spawn a new system that has a pre-FTL civilization in it.
Basically, I created a new events file called system_events in steamapps\common\Stellaris\events that is supposed to allow me to select a star system as a target, then call special_systems_initializers to spawn a new system off of it that contains a pre-FTL civilization with modifiers I've already set.
system_events
Modified Section of special_system_initializers
When I run the events in the console, the GUI window for creating the new system pops up, but no system is created. My best guess is that the galaxy is at its star limit, and thus won't allow another system to be created, but I can't figure out how to either delete a system or increase the limit without letting the game create the extra system at game start. It's been a long time since I've done this much programming, so it's possible that I'm fundamentally misunderstanding how this works.
It's also worth mentioning that I don't need to create another system to be happy. If there's an easier way to create this civ in a pre-existing system, I'd certainly be open to that option. I just want to be able to put them in a system of my choosing.
P.S. The code to create the civilization was written by ColCainMcbert and posted in the thread entitled "Is it possible to create primitive civilizations via console commands?" I tried to link to the thread for context and also because I don't want to take credit for their work, but my account is too new.
Basically, I created a new events file called system_events in steamapps\common\Stellaris\events that is supposed to allow me to select a star system as a target, then call special_systems_initializers to spawn a new system off of it that contains a pre-FTL civilization with modifiers I've already set.
system_events
Code:
#Creating New Systems
namespace = systems
planet_event = {
id = systems.target
hide_window = yes
is_triggered_only = yes
immediate = {
save_global_event_target_as = systems_target
}
}
# Planet Creator
country_event = {
id = systems.2
title = "Planet Creator"
desc = "Creates New Systems"
picture = GFX_evt_towel
location = from
show_sound = event_mystic_reveal
is_triggered_only = yes
option = {
name = "New System"
immediate = {
event_target:systems_target.solar_system = {
spawn_system = {
min_distance = 20
max_distance = 50
initializer = "special_init_10"
}
}
}
option = {
name = "Cancel"
}
}
Code:
# Primitive Civilizations
special_init_10 = {
class = "rl_standard_stars"
usage = misc_system_init
usage_odds = 0
flags = { primitive_system }
planet = {
count = 1
class = star
orbit_distance = 0
orbit_angle = 1
size = { min = 20 max = 30 }
has_ring = no
}
change_orbit = 20
planet = {
orbit_distance = 20
count = { min = 0 max = 3 }
}
change_orbit = 20
planet = {
count = 1
orbit_distance = 0
class = "rl_habitable_normal"
orbit_angle = { min = 90 max = 270 }
size = { min = 12 max = 25 }
#tile_blockers = none
init_effect = {
prevent_anomaly = yes
random_list = {
# Medieval Civilization
50 = {
create_species = {
name = "Krogan"
class = "REP"
portrait = "REP14"
homeworld = THIS
traits = {
trait = "trait_strong"
trait = "trait_rapid_breeders"
trait = "trait_fleeting"
}
}
create_country = {
name = random
authority = random
civics = {
civic = civic_landed_nobility
civic = civic_flat_world_theory
}
species = last_created
ethos = random
flag = {
icon = {
category = "special"
file = "primitive.dds"
}
background= {
category = "backgrounds"
file = "new_dawn.dds"
}
colors={
"turquoise"
"green"
"null"
"null"
}
}
type = primitive
}
last_created_country = {
set_graphical_culture = preindustrial_01
random_list = {
20 = {
set_country_flag = late_medieval_age
set_primitive_age = late_medieval_age
change_country_flag = {
icon = {
category = "special"
file = "primitive.dds"
}
background= {
category = "backgrounds"
file = "new_dawn.dds"
}
colors={
"light_blue"
"blue"
"null"
"null"
}
}
}
}
}
create_colony = {
owner = last_created_country
species = last_created
ethos = owner
}
random_tile = {
limit = {
has_blocker = no
has_grown_pop = no
has_growing_pop = no
}
create_pop = {
species = last_created
}
}
if = {
limit = {
last_created_country = {
OR = {
has_country_flag = steam_age
has_country_flag = renaissance_age
}
}
}
random_tile = {
limit = {
has_blocker = no
has_grown_pop = no
has_growing_pop = no
}
create_pop = {
species = last_created
}
}
}
random_tile = {
limit = { has_building = "building_colony_shelter" }
remove_building = yes
}
while = {
count = 2
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_farm"
add_resource = {
resource = food
amount = 1
replace = yes
}
}
}
if = {
limit = {
last_created_country = {
has_country_flag = stone_age
}
}
every_tile = {
limit = {
has_building = "building_primitive_farm"
}
remove_building = yes
}
}
if = {
limit = {
last_created_country = {
OR = {
has_country_flag = iron_age
has_country_flag = late_medieval_age
has_country_flag = renaissance_age
has_country_flag = steam_age
}
}
}
random_tile = {
limit = {
has_blocker = no
has_grown_pop = no
has_growing_pop = no
}
create_pop = {
species = last_created
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_farm"
add_resource = {
resource = food
amount = 1
replace = yes
}
}
}
if = {
limit = {
last_created_country = {
OR = {
has_country_flag = steam_age
has_country_flag = renaissance_age
}
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_farm"
add_resource = {
resource = food
amount = 1
replace = yes
}
}
}
if = {
limit = {
last_created_country = {
has_country_flag = steam_age
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_factory"
add_resource = {
resource = minerals
amount = 1
replace = yes
}
}
}
last_created_country = {
if = {
limit = { has_country_flag = stone_age }
PREV = {
create_army = {
name = "NAME_Primitive_Army"
owner = last_created
species = last_created
type = "primitive_army"
}
}
break = yes
}
if = {
limit = { has_country_flag = bronze_age }
PREV = {
create_army = {
name = "NAME_Primitive_Army"
owner = last_created
species = last_created
type = "primitive_army"
}
}
break = yes
}
if = {
limit = { has_country_flag = iron_age }
PREV = {
while = {
count = 2
create_army = {
name = "NAME_Primitive_Army"
owner = last_created
species = last_created
type = "primitive_army"
}
}
}
break = yes
}
if = {
limit = { has_country_flag = late_medieval_age }
PREV = {
while = {
count = 3
create_army = {
name = "NAME_Primitive_Army"
owner = last_created
species = last_created
type = "primitive_army"
}
}
}
break = yes
}
if = {
limit = { has_country_flag = renaissance_age }
PREV = {
while = {
count = 4
create_army = {
name = "NAME_Primitive_Army"
owner = last_created
species = last_created
type = "primitive_army"
}
}
}
break = yes
}
if = {
limit = { has_country_flag = steam_age }
PREV = {
while = {
count = 3
create_army = {
name = "NAME_Industrial_Army"
owner = last_created
species = last_created
type = "industrial_army"
}
}
}
break = yes
}
}
}
}
}
change_orbit = @base_moon_distance
moon = {
count = { min = 0 max = 1 }
orbit_angle = { min = 90 max = 270 }
orbit_distance = 5
}
}
planet = {
orbit_distance = 20
count = { min = 1 max = 4 }
change_orbit = @base_moon_distance
moon = {
count = { min = 0 max = 1 }
orbit_angle = { min = 90 max = 270 }
orbit_distance = 5
}
}
planet = {
orbit_distance = 20
count = { min = 0 max = 2 }
}
}
}
When I run the events in the console, the GUI window for creating the new system pops up, but no system is created. My best guess is that the galaxy is at its star limit, and thus won't allow another system to be created, but I can't figure out how to either delete a system or increase the limit without letting the game create the extra system at game start. It's been a long time since I've done this much programming, so it's possible that I'm fundamentally misunderstanding how this works.
It's also worth mentioning that I don't need to create another system to be happy. If there's an easier way to create this civ in a pre-existing system, I'd certainly be open to that option. I just want to be able to put them in a system of my choosing.
P.S. The code to create the civilization was written by ColCainMcbert and posted in the thread entitled "Is it possible to create primitive civilizations via console commands?" I tried to link to the thread for context and also because I don't want to take credit for their work, but my account is too new.