So I dug through the Kerbal Space Program mod to try to learn how to set up events at the start game. I thought I had a handle on it, but I seam to be missing something. Even if I trigger it via console command it still does not do anything.
Does anyone notice what I am missing?
Thank you so much in advance for any help.
prescripted_countries
events
common\on_actions
Does anyone notice what I am missing?
Thank you so much in advance for any help.
prescripted_countries
Code:
Federation = {
name = "My Earth Federation"
spawn_enabled = no # yes / no / always
name_list = "Human"
ship_prefix = "NCC"
species_name = "Human"
species_plural = "Humans" #we should localize this!
species_adjective = "Human"
species_class = "MAM"
trait = "trait_quick_learners"
trait = "trait_nomadic"
trait = "trait_innovative"
trait = "trait_charismatic"
portrait = "human"
adjective = "Human"
government = "indirect_democracy"
ethic = "ethic_xenophile"
ethic = "ethic_fanatic_individualist"
#flags = { human_1 custom_start_screen }
flags = { MyFed_space_program }
events
Code:
namespace = MyFed
### Game Start Event
event = {
id = MyFED.1
hide_window = yes
is_triggered_only = yes
immediate = {
####Add My Feds
every_country = {
limit = {
has_country_flag = MyFed_space_program
#has_country_flag = add_MyFeds
}
country_event = { id = MyFed.2 }
}
#
# ### Spawn Kerbol System
# if = {
# limit = {
# NOT = {
# any_country = {
# species_portrait = kerbal
# }
# }
# }
# random_system = {
# limit = { NOT = { has_owner = yes } }
# spawn_system = { initializer = "primitive_kerbol_init" }
# }
# }
# }
}
country_event = {
id = MyFed.2
hide_window = yes
is_triggered_only = yes
immediate = {
#Kill all exisiting leaders
every_owned_leader = {
kill_leader = { type = scientist show_notification = no }
kill_leader = { type = governor show_notification = no }
}
#Add new ones
create_leader = {
type = scientist
species = owner_main_species
name = "Jonathan Archer"
skill = 5
set_age = 52
portrait = "human_male_01"
traits = {
trait = trait_ruler_charismatic
trait = trait_ruler_deep_connections
}
}
create_leader = {
type = scientist
species = owner_main_species
name = "Ronnie McAlister"
skill = 5
set_age = 24
portrait = "human_male_01"
traits = {
trait = leader_trait_meticulous
trait = leader_trait_careful
}
}
create_leader = {
type = scientist
species = owner_main_species
name = "Mary McAlister"
skill = 0
set_age = 24
portrait = "human_male_01"
traits = {
trait = leader_trait_careful
trait = leader_trait_expertise_computing
}
}
create_leader = {
type = scientist
species = owner_main_species
name = "Christine Putnam"
skill = 0
set_age = 25
portrait = "human_female_01"
traits = {
trait = leader_trait_roamer
trait = leader_trait_meticulous
}
}
create_leader = {
type = governor
species = owner_main_species
name = "John Watkins"
skill = 0
set_age = 45
portrait = "human_male_01"
}
remove_country_flag = add_MyFeds
}
}
common\on_actions
Code:
# Triggers when the game starts
on_game_start = {
events = {
MyFed.1
game_start.1
game_start.2
game_start.3
game_start.4
}
}