namespace = game_start ### Hidden Game Start Event event = { id = game_start.1 hide_window = yes is_triggered_only = yes immediate = { set_global_flag = game_started every_country = { limit = { is_ai = no } country_event = { id = country.900 days = 460 random = 60 } country_event = { id = game_start.74 } } ### HUMAN SPAWNS if = { #FTP spawner limit = { has_lithoids = yes num_ai_empires_setting >= 2 any_country = { #First check that UNE has spawned has_country_flag = human_1 is_human_species = yes NOT = { has_origin = origin_lost_colony } NOT = { has_origin = origin_broken_shackles } } any_country = { #Then check that FTP isn't around NOR = { species_portrait = lith_human has_country_flag = human_lithoid } } } random_list = { 20 = { modifier = { any_country = { #If the UNE is spawned and is a human we increase the chance. This means it's only a 20% if you are playing as the CoM has_country_flag = human_1 is_ai = no } factor = 4 } random_system = { limit = { has_owner = no has_special_star_flag_trigger = no } spawn_system = { initializer = "ai_titawin_init" } } } 80 = {} } } if = { #If someone is playing human lithoids and there is no UNE lets give it a chance to spawn limit = { any_country = { has_country_flag = human_lithoid species_portrait = lith_human } NOR = { any_country = { has_country_flag = human_1 } any_system = { has_star_flag = sol } } num_ai_empires_setting >= 1 } random_list = { 80 = { random_system = { limit = { has_owner = no has_special_star_flag_trigger = no } spawn_system = { initializer = "ai_sol_system" } } } 20 = {} } } if = { # If there are no Sols limit = { NOT = { any_system = { has_star_flag = sol } } } random_list = { 450 = { } # No Sol 400 = { # Pre-FTLs complex_trigger_modifier = { trigger = check_galaxy_setup_value parameters = { setting = primitive_worlds_scale } mode = factor } random_system = { limit = { has_owner = no } spawn_system = { initializer = "pre_ftl_init_sol" } } add_extra_hyperlane_to_spawned_system_effect = yes } 100 = { # Tomb World complex_trigger_modifier = { trigger = check_galaxy_setup_value parameters = { setting = primitive_worlds_scale } mode = factor } random_system = { limit = { has_owner = no } spawn_system = { initializer = "special_init_04" } } add_extra_hyperlane_to_spawned_system_effect = yes } 50 = { # Geocentric Experiment complex_trigger_modifier = { trigger = check_galaxy_setup_value parameters = { setting = habitable_worlds_scale } mode = factor mult = 0.4 # e.g. 0.5x habitable = factor of 0.2; 5x habitable worlds = factor of 2 } random_system = { limit = { has_owner = no } spawn_system = { initializer = "init_sol_geocentric" } } add_extra_hyperlane_to_spawned_system_effect = yes } } } ### SPAWN INVISIBLE GLOBAL EVENT COUNTRY create_country = { name = "global_event_country" type = global_event effect = { save_global_event_target_as = global_event_country } } ### SPAWN SPECIAL COUNTRIES create_country = { name = "NAME_The_Shroud" type = shroud flag = { icon = { category = "special" file = "the_shroud.dds" } background= { category = "backgrounds" file = "00_solid.dds" } colors={ "red" "black" "null" "null" } } effect = { set_country_flag = suppress_first_contact_comms set_country_flag = shroud_country_flag } } create_country = { name = "name_animator" type = shroud flag = { icon = { category = "zoological" file = "flag_zoological_5.dds" } background= { category = "backgrounds" file = "flag_BG_12.dds" } colors={ "purple" "black" "null" "null" } } effect = { set_country_flag = suppress_first_contact_comms set_country_flag = animator_of_clay_country_flag } } ### HANDLE EMPIRE RELATIONS every_country = { limit = { has_country_flag = fallen_empire_machine } every_country = { limit = { is_drone_country_type = yes } set_faction_hostility = { target = prev set_hostile = no set_neutral = no set_friendly = yes } } } every_country = { limit = { is_tiyanki_country_type = yes } every_country = { limit = { OR = { is_amoeba_country_type = yes is_drone_country_type = yes is_crystal_country_type = yes is_country_type = cloud } } set_faction_hostility = { target = prev set_hostile = no set_neutral = yes set_friendly = no } } } every_country = { limit = { is_voidworm_country = yes } every_country = { limit = { OR = { is_amoeba_country_type = yes is_tiyanki_country_type = yes is_drone_country_type = yes is_crystal_country_type = yes is_country_type = cloud is_guardian_country = yes } } set_faction_hostility = { target = prev set_hostile = no set_neutral = yes set_friendly = no } } } ### MARAUDER FLAGS every_country = { limit = { is_country_type = dormant_marauders } randomize_flag_symbol = "pirate" } ### MARAUDERS SHOULD NOT ATTACK ENCLAVES every_country = { limit = { is_country_type = enclave } every_country = { limit = { is_country_type = dormant_marauders } set_faction_hostility = { target = prev set_hostile = no set_neutral = no set_friendly = yes } } } ### SLOW DOWN PRE-FTL EVENTS set_timed_global_flag = { flag = asteroid_sighted_pre_ftl_global years = 10 } set_timed_global_flag = { flag = nuclear_war_pre_ftl_global years = 10 } every_playable_country = { add_modifier = { modifier = game_start days = 3600 } } ### ORIGINS # Scion every_playable_country = { limit = { has_origin = origin_scion } country_event = { id = origin.5 } } # Common Ground & Hegemon every_playable_country = { limit = { OR = { has_origin = origin_common_ground has_origin = origin_hegemon } } country_event = { id = origin.55 } } # Doomsday every_playable_country = { limit = { has_origin = origin_doomsday } country_event = { id = origin.60 } } # Shattered Ring every_playable_country = { limit = { has_origin = origin_shattered_ring } country_event = { id = origin.3150 } } # Slingshot to the Stars every_playable_country = { limit = { has_origin = origin_star_slingshot } country_event = { id = origin.3500 } } ## Lost Colony # if advanced starts are enabled or a player has picked it, let it ride if = { limit = { OR = { any_playable_country = { has_origin = origin_lost_colony is_ai = no } check_galaxy_setup_value = { setting = num_advanced_empires value > 0 } } } every_playable_country = { limit = { has_origin = origin_lost_colony NOT = {has_country_flag = human_2 } } country_event = { id = origin.100 } } } # if an AI has picked it and advanced starts are not enabled, # give them default origin instead. # also affects lost_colony_1 initializer else = { every_playable_country = { limit = { has_origin = origin_lost_colony NOT = { has_country_flag = human_2 } } log = "REMOVED LOST COLONY" set_origin = origin_default } } # Galactic Doorstep every_playable_country = { limit = { has_origin = origin_galactic_doorstep } country_event = { id = origin.1001 } } # On the Shoulders of Giants every_playable_country = { limit = { has_origin = origin_shoulders_of_giants } country_event = { id = origin.1199 } } # Here Be Dragons every_playable_country = { limit = { has_origin = origin_here_be_dragons } country_event = { id = aquatics.100 } } # Ocean Paradise every_playable_country = { limit = { OR = { has_origin = origin_ocean_paradise has_origin = origin_ocean_machines } } country_event = { id = aquatics.1000 } } # Broken Shackles every_playable_country = { limit = { has_origin = origin_broken_shackles } country_event = { id = origin.110 } } # Teachers of the Shroud every_playable_country = { limit = { has_origin = origin_shroudwalker_apprentice } country_event = { id = origin.5600 } } # Imperial Vassal if = { limit = { any_playable_country = { has_origin = origin_imperial_vassal } } imperial_origin_start_effect = yes } # Shroud-Forged every_playable_country = { limit = { has_origin = origin_shroud_forged } country_event = { id = shroud_forged.1 } } # Payback every_playable_country = { limit = { has_origin = origin_payback } country_event = { id = origin.4000 } } # Fruitful Partnership every_playable_country = { limit = { has_origin = origin_fruitful } fruitful_start_effect = yes } # Mindwarden every_playable_country = { limit = { has_origin = origin_mindwardens } country_event = { id = shroud.6000 } } # Endbringers every_playable_country = { limit = { has_origin = origin_endbringers } country_event = { id = shroud.8000 } } # Wilderness every_playable_country = { limit = { has_origin = origin_wilderness } country_event = { id = wilderness.150 } # stellar flare } ## Payback/Escaped Slaves Slaver empire # if advanced starts are enabled or a player has picked it, continue if = { limit = { OR = { any_playable_country = { has_slave_origin = yes is_ai = no } check_galaxy_setup_value = { setting = num_advanced_empires value > 0 } } } } # if an AI has picked it and advanced starts are not enabled, # give them default origin instead. else = { every_playable_country = { limit = { has_slave_origin = yes } log = "REMOVED SLAVE ORIGIN" set_origin = origin_default } } # Spawn Broken Shackles for Payback every_playable_country = { limit = { has_origin = origin_payback } country_event = { id = origin.112 } } # Spawn Payback for Broken Shackles every_playable_country = { limit = { has_origin = origin_broken_shackles } country_event = { id = origin.113 } } # Fear of the Dark every_playable_country = { limit = { has_origin = origin_fear_of_the_dark } fear_of_the_dark_binary_planets = yes } # Legendary Leader every_playable_country = { limit = { has_origin = origin_legendary_leader } country_event = { id = paragon.5000 } } # Eager Explorers every_playable_country = { limit = { is_eager_explorer_empire = yes } low_tech_start_add_research_options_effect = yes add_research_option = tech_hyper_drive_1 } # Cybernetic Creed every_playable_country = { limit = { has_origin = origin_cybernetic_creed } add_research_option = tech_integrated_cybernetics every_owned_leader = { limit = { is_ruler = yes NOT = { has_trait = leader_trait_cyborg } } add_trait = { trait = leader_trait_ritualistic_implants_cyborg } } } # Synthetic Fertility every_playable_country = { limit = { has_origin = origin_synthetic_fertility } country_event = { id = machine_age.3100 } } # Arc Welders every_playable_country = { limit = { has_origin = origin_arc_welders } arc_welders_start_effect = yes } # Starlit Citadel every_playable_country = { limit = { has_origin = origin_starlit_citadel } starlit_citadel_start_effect = yes } # Astro-Mining Drones every_playable_country = { limit = { has_valid_civic = civic_machine_astromining_drones } random_owned_starbase = { set_starbase_module = { slot = 2 module = astromining_bay } } } # Genesis Guides every_playable_country = { limit = { is_guided_sapience_empire = yes } set_variable = { which = presapients_guided value = 1 } set_country_flag = found_presapients capital_scope = { spawn_presapient_species_randomizer_homeworld_effect = yes add_deposit = d_genesis_preserve set_planet_flag = pre_sapient_planet } } # Synthetic Fertility every_playable_country = { limit = { has_origin = origin_evolutionary_predators } country_event = { id = bio.1000 } } # Spyware Directives every_playable_country = { limit = { has_first_contact_dlc = yes has_civic = civic_machine_spybots } add_research_option = tech_cloaking_1 } every_playable_country = { limit = { is_ascensionist_empire = yes } every_owned_planet = { set_planetary_ascension_tier = 1 } } every_playable_country = { limit = { has_valid_civic = civic_machine_obsessional_directive } obsessional_directive_start_effect = yes } every_playable_country = { # Shared Genetics limit = { has_valid_civic = civic_hive_shared_genetics } add_modifier = { modifier = shared_genetics_fire_rate days = -1 mult = value:count_negative_traits_from_country } add_modifier = { modifier = shared_genetics_hull days = -1 mult = value:count_positive_traits_from_country } } # Chosen civic every_playable_country = { limit = { is_chosen_empire = yes } country_event = { id = shroud.5100 } } if = { #If someone has Beastmasters civic, spawn amoeba already to give them communication limit = { any_country = { is_beastmasters_empire = yes } } create_amoeba_country = yes } # Unplugged if = { limit = { any_playable_country = { has_origin = origin_unplugged } } unplugged_origin_start_effect = yes } } } event = { id = game_start.2 hide_window = yes is_triggered_only = yes immediate = { every_country = { limit = { exists = capital_scope } capital_scope = { solar_system = { every_system_planet = { if = { limit = { has_modifier = hazardous_weather } remove_modifier = hazardous_weather } if = { limit = { has_modifier = dangerous_wildlife } remove_modifier = dangerous_wildlife } if = { limit = { has_modifier = weak_magnetic_field } remove_modifier = weak_magnetic_field } if = { limit = { has_modifier = strong_magnetic_field } remove_modifier = strong_magnetic_field } if = { limit = { has_modifier = unstable_tectonics } remove_modifier = unstable_tectonics } if = { limit = { has_modifier = tidal_locked } remove_modifier = tidal_locked } if = { limit = { has_modifier = chthonian_planet } remove_modifier = chthonian_planet } if = { limit = { has_modifier = asteroid_impacts } remove_modifier = asteroid_impacts } if = { limit = { has_modifier = extensive_moon_system } remove_modifier = extensive_moon_system } if = { limit = { has_modifier = carbon_world } remove_modifier = carbon_world } if = { limit = { has_modifier = wild_storms } remove_modifier = wild_storms } if = { limit = { has_modifier = low_gravity } remove_modifier = low_gravity } if = { limit = { has_modifier = high_gravity } remove_modifier = high_gravity } #if = { # limit = { has_modifier = hollow_planet } # remove_modifier = hollow_planet #} if = { limit = { has_modifier = mineral_rich } remove_modifier = mineral_rich } if = { limit = { has_modifier = ultra_rich } remove_modifier = ultra_rich } if = { limit = { has_modifier = mineral_poor } remove_modifier = mineral_poor } if = { limit = { has_modifier = titanic_life } remove_modifier = titanic_life } if = { limit = { has_modifier = mineral_poor } remove_modifier = mineral_poor } if = { limit = { has_modifier = asteroid_belt } remove_modifier = asteroid_belt } if = { limit = { has_modifier = natural_beauty } remove_modifier = natural_beauty } if = { limit = { has_modifier = atmospheric_aphrodisiac } remove_modifier = atmospheric_aphrodisiac } if = { limit = { has_modifier = atmospheric_hallucinogen } remove_modifier = atmospheric_hallucinogen } if = { limit = { has_modifier = lush_planet } remove_modifier = lush_planet } if = { limit = { has_modifier = bleak_planet } remove_modifier = bleak_planet } if = { limit = { has_modifier = irradiated_planet } remove_modifier = irradiated_planet } } } } } every_system = { limit = { NOR = { is_star_class = sc_black_hole is_star_class = sc_neutron_star is_star_class = sc_pulsar } } every_system_planet = { limit = { OR = { is_planet_class = pc_barren is_planet_class = pc_barren_cold } NOR = { has_deposit = d_nanites_deposit has_anomaly = yes has_modifier = terraforming_candidate } planet_size > 9 planet_size < 31 } random_list = { 100 = {} 1 = { #about 20 on a huge galaxy with default settings. add_modifier = { modifier = terraforming_candidate } complex_trigger_modifier = { trigger = check_galaxy_setup_value parameters = { setting = habitable_worlds_scale } mode = factor } } } } if = { limit = { host_has_dlc = "Aquatics Species Pack" } every_system_planet = { limit = { is_planet_class = pc_frozen NOR = { has_deposit = d_nanites_deposit has_anomaly = yes has_modifier = frozen_terraforming_candidate } planet_size > 9 planet_size < 31 } random_list = { 100 = {} 1 = { #Not very common, Hydrocentric gives you lots of other things add_modifier = { modifier = frozen_terraforming_candidate } complex_trigger_modifier = { trigger = check_galaxy_setup_value parameters = { setting = habitable_worlds_scale } mode = factor } } } } } if = { limit = { host_has_dlc = "Toxoids Species Pack" } every_system_planet = { limit = { is_planet_class = pc_toxic NOR = { has_deposit = d_nanites_deposit has_anomaly = yes has_modifier = toxic_terraforming_candidate } planet_size > 9 planet_size < 31 } random_list = { 100 = {} 15 = { #Detox only gives you this. About 50 planets in a huge galaxy add_modifier = { modifier = toxic_terraforming_candidate } set_planet_flag = toxic_terraforming_candidate complex_trigger_modifier = { trigger = check_galaxy_setup_value parameters = { setting = habitable_worlds_scale } mode = factor } } } } } } every_galaxy_planet = { limit = { is_planet_class = pc_nuked } set_planet_flag = ancient_history_planet } # Polytechnic Districts are rare, but shouldnt be > 2 every_galaxy_planet = { limit = { is_planet_class = pc_volcanic } if = { limit = { check_modifier_value = { modifier = district_polytechnic_max_add value < 2 } } add_deposit = d_volcanic_basalt_plains } } every_system = { limit = { has_owner = no } every_system_planet = { limit = { colonizable_planet = yes has_owner = no AND = { if = { limit = { exists = event_target:sol_system_earth } NOT = { is_same_value = event_target:sol_system_earth } } NOT = { has_planet_flag = prescripted_ideal } NOT = { has_planet_flag = ratling_planet } NOT = { has_planet_flag = pre_sapients_forbidden } } } save_event_target_as = pre_sapient_planet random_list = { 100 = { modifier = { subtract = value:presapient_spawn_chance } } 0 = { # 7.5% chance at 1x on the slider. spawn_presapient_species_randomizer_effect = yes modifier = { add = value:presapient_spawn_chance } } } } } if = { limit = { any_system = { has_star_flag = old_foes_system } } random_system = { limit = { has_star_flag = old_foes_system } spawn_old_foes_effect = yes } } } } ### Hidden Game Start Event that resets tutorial for advisor trigger purposes event = { id = game_start.3 hide_window = yes is_triggered_only = yes immediate = { every_country = { limit = { is_ai = no } country_event = { id = tutorial.104 } } } } ### Countdown to Nomad Fleet event = { id = game_start.5 hide_window = yes is_triggered_only = yes immediate = { every_country = { limit = { is_ai = no } random_list = { #1 = { country_event = { id = nomad.1 days = 1 } } # DEBUG 20 = { country_event = { id = nomad.1 days = 7200 random = 500 } } # 25 years 25 = { country_event = { id = nomad.1 days = 14400 random = 500 } } # 40 years 25 = { country_event = { id = nomad.1 days = 1980 random = 500 } } # 55 years 30 = { } # No nomads } } } } ### Country-scope start event for advanced empires country_event = { id = game_start.6 hide_window = yes is_triggered_only = yes immediate = { set_country_flag = is_advanced_start_AI give_technology = { tech = "tech_galactic_ambitions" message = no } give_technology = { tech = "tech_mining_1" message = no } give_technology = { tech = "tech_combat_computers_1" message = no } give_technology = { tech = "tech_planetary_unification" message = no } add_resource = { energy = 1000 } add_resource = { minerals = 1000 } add_resource = { alloys = 500 } add_resource = { influence = 200 } add_monthly_resource_mult = { resource = unity value = @tier2unityreward min = @tier2unitymin max = @tier2unitymax } if = { limit = { OR = { AND = { is_lithoid_empire = no is_machine_empire = no } is_catalytic_empire = yes has_country_flag = non_lithoid_subspecies has_origin = origin_broken_shackles } } add_resource = { food = 1000 } } else = { add_resource = { energy = 1000 } } if = { limit = { is_gestalt = no } add_resource = { consumer_goods = 500 } } else = { add_resource = { minerals = 500 } } every_planet_within_border = { limit = { has_deposit_for = shipclass_mining_station has_mining_station = no has_any_rare_strategic_resource = no } create_mining_station = { owner = ROOT } } every_planet_within_border = { limit = { has_deposit_for = shipclass_research_station has_research_station = no has_any_rare_strategic_resource = no } create_research_station = { owner = ROOT } } } } ### Empire init - add technologies and some resources country_event = { id = game_start.8 hide_window = yes is_triggered_only = yes immediate = { if = { limit = { has_origin = origin_mechanists } give_technology = { message = no tech = tech_powered_exoskeletons } give_technology = { message = no tech = tech_robotic_workers } add_research_option = tech_robomodding } if = { limit = { has_origin = origin_overtuned } give_technology = { message = no tech = tech_gene_tailoring } country_event = { id = tutorial.64 days = 5 } } if = { limit = { has_civic = civic_corporate_dominion } give_technology = { message = no tech = tech_space_trading } } if = { limit = { has_origin = origin_shroud_forged } give_technology = { message = no tech = tech_mine_zro } add_resource = { sr_zro = 50 } } if = { limit = { has_origin = origin_mindwardens } give_technology = { message = no tech = tech_starbase_3 } } if = { limit = { has_civic = civic_privatized_exploration } give_technology = { message = no tech = tech_starbase_3 } } if = { limit = { has_origin = origin_storm_chasers } give_technology = { message = no tech = tech_storm_prediction_1 } } if = { limit = { has_origin = origin_primal_calling } give_technology = { message = no tech = tech_genome_mapping } } } # Additional resources that may be changed by subspecies are granted in generate_start_buildings_and_districts } ### Empire init - add ships country_event = { id = game_start.9 hide_window = yes is_triggered_only = yes immediate = { #science if = { limit = { is_low_tech_start = no } create_fleet = { effect = { set_owner = prev create_ship = { name = random random_existing_design = science } set_fleet_stance = evasive #set_location = prev.capital_star set_location = prev.capital_scope.star owner = { create_leader = { class = scientist sub_type = survey name = random species = owner_main_species randomize_traits = no traits = { 1 = random_common } } } set_leader = last_created_leader } } } else_if = { limit = { has_origin = origin_payback } create_leader = { class = scientist name = random species = owner_main_species randomize_traits = no traits = { 1 = random_common } } } if = { limit = { is_eager_explorer_empire = yes } while = { count = 2 create_fleet = { effect = { set_owner = prev create_ship = { name = random random_existing_design = explorer_vessel } set_fleet_stance = passive set_location = prev.capital_scope.star owner = { create_leader = { class = scientist sub_type = survey name = random species = owner_main_species randomize_traits = no traits = { 1 = random_common } } } if = { limit = { NOT = { root = { has_country_flag = created_first_eager_ship } } } root = { set_country_flag = created_first_eager_ship } last_created_leader = { add_trait = { trait = leader_trait_meticulous show_message = no } } } else = { last_created_leader = { add_trait = { trait = leader_trait_roamer show_message = no } } } set_leader = last_created_leader } } } } if = { limit = { has_civic = civic_privatized_exploration } random_owned_starbase = { set_starbase_size = starbase_starhold set_starbase_module = { slot = 2 module = shipyard } set_starbase_module = { slot = 3 module = trading_hub } set_starbase_module = { slot = 4 module = trading_hub } set_starbase_building = { slot = 2 building = resource_silo } } } if = { limit = { has_origin = origin_mindwardens } random_owned_starbase = { set_starbase_size = starbase_starhold set_starbase_module = { slot = 3 module = gun_battery } set_starbase_module = { slot = 4 module = gun_battery } set_starbase_building = { slot = 2 building = resource_silo } } } #constructor if = { limit = { is_low_tech_start = no } create_fleet = { effect = { set_owner = prev create_ship = { name = random random_existing_design = constructor } set_fleet_stance = evasive set_location = prev.capital_star } } } if = { limit = { is_eager_explorer_empire = yes } create_fleet = { effect = { set_owner = prev create_ship = { name = random random_existing_design = engineer_vessel } set_fleet_stance = evasive set_location = prev.capital_star } } } if = { limit = { is_beastmasters_empire = yes } # required before trying to give space fauna give_dna = { ship_category = space_amoeba rarity = common } create_fleet = { effect = { set_owner = prev while = { count = 3 create_ship = { name = random random_existing_design = space_amoeba rarity = common age = 0 } } set_location = prev.capital_star owner = { create_leader = { class = commander name = random species = owner_main_species randomize_traits = no traits = { 1 = random_common } } } set_leader = last_created_leader save_event_target_as = beastmasters_starting_fleet } } if = { limit = { has_origin = origin_fruitful } event_target:beastmasters_starting_fleet = { fleet_event = { id = origin.7303 days = 20 scopes = { from = prev.capital_star.starbase } } } } } else_if = { limit = { is_low_tech_start = no } create_fleet = { effect = { set_owner = prev if = { limit = { root = { country_uses_bio_ships = yes NOT = { has_valid_civic = civic_hive_cordyceptic_drones } } } while = { count = 2 create_ship = { name = random random_existing_design = mauler_stage_1 } } if = { limit = { root = { has_origin = origin_progenitor_hive } } create_ship = { name = random random_existing_design = offspring_weaver_stage_1 } } else = { create_ship = { name = random random_existing_design = weaver_stage_1 } } } else_if = { limit = { root = { NOT = { has_valid_civic = civic_hive_cordyceptic_drones } } } while = { count = 2 create_ship = { name = random random_existing_design = corvette } } if = { limit = { root = { has_origin = origin_progenitor_hive } } create_ship = { name = random random_existing_design = offspring_corvette } } else = { create_ship = { name = random random_existing_design = corvette } } set_location = prev.capital_star } else = { while = { count = 2 create_ship = { name = NAME_Reanimated_Small_Space_Organism design = NAME_Reanimated_Small_Space_Organism prefix = yes } } if = { limit = { root = { country_uses_bio_ships = no has_origin = origin_progenitor_hive } } create_ship = { name = random random_existing_design = offspring_corvette } } else_if = { limit = { root = { country_uses_bio_ships = yes has_origin = origin_progenitor_hive } } create_ship = { name = random random_existing_design = offspring_weaver_stage_1 } } else = { create_ship = { name = "NAME_Reanimated_Small_Space_Organism" design = NAME_Reanimated_Small_Space_Organism prefix = yes } } set_location = prev.capital_star } owner = { create_leader = { class = commander name = random species = owner_main_species randomize_traits = no traits = { 1 = random_common } } } set_leader = last_created_leader } } } else_if = { limit = { has_civic = civic_hive_cordyceptic_drones has_civic = civic_hive_stargazers } create_fleet = { set_take_point = yes effect = { set_owner = prev while = { count = 3 create_ship = { name = NAME_Reanimated_Small_Space_Organism design = NAME_Reanimated_Small_Space_Organism prefix = yes } } set_location = prev.capital_star owner = { create_leader = { class = commander name = random species = owner_main_species randomize_traits = no traits = { 1 = random_common } } } set_leader = last_created_leader } } } else_if = { limit = { NOT = { has_origin = origin_broken_shackles # Assigned in origin.110 instead } } create_leader = { class = commander name = random species = owner_main_species randomize_traits = no traits = { 1 = random_common } } } } } # Game start - Fallen Empires country_event = { id = game_start.10 hide_window = yes is_triggered_only = yes trigger = { is_country_type = fallen_empire } immediate = { add_modifier = { modifier = fe_ship_cost_modifier days = -1 } if = { limit = { is_machine_empire = yes } random_list = { 66 = { set_country_flag = fallen_machine_empire_awaken_1 } # Custodian 33 = { set_country_flag = fallen_machine_empire_awaken_2 } # Berserker } } # contact other fallen empires & marauders every_country = { limit = { OR = { is_country_type = dormant_marauders is_country_type = fallen_empire is_country_type = enclave } NOT = { has_communications = root } } establish_communications_no_message = root } # setup mining & research stations every_planet_within_border = { limit = { has_deposit_for = shipclass_mining_station has_mining_station = no } create_mining_station = { owner = ROOT } } every_planet_within_border = { limit = { has_deposit_for = shipclass_research_station has_research_station = no } create_research_station = { owner = ROOT } } # Give them a situation to handle pulse random events start_situation = { type = fallen_empires_situation } } } # this: capital planet # from: founder species planet_event = { id = game_start.12 hide_window = yes is_triggered_only = yes immediate = { if = { limit = { NOT = { has_planet_flag = special_start_planet } } if = { limit = { OR = { NOT = { has_planet_flag = planet_earth } owner = { has_origin = origin_remnants } #no special earth for you, sorry } NOT = { owner = { has_origin = origin_shattered_ring } #setup in initializer } } generate_start_deposits_and_blockers = yes } else_if = { limit = { has_planet_flag = planet_earth NOR = { owner = { has_origin = origin_shattered_ring } #setup in initializer owner = { has_origin = origin_remnants } #custom blockers } } generate_earth_deposits_and_blockers = yes set_earth_entity = yes } generate_start_buildings_and_districts = yes generate_start_pops = yes generate_home_planet_final_pass = yes } if = { limit = { has_planet_flag = void_dweller_habitat_1 } void_dweller_home_planet_setup = yes } } } # on_initialize_advanced_colony: remove tile blockers on capital planet_event = { id = game_start.20 hide_window = yes is_triggered_only = yes pre_triggers = { is_capital = yes } trigger = { owner = { NOT = { has_origin = origin_shattered_ring } } } immediate = { clear_blockers = yes } } # on_initialize_advanced_colony: upgrade colony shelter planet_event = { id = game_start.21 hide_window = yes is_triggered_only = yes immediate = { set_timed_planet_flag = { flag = ignore_ai_building_limitations days = 1 } if = { limit = { has_building = building_colony_shelter } remove_building = building_colony_shelter add_building = building_capital break = yes } if = { limit = { has_building = building_deployment_post } remove_building = building_deployment_post add_building = building_machine_capital } } } @advanced_empire_capital_num_power_plants = 4 @advanced_empire_colony_num_power_plants = 2 @advanced_empire_num_mines = 1 @advanced_empire_num_farms = 1 # on_initialize_advanced_colony: set up additional buildings (mines, farms, power plants) planet_event = { id = game_start.22 hide_window = yes is_triggered_only = yes immediate = { if = { limit = { is_capital = yes NOT = { owner = { has_origin = origin_shattered_ring } } } add_district_and_planet_size_if_needed_effect = { district = district_mining } add_district_and_planet_size_if_needed_effect = { district = district_generator } add_district_and_planet_size_if_needed_effect = { district = district_generator } if = { limit = { owner = { is_machine_empire = yes } } add_district_and_planet_size_if_needed_effect = { district = district_nexus } add_district_and_planet_size_if_needed_effect = { district = district_nexus } } else_if = { limit = { owner = { is_hive_empire = yes } } add_district_and_planet_size_if_needed_effect = { district = district_hive } add_district_and_planet_size_if_needed_effect = { district = district_hive } } else = { add_district_and_planet_size_if_needed_effect = { district = district_city } add_district_and_planet_size_if_needed_effect = { district = district_city } } if = { limit = { owner = { is_machine_empire = no } } add_district_and_planet_size_if_needed_effect = { district = district_farming } add_district_and_planet_size_if_needed_effect = { district = district_farming } } if = { limit = { owner = { is_machine_empire = yes } } add_district_and_planet_size_if_needed_effect = { district = district_generator } add_district_and_planet_size_if_needed_effect = { district = district_generator } } # TODO-CD is this correct? This used to be uncapped, so we now add 2 extra mining ones, not sure if balanced if = { limit = { owner = { is_subterranean_empire = yes } } add_district_and_planet_size_if_needed_effect = { district = district_mining } add_district_and_planet_size_if_needed_effect = { district = district_mining } } } else_if = { limit = { is_capital = yes owner = { has_origin = origin_shattered_ring } } random_deposit = { limit = { is_deposit_type = d_decrepit_tunnels_2 } clear_blocker = yes } random_deposit = { limit = { is_deposit_type = d_decrepit_tunnels_3 } clear_blocker = yes } random_deposit = { limit = { is_deposit_type = d_segment_rubble_4 } clear_blocker = yes } while = { count = 2 add_district_if_possible_effect = { district = district_mining } } if = { limit = { owner = { is_gestalt = no } } while = { count = 2 add_district_if_possible_effect = { district = district_city } } if = { limit = { owner = { is_lithoid_empire = yes } } add_district_if_possible_effect = { district = district_city } } else = { add_district_if_possible_effect = { district = district_farming } } } else_if = { limit = { owner = { is_hive_empire = yes } } while = { count = 2 add_district_if_possible_effect = { district = district_hive } } if = { limit = { owner = { is_lithoid_empire = yes } } add_district_if_possible_effect = { district = district_hive } } else = { add_district_if_possible_effect = { district = district_farming } } } else = { while = { count = 3 add_district_if_possible_effect = { district = district_nexus } } } } else = { add_district_and_planet_size_if_needed_effect = { district = district_generator } add_district_and_planet_size_if_needed_effect = { district = district_mining } if = { limit = { owner = { is_machine_empire = yes } } add_district_and_planet_size_if_needed_effect = { district = district_nexus } add_district_and_planet_size_if_needed_effect = { district = district_generator } add_district_and_planet_size_if_needed_effect = { district = district_generator } } else_if = { limit = { owner = { is_hive_empire = yes } } add_district_and_planet_size_if_needed_effect = { district = district_hive } add_district_and_planet_size_if_needed_effect = { district = district_farming } } else = { add_district_and_planet_size_if_needed_effect = { district = district_city } add_district_and_planet_size_if_needed_effect = { district = district_farming } } if = { limit = { owner = { has_origin = origin_mechanists } } set_timed_planet_flag = { flag = ignore_ai_building_limitations days = 1 } add_building = building_robot_assembly_plant } if = { limit = { owner = { has_origin = origin_necrophage NOT = { has_civic = civic_fanatic_purifiers } #purges them instead NOT = { has_ai_personality_behaviour = purger } } } set_timed_planet_flag = { flag = ignore_ai_building_limitations days = 1 } add_building = building_necrophage_elevation_chamber } } } } # on_initialize_advanced_colony: add additional pops planet_event = { id = game_start.23 hide_window = yes is_triggered_only = yes immediate = { if = { limit = { is_capital = yes } if = { limit = { owner = { is_machine_empire = yes } } while = { count = 13 create_pop_group = { species = owner_main_species } } } else_if = { limit = { owner = { is_hive_empire = yes } } while = { count = 16 create_pop_group = { species = owner_main_species } } } else_if = { limit = { owner = { has_origin = origin_mechanists } } random_galaxy_species = { limit = { has_species_flag = mechanical_species@root.owner } save_event_target_as = mechanical_species } while = { count = 6 create_pop_group = { species = event_target:mechanical_species } } while = { count = 12 create_pop_group = { species = owner_main_species } } } else_if = { limit = { owner = { OR = { has_origin = origin_syncretic_evolution has_origin = origin_necrophage } } } random_galaxy_species = { limit = { has_species_flag = syncretic_species@root.owner } save_event_target_as = syncretic_species } while = { count = 8 create_pop_group = { species = event_target:syncretic_species } } while = { count = 10 create_pop_group = { species = owner_main_species } } } else = { while = { count = 18 create_pop_group = { species = owner_main_species } } } } else = { if = { limit = { owner = { is_machine_empire = yes } } while = { count = 15 create_pop_group = { species = owner_main_species } } } else_if = { limit = { owner = { is_hive_empire = yes } } while = { count = 18 create_pop_group = { species = owner_main_species } } } else_if = { limit = { owner = { has_origin = origin_mechanists } } random_galaxy_species = { limit = { has_species_flag = mechanical_species@root.owner } save_event_target_as = mechanical_species } while = { count = 4 create_pop_group = { species = event_target:mechanical_species } } while = { count = 7 create_pop_group = { species = owner_main_species } } } else_if = { limit = { owner = { OR = { has_origin = origin_syncretic_evolution has_origin = origin_necrophage } } } random_galaxy_species = { limit = { has_species_flag = syncretic_species@root.owner } save_event_target_as = syncretic_species } while = { count = 4 create_pop_group = { species = event_target:syncretic_species } } while = { count = 6 create_pop_group = { species = owner_main_species } } } else = { while = { count = 10 create_pop_group = { species = owner_main_species } } } } } } ### Create wormhole pairs event = { id = game_start.31 hide_window = yes is_triggered_only = yes immediate = { get_galaxy_setup_value = { setting = num_wormhole_pairs which = local_wormholes_num scale_by = 5 } while = { count = local_wormholes_num random_system = { limit = { NOR = { has_natural_wormhole = yes starting_system = yes has_star_flag = empire_cluster } } random_system = { limit = { NOR = { has_natural_wormhole = yes starting_system = yes has_star_flag = empire_cluster } distance = { source = prev min_distance >= 500 } } prev = { # done this way to ensure we don't spawn "orphan" wormholes (wormholes that aren't linked to anything) spawn_natural_wormhole = { bypass_type = wormhole random_pos = yes orbit_angle = 360 } } spawn_natural_wormhole = { bypass_type = wormhole random_pos = yes orbit_angle = 360 } link_wormholes = prev } } } } } ### Empire init - populate home system country_event = { id = game_start.33 hide_window = yes is_triggered_only = yes trigger = { is_country_type = default } immediate = { if = { limit = { #Make sure you are unlikely to be boxed in completely OR = { has_origin = origin_hegemon has_origin = origin_common_ground } capital_scope = { solar_system = { NOT = { any_neighbor_system = { NOT = { exists = owner } } } } } } if = { limit = { any_system = { distance = { source = root.capital_scope.solar_system type = euclidean min_distance >= 1 max_distance <= 15 } NOT = { has_hyperlane_to = root.capital_scope.solar_system } NOT = { exists = owner } } } random_system = { limit = { distance = { source = root.capital_scope.solar_system type = euclidean min_distance >= 1 max_distance <= 15 } NOT = { has_hyperlane_to = root.capital_scope.solar_system } NOT = { exists = owner } } save_event_target_as = hyperlane_system add_hyperlane = { from = this to = root.capital_scope.solar_system } } } else_if = { limit = { any_system = { distance = { source = root.capital_scope.solar_system type = euclidean min_distance >= 15 max_distance <= 20 } NOT = { has_hyperlane_to = root.capital_scope.solar_system } NOT = { exists = owner } } } random_system = { limit = { distance = { source = root.capital_scope.solar_system type = euclidean min_distance >= 15 max_distance <= 20 } NOT = { has_hyperlane_to = root.capital_scope.solar_system } NOT = { exists = owner } } save_event_target_as = hyperlane_system add_hyperlane = { from = this to = root.capital_scope.solar_system } } } else_if = { limit = { any_system = { distance = { source = root.capital_scope.solar_system type = euclidean min_distance >= 20 max_distance <= 25 } NOT = { has_hyperlane_to = root.capital_scope.solar_system } NOT = { exists = owner } } } random_system = { limit = { distance = { source = root.capital_scope.solar_system type = euclidean min_distance >= 20 max_distance <= 25 } NOT = { has_hyperlane_to = root.capital_scope.solar_system } NOT = { exists = owner } } save_event_target_as = hyperlane_system add_hyperlane = { from = this to = root.capital_scope.solar_system } } } else_if = { limit = { any_system = { distance = { source = root.capital_scope.solar_system type = euclidean min_distance >= 25 max_distance <= 40 } NOT = { has_hyperlane_to = root.capital_scope.solar_system } NOT = { exists = owner } } } random_system = { limit = { distance = { source = root.capital_scope.solar_system type = euclidean min_distance >= 25 max_distance <= 40 } NOT = { has_hyperlane_to = root.capital_scope.solar_system } NOT = { exists = owner } } save_event_target_as = hyperlane_system add_hyperlane = { from = this to = root.capital_scope.solar_system } } } else_if = { limit = { any_system = { distance = { source = root.capital_scope.solar_system type = euclidean min_distance >= 40 max_distance <= 60 } NOT = { has_hyperlane_to = root.capital_scope.solar_system } NOT = { exists = owner } } } random_system = { limit = { distance = { source = root.capital_scope.solar_system type = euclidean min_distance >= 40 max_distance <= 60 } NOT = { has_hyperlane_to = root.capital_scope.solar_system } NOT = { exists = owner } } save_event_target_as = hyperlane_system add_hyperlane = { from = this to = root.capital_scope.solar_system } } } if = { limit = { exists = event_target:hyperlane_system event_target:hyperlane_system = { NOT = { any_neighbor_system = { NOT = { exists = owner } } } } } event_target:hyperlane_system = { random_system = { limit = { distance = { source = prev type = euclidean min_distance >= 1 max_distance <= 25 } NOT = { has_hyperlane_to = prev } NOT = { exists = owner } } add_hyperlane = { from = this to = prev } } } } } if = { limit = { has_origin = origin_default NOT = { has_technology = tech_planetary_unification } } add_research_option = tech_planetary_unification } if = { every_planet_within_border = { limit = { has_deposit_for = shipclass_mining_station has_planet_flag = starting_mining_target has_mining_station = no root = { is_low_tech_start = no } } create_mining_station = { owner = ROOT } } every_planet_within_border = { limit = { has_deposit_for = shipclass_research_station has_planet_flag = starting_research_target has_research_station = no root = { is_low_tech_start = no } } create_research_station = { owner = ROOT } } } if = { limit = { has_origin = origin_necrophage NOT = { has_civic = civic_fanatic_purifiers } NOT = { has_ai_personality_behaviour = purger } } country_event = { id = necroids.2 days = 3420 } #tell them about the necrophage mechanic } if = { limit = { has_origin = origin_necrophage is_ai = yes } country_event = { id = necroids.6 days = 1800 } country_event = { id = necroids.6 days = 3600 } country_event = { id = necroids.6 days = 5400 } country_event = { id = necroids.6 days = 7200 } } if = { limit = { has_origin = origin_necrophage OR = { has_country_flag = necrophage_commonwealth has_country_flag = necrophage_une } } random_country = { limit = { OR = { AND = { has_country_flag = human_1 prev = { has_country_flag = necrophage_commonwealth } } AND = { has_country_flag = human_2 prev = { has_country_flag = necrophage_une } } } } weighted_random_owned_pop_group = { limit = { NOT = { is_same_species = prev } } species = { save_event_target_as = correct_prepatent_species } } } every_owned_pop_group = { limit = { NOT = { is_same_species = owner_species } } planet = { create_pop_group = { species = event_target:correct_prepatent_species } } kill_single_pop = yes } remove_country_flag = necrophage_une remove_country_flag = necrophage_commonwealth } if = { limit = { has_origin = origin_slavers } capital_scope = { generate_slaver_bonus = yes } } if = { limit = { OR = { has_valid_civic = civic_hive_stargazers is_hyperspace_specialty_empire = yes } } every_system = { limit = { distance = { source = root.capital_scope use_bypasses = no max_jumps = 3 } } root = { set_visited = prev } } } if = { limit = { is_ai = yes has_country_flag = necrophage_start_empire has_ethic = ethic_fanatic_xenophobe has_ethic = ethic_militarist } force_remove_civic = civic_cutthroat_politics force_add_civic = civic_fanatic_purifiers } } } ### Nebula System Art event = { id = game_start.50 hide_window = yes is_triggered_only = yes immediate = { every_system = { limit = { is_inside_nebula = yes } nebula_cloaking_effect = yes # Class B if = { limit = { OR = { is_star_class = sc_b is_star_class = sc_binary_2 is_star_class = sc_binary_5 is_star_class = sc_trinary_2 is_star_class = sc_trinary_4 } } random_list = { 20 = { create_nebula_3 = yes } 20 = { create_nebula_4 = yes } 10 = { create_rare_nebula_1 = yes } 4 = { modifier = { factor = 0 has_star_flag = empire_home_system } create_turbulent_nebula_1 = yes } } } # Class A else_if = { limit = { OR = { is_star_class = sc_a is_star_class = sc_binary_1 is_star_class = sc_binary_9 is_star_class = sc_binary_10 } } if = { limit = { has_star_flag = ocean_paradise_nebula } create_rare_nebula_1 = yes } else = { random_list = { 20 = { create_nebula_3 = yes } 20 = { create_nebula_4 = yes } 10 = { create_rare_nebula_1 = yes } 10 = { create_rare_nebula_2 = yes } 4 = { modifier = { factor = 0 has_star_flag = empire_home_system } create_turbulent_nebula_1 = yes } 4 = { modifier = { factor = 0 has_star_flag = empire_home_system } create_turbulent_nebula_2 = yes } } } } # Class F else_if = { limit = { is_star_class = sc_f } random_list = { 20 = { create_nebula_3 = yes } 20 = { create_nebula_4 = yes } 10 = { create_rare_nebula_1 = yes } 4 = { modifier = { factor = 0 has_star_flag = empire_home_system } create_turbulent_nebula_1 = yes } } } # Class G else_if = { limit = { OR = { is_star_class = sc_g is_star_class = sc_binary_8 is_star_class = sc_trinary_1 } } random_list = { 20 = { create_nebula_1 = yes } 10 = { create_rare_nebula_2 = yes } 4 = { modifier = { factor = 0 has_star_flag = empire_home_system } create_turbulent_nebula_2 = yes } } } # Class K else_if = { limit = { OR = { is_star_class = sc_k is_star_class = sc_binary_7 is_star_class = sc_trinary_3 } } random_list = { 20 = { create_nebula_1 = yes } 20 = { create_nebula_2 = yes } 10 = { create_rare_nebula_2 = yes } 4 = { modifier = { factor = 0 has_star_flag = empire_home_system } create_turbulent_nebula_2 = yes } } } # Class M else_if = { limit = { OR = { is_star_class = sc_m is_star_class = sc_m_giant is_star_class = sc_binary_3 is_star_class = sc_binary_4 is_star_class = sc_binary_6 } } random_list = { 20 = { create_nebula_1 = yes } 20 = { create_nebula_2 = yes } 10 = { create_rare_nebula_2 = yes } 4 = { modifier = { factor = 0 has_star_flag = empire_home_system } create_turbulent_nebula_2 = yes } } } # Class T else_if = { limit = { is_star_class = sc_t } random_list = { 20 = { create_nebula_3 = yes } 10 = { create_rare_nebula_1 = yes } 4 = { modifier = { factor = 0 has_star_flag = empire_home_system } create_turbulent_nebula_1 = yes } } } # Black Hole else_if = { limit = { is_star_class = sc_black_hole } random_list = { 20 = { create_nebula_1 = yes } 20 = { create_nebula_2 = yes } 20 = { create_nebula_3 = yes } 20 = { create_nebula_4 = yes } 10 = { create_rare_nebula_1 = yes } 10 = { create_rare_nebula_2 = yes } 4 = { modifier = { factor = 0 has_star_flag = empire_home_system } create_turbulent_nebula_1 = yes } 4 = { modifier = { factor = 0 has_star_flag = empire_home_system } create_turbulent_nebula_2 = yes } } } # Neutron Star else_if = { limit = { is_star_class = sc_neutron_star } random_list = { 20 = { create_nebula_3 = yes } 20 = { create_nebula_4 = yes } 10 = { create_rare_nebula_1 = yes } 10 = { create_rare_nebula_2 = yes } 4 = { modifier = { factor = 0 has_star_flag = empire_home_system } create_turbulent_nebula_1 = yes } 4 = { modifier = { factor = 0 has_star_flag = empire_home_system } create_turbulent_nebula_2 = yes } } } # Pulsar else_if = { limit = { is_star_class = sc_pulsar } random_list = { 20 = { create_nebula_3 = yes } 20 = { create_nebula_4 = yes } 10 = { create_rare_nebula_1 = yes } 10 = { create_rare_nebula_2 = yes } 4 = { modifier = { factor = 0 has_star_flag = empire_home_system } create_turbulent_nebula_1 = yes } 4 = { modifier = { factor = 0 has_star_flag = empire_home_system } create_turbulent_nebula_2 = yes } } } } } } country_event = { id = game_start.60 hide_window = yes trigger = { is_country_type = default #selectable = { host_has_dlc = "Galactic Paragons" } } is_triggered_only = yes immediate = { set_variable = { which = paragon_chance_negative value = 0 } # Give Empire the starting Council Agenda, and progress it to about 1-2 years from finishing. if = { limit = { is_gestalt = yes } set_council_agenda = agenda_infinite_opportunities_gestalt } else = { set_council_agenda = agenda_infinite_opportunities } add_council_agenda_progress = 6000 } } # Change Ethic of first Ruler to empire's fanatic ethic. # More likely they would've been elected, and easier to re-elect them. country_event = { id = game_start.63 hide_window = yes trigger = { is_country_type = default is_gestalt = no } is_triggered_only = yes immediate = { switch = { trigger = has_ethic ethic_fanatic_pacifist = { ruler = { change_background_ethic = ethic_pacifist } } ethic_fanatic_militarist = { ruler = { change_background_ethic = ethic_militarist } } ethic_fanatic_xenophile = { ruler = { change_background_ethic = ethic_xenophile } } ethic_fanatic_xenophobe = { ruler = { change_background_ethic = ethic_xenophobe } } ethic_fanatic_egalitarian = { ruler = { change_background_ethic = ethic_egalitarian } } ethic_fanatic_authoritarian = { ruler = { change_background_ethic = ethic_authoritarian } } ethic_fanatic_spiritualist = { ruler = { change_background_ethic = ethic_spiritualist } } ethic_fanatic_materialist = { ruler = { change_background_ethic = ethic_materialist } } } } } # Give techs if you have the Pharma civic at game start country_event = { id = game_start.64 hide_window = yes trigger = { has_civic = civic_private_healthcare_corporate is_country_type = default has_void_dweller_origin = no # Done in 01_start_of_game_effects.txt instead. } is_triggered_only = yes immediate = { give_technology = { message = no tech = tech_frontier_health } add_research_option = tech_subdermal_stimulation } } #Xenolinguistic tech for some Origins country_event = { id = game_start.66 hide_window = yes trigger = { has_paragon_dlc = yes is_country_type = default OR = { has_origin = origin_broken_shackles has_origin = origin_payback has_origin = origin_scion has_origin = origin_common_ground has_origin = origin_hegemon has_origin = origin_imperial_vassal } is_gestalt = no } is_triggered_only = yes immediate = { add_research_option = tech_xeno_linguistics add_tech_progress = { tech = tech_xeno_linguistics progress = 0.50 } } } # Create Gestalt Council. country_event = { id = game_start.70 hide_window = yes trigger = { is_gestalt = yes OR = { is_country_type = default is_country_type = fallen_empire } } is_triggered_only = yes immediate = { if = { limit = { has_paragon_dlc = yes } ruler = { assign_gestalt_ruler_subclass_trait = yes } } country_create_gestalt_councilor = { CLASS = official COUNCIL_POS = councilor_gestalt_growth DESC = councilor_gestalt_growth_desc } country_create_gestalt_councilor = { CLASS = scientist COUNCIL_POS = councilor_gestalt_cognitive DESC = councilor_gestalt_cognitive_desc } country_create_gestalt_councilor = { CLASS = commander COUNCIL_POS = councilor_gestalt_legion DESC = councilor_gestalt_legion_desc } country_create_gestalt_councilor = { CLASS = official COUNCIL_POS = councilor_gestalt_regulatory DESC = councilor_gestalt_regulatory_desc } if = { limit = { is_country_type = fallen_empire } every_owned_leader = { limit = { is_councilor = yes is_ruler = no } add_skill = 9 set_gestalt_node_portrait_effect = yes } } } } # Set starting planet governors country_event = { id = game_start.71 hide_window = yes trigger = { is_country_type = default } is_triggered_only = yes immediate = { assign_governor_effect = yes every_owned_leader = { limit = { leader_class = commander is_idle = yes } owner = { random_owned_fleet = { limit = { is_ship_class = shipclass_military NOT = { exists = leader } } assign_leader = prevprev } } } every_owned_leader = { limit = { leader_class = scientist is_idle = yes } owner = { random_owned_fleet = { limit = { is_ship_class = shipclass_science_ship NOT = { exists = leader } } assign_leader = prevprev } } } # In case mysterious leaders are spawned. every_owned_leader = { limit = { is_idle = yes is_councilor = no } kill_leader = { show_notification = no } } } } # Create Regular Council. country_event = { id = game_start.72 hide_window = yes trigger = { is_gestalt = no OR = { is_country_type = default is_country_type = fallen_empire } NOT = { has_origin = origin_broken_shackles # Assigned in origin.110 instead } } is_triggered_only = yes immediate = { # Add Minister of Defense Position if = { limit = { NOT = { has_councilor = { COUNCILOR = councilor_defense } } } if = { limit = { has_paragon_dlc = yes } unlock_council_slots = 1 set_council_position_to_council = councilor_defense } if = { limit = { any_owned_leader = { leader_class = commander is_councilor = no is_ruler = no } } random_owned_leader = { limit = { leader_class = commander is_councilor = no is_ruler = no } set_council_position = councilor_defense } } else = { create_leader = { class = commander name = random species = owner_main_species randomize_traits = no traits = { 1 = random_common } } last_created_leader = { set_council_position = councilor_defense } } } # Add Head of Research Position if = { limit = { NOT = { has_councilor = { COUNCILOR = councilor_research } } } if = { limit = { has_paragon_dlc = yes } unlock_council_slots = 1 set_council_position_to_council = councilor_research } if = { limit = { any_owned_leader = { leader_class = scientist is_councilor = no is_ruler = no } } random_owned_leader = { limit = { leader_class = scientist is_councilor = no is_ruler = no } set_council_position = councilor_research } } else = { create_leader = { class = scientist name = random species = owner_main_species randomize_traits = no } last_created_leader = { set_council_position = councilor_research add_trait = { trait = random_common show_message = no consume_selection = yes } } } } # Add Minister of State Position if = { limit = { blocks_minister_of_state = no } if = { limit = { NOT = { has_councilor = { COUNCILOR = councilor_state } } } if = { limit = { has_paragon_dlc = yes } unlock_council_slots = 1 set_council_position_to_council = councilor_state } if = { limit = { any_owned_leader = { leader_class = official is_councilor = no is_ruler = no } } random_owned_leader = { limit = { leader_class = official is_councilor = no is_ruler = no } set_council_position = councilor_state } } else = { create_leader = { class = official name = random species = owner_main_species randomize_traits = no } last_created_leader = { set_council_position = councilor_state add_trait = { trait = random_common show_message = no consume_selection = yes } } } } } else_if = { limit = { has_valid_civic = civic_inwards_perfection has_paragon_dlc = yes NOT = { has_councilor = { COUNCILOR = councilor_inwards_perfection } } } unlock_council_slots = 1 set_council_position_to_council = councilor_inwards_perfection if = { limit = { any_owned_leader = { leader_class = commander is_councilor = no is_ruler = no } } random_owned_leader = { limit = { leader_class = commander is_councilor = no is_ruler = no } set_council_position = councilor_inwards_perfection } } else = { create_leader = { class = commander name = random species = owner_main_species randomize_traits = no } last_created_leader = { set_council_position = councilor_inwards_perfection add_trait = { trait = random_common show_message = no consume_selection = yes } } } } else_if = { limit = { has_valid_civic = civic_fanatic_purifiers has_paragon_dlc = yes NOT = { has_councilor = { COUNCILOR = councilor_fanatic_purifiers } } } unlock_council_slots = 1 set_council_position_to_council = councilor_fanatic_purifiers if = { limit = { any_owned_leader = { leader_class = commander is_councilor = no is_ruler = no } } random_owned_leader = { limit = { leader_class = commander is_councilor = no is_ruler = no } set_council_position = councilor_fanatic_purifiers } } else = { create_leader = { class = commander name = random species = owner_main_species randomize_traits = no } last_created_leader = { set_council_position = councilor_fanatic_purifiers add_trait = { trait = random_common show_message = no consume_selection = yes } } } } else_if = { limit = { has_valid_civic = civic_scorched_earth has_paragon_dlc = yes NOT = { has_councilor = { COUNCILOR = councilor_infernal_scorcher } } } unlock_council_slots = 1 set_council_position_to_council = councilor_infernal_scorcher if = { limit = { any_owned_leader = { leader_class = commander is_councilor = no is_ruler = no } } random_owned_leader = { limit = { leader_class = commander is_councilor = no is_ruler = no } set_council_position = councilor_infernal_scorcher } } else = { create_leader = { class = commander name = random species = owner_main_species randomize_traits = no } last_created_leader = { set_council_position = councilor_infernal_scorcher add_trait = { trait = random_common show_message = no consume_selection = yes } } } } } } ### Empire Focus country_event = { id = game_start.74 hide_window = yes is_triggered_only = yes event_message_type = EMPIRE_FOCUS immediate = { create_message = { type = EMPIRE_FOCUS localization = game_start.74.title days = 30 } } } country_event = { id = game_start.75 hide_window = yes is_triggered_only = yes immediate = { every_owned_pop_group = { limit = { has_citizenship_type = { country = root type = citizenship_slavery } } save_event_target_as = source_pop_group planet = { create_pop_group = { pop_group = event_target:source_pop_group category = slave size = 0 effect = { transfer_pop_amount = { source = event_target:source_pop_group target = this percentage = 1 growth_category = "GROWTH_CAT_PROMOTION" } } } } } } }