############################ # # Crisis Events II # # Written by Henrik Thyrwall # ############################ namespace = crisis ### EXTRADIMENSIONALS country_event = { id = crisis.10001 hide_window = yes is_test_event = yes trigger = { always = no } immediate = { if = { limit = { NOT = { exists = event_target:portal_holder_1 } } create_country = { name = "NAME_Portal_Holder_1" type = portal_holder flag = { icon= { category = "special" file = "extradimensional_01.dds" } background= { category = "backgrounds" file = "circle.dds" } colors={ "black" "black" "null" "null" } } effect = { save_global_event_target_as = portal_holder_1 every_playable_country = { establish_communications_no_message = event_target:portal_holder_1 } } } } #if = { # limit = { NOT = { any_country = { is_country_type = extradimensional has_country_flag = unbidden } } } random_country = { limit = { is_country_type = extradimensional } set_country_flag = unbidden } #} random_country = { limit = { is_country_type = portal_holder } random_controlled_ship = { set_ship_flag = unbidden_portal } } } } country_event = { id = crisis.10002 hide_window = yes trigger = { always = no } is_test_event = yes immediate = { random_country = { limit = { is_country_type = portal_holder } random_controlled_ship = { limit = { is_ship_size = dimensional_portal_ed } set_ship_flag = unbidden_portal } } } } # Extradimensional Invasion Begins (HIDDEN) country_event = { id = crisis.1000 hide_window = yes fire_only_once = yes is_triggered_only = yes immediate = { set_crisis_sound = extradimensional_crisis_ambient_stage_1 set_crisis_stage_1 = yes create_country = { name = "NAME_Portal_Holder_1" type = portal_holder flag = { icon= { category = "special" file = "extradimensional_01.dds" } background= { category = "backgrounds" file = "circle.dds" } colors={ "black" "black" "null" "null" } } effect = { save_global_event_target_as = portal_holder_1 every_playable_country = { establish_communications_no_message = event_target:portal_holder_1 } } } awaken_guardians_of_the_galaxy = yes endgame_telemetry = extradimensional set_global_flag = extradimensional_invasion_happened set_global_flag = galactic_crisis_happened random_system = { limit = { NOR = { is_star_class = sc_pulsar is_star_class = sc_binary_1 AND = { exists = owner owner = { OR = { is_country_type = fallen_empire is_country_type = awakened_fallen_empire } } } has_star_flag = crisis_spawn_exclude } } set_star_flag = extradimensional_origin_system save_event_target_as = extradimensional_system random_system_planet = { create_species = { name = "NAME_Unbidden" class = EXD namelist = Extradimensional portrait = exd1_leader traits = random effect = { save_event_target_as = extradimensional_species } } create_country = { name = "NAME_Unbidden" type = "extradimensional" species = event_target:extradimensional_species name_list = "Extradimensional" flag = { icon= { category = "special" file = "extradimensional_01.dds" } background= { category = "backgrounds" file = "circle.dds" } colors={ "indigo" "blue" "null" "null" } } effect = { set_country_flag = unbidden create_ship_design = { design = "NAME_Void_Shaper" } add_ship_design = last_created_design create_ship_design = { design = "NAME_Unbidden_Anchor" } add_ship_design = last_created_design create_ship_design = { design = "NAME_Unbidden_Starbase" } add_ship_design = last_created_design save_global_event_target_as = extradimensionals establish_communications_no_message = event_target:portal_holder_1 set_faction_hostility = { target = event_target:portal_holder_1 set_hostile = no } set_graphical_culture = extra_dimensional_01 save_event_target_as = extradimensionals } } event_target:extradimensionals = { create_fleet = { name = "NAME_Dimensional_Portal" effect = { set_owner = PREV create_ship = { name = random design = "NAME_Unbidden_Portal" graphical_culture = "extra_dimensional_01" effect = { set_ship_flag = unbidden_portal } } set_location = { target = PREVPREV distance = 40 angle = random } save_event_target_as = dimensional_portal fleet_event = { id = crisis.1003 days = 15 } # Second Fleet Arrives fleet_event = { id = crisis.1003 days = 30 } # Third Fleet Arrives fleet_event = { id = crisis.1003 days = 55 } # Fourth Fleet Arrives fleet_event = { id = crisis.1003 days = 90 } # Fifth Fleet Arrives fleet_event = { id = crisis.1003 days = 180 } # Sixth Fleet Arrives fleet_event = { id = crisis.1003 days = 265 } # Seventh Fleet Arrives fleet_event = { id = crisis.1003 days = 340 } # Eight Fleet Arrives fleet_event = { id = crisis.1003 days = 425 } # Ninth Fleet Arrives fleet_event = { id = crisis.1003 days = 550 } # Tenth Fleet Arrives fleet_event = { id = crisis.1006 days = 20 } # First Constructor Arrives fleet_event = { id = crisis.1006 days = 25 } # Second Constructor Arrives fleet_event = { id = crisis.1006 days = 160 } # Third Constructor Arrives fleet_event = { id = crisis.1006 days = 310 } # Fourth Constructor Arrives event_target:extradimensionals = { country_event = { id = crisis.1260 days = 350 } } # Spawn Cycle starts #set_owner = event_target:portal_holder_1 #when first anchor built } } create_leader = { class = commander species = event_target:extradimensional_species name = random skill = 3 traits = { trait = leader_trait_ethereal } } create_fleet = { effect = { set_owner = PREV create_ship = { name = random design = "NAME_Revenant" graphical_culture = "extra_dimensional_01" } assign_leader = last_created_leader while = { count = 24 create_ship = { name = random design = "NAME_Revenant" graphical_culture = "extra_dimensional_01" } } while = { count = 40 create_ship = { name = random design = "NAME_Phantom" graphical_culture = "extra_dimensional_01" } } while = { count = 60 create_ship = { name = random design = "NAME_Wraith" graphical_culture = "extra_dimensional_01" } } set_location = { target = event_target:dimensional_portal distance = 5 angle = random } set_fleet_stance = aggressive set_aggro_range = 500 set_aggro_range_measure_from = self set_fleet_bombardment_stance = armageddon } } } } if = { limit = { exists = starbase } starbase = { fleet = { destroy_fleet = this } } } create_starbase = { size = starbase_exd owner = event_target:extradimensionals } star = { create_ambient_object = { type = "extradimensional_2" location = this } last_created_ambient_object = { set_ambient_object_flag = extradimensional_system_effect_2 set_location = { target = prev distance = 0 angle = random } } } } observer_event = { id = observer.34 } # make portal invincible event_target:extradimensionals = { random_controlled_ship = { ship_event = { id = crisis.1280 } } } # Custodian/Emperor Announcements event_target:extradimensionals = { save_event_target_as = crisis_country } if = { limit = { has_galactic_custodian = yes } random_playable_country = { limit = { is_galactic_custodian = yes } country_event = { id = custodian.50 days = 30 } } } if = { limit = { has_galactic_emperor = yes } event_target:gal_emperor = { country_event = { id = emperor.90 days = 30 } } } every_country = { limit = { OR = { is_country_type = default is_country_type = fallen_empire is_country_type = awakened_fallen_empire } intel_level = { level = high system = event_target:extradimensional_system } } country_event = { id = crisis.1007 } } every_country = { limit = { OR = { is_country_type = default is_country_type = fallen_empire is_country_type = awakened_fallen_empire } NOT = { intel_level = { level = high system = event_target:extradimensional_system } } } country_event = { id = crisis.1008 } } } after = { every_playable_country = { country_event = { id = timeline.67 } # Timeline Unbidden Crisis } } } # Fleet Reinforcements fleet_event = { id = crisis.1003 hide_window = yes is_triggered_only = yes immediate = { create_unbidden_fleet = yes if = { limit = { is_difficulty > 3 } create_unbidden_fleet = yes } if = { limit = { is_difficulty > 5 } create_unbidden_fleet = yes } } } # Constructor fleet_event = { id = crisis.1006 hide_window = yes is_triggered_only = yes immediate = { event_target:extradimensionals = { create_fleet = { effect = { set_owner = PREV create_ship = { name = random design = "NAME_Void_Shaper" graphical_culture = "extra_dimensional_01" } set_location = { target = ROOT distance = 5 angle = random } } } } } } # Notification (High Intel) country_event = { id = crisis.1007 title = "crisis.1007.name" desc = "crisis.1007.desc" picture = GFX_evt_wormhole show_sound = event_ex_started location = event_target:extradimensional_system is_triggered_only = yes after = { begin_event_chain = { event_chain = "extradimensional_invasion_chain" target = ROOT } create_point_of_interest = { id = extradimensional_invasion_poi.1 name = "extradimensional_invasion_1_poi" desc = "extradimensional_invasion_1_poi_desc" event_chain = "extradimensional_invasion_chain" location = event_target:extradimensional_system } create_point_of_interest = { id = extradimensional_invasion_poi.4 name = "extradimensional_invasion_4_poi" desc = "extradimensional_invasion_4_poi_desc" event_chain = "extradimensional_invasion_chain" } hidden_effect = { add_event_chain_counter = { event_chain = "extradimensional_invasion_chain" counter = "dimensional_anchors_1" amount = 1 } country_event = { id = crisis.1010 } } if = { limit = { any_planet_within_border = { has_planet_flag = fotd_seperatist_planet@root owner = { has_country_flag = fotd_seperatist_country@root } } } country_event = { id = origin.6130 days = 5 random = 2 } } } option = { name = crisis.18.a trigger = { has_spiritualist_government = yes NOR = { has_ethic = "ethic_fanatic_egalitarian" has_ethic = "ethic_fanatic_authoritarian" has_ethic = "ethic_fanatic_xenophile" has_ethic = "ethic_fanatic_xenophobe" } } } option = { name = crisis.18.b trigger = { has_militarist_government = yes NOR = { has_ethic = "ethic_fanatic_egalitarian" has_ethic = "ethic_fanatic_authoritarian" has_ethic = "ethic_fanatic_xenophile" has_ethic = "ethic_fanatic_xenophobe" } } } option = { name = crisis.18.c trigger = { has_materialist_government = yes NOR = { has_ethic = "ethic_fanatic_egalitarian" has_ethic = "ethic_fanatic_authoritarian" has_ethic = "ethic_fanatic_xenophile" has_ethic = "ethic_fanatic_xenophobe" } } } option = { name = crisis.18.d trigger = { has_pacifist_government = yes NOR = { has_ethic = "ethic_fanatic_egalitarian" has_ethic = "ethic_fanatic_authoritarian" has_ethic = "ethic_fanatic_xenophile" has_ethic = "ethic_fanatic_xenophobe" } } } option = { name = crisis.18.e trigger = { OR = { has_government = gov_megacorporation has_government = gov_trade_league is_megacorp = yes } NOR = { has_ethic = "ethic_fanatic_egalitarian" has_ethic = "ethic_fanatic_authoritarian" has_ethic = "ethic_fanatic_xenophile" has_ethic = "ethic_fanatic_xenophobe" } } } option = { name = crisis.18.f trigger = { OR = { has_generic_government = yes has_government = gov_enlightened_monarchy has_government = gov_elective_monarchy has_government = gov_hive_mind has_government = gov_wilderness has_government = gov_parasitic_overmind has_government = gov_successor_khanate has_government = gov_diadochi } NOR = { has_ethic = "ethic_fanatic_egalitarian" has_ethic = "ethic_fanatic_authoritarian" has_ethic = "ethic_fanatic_xenophile" has_ethic = "ethic_fanatic_xenophobe" } } } option = { name = crisis.18.g trigger = { has_ethic = "ethic_fanatic_xenophobe" } } option = { name = crisis.1007.a trigger = { has_ethic = "ethic_fanatic_xenophile" } } option = { name = crisis.1007.b trigger = { has_ethic = "ethic_fanatic_authoritarian" } } option = { name = crisis.18.j trigger = { has_ethic = "ethic_fanatic_egalitarian" } } option = { name = crisis.18.h trigger = { has_ethic = ethic_gestalt_consciousness } } } # Notification country_event = { id = crisis.1008 title = "crisis.1008.name" desc = "crisis.1008.desc" picture = GFX_evt_physics_research show_sound = event_alien_signal is_triggered_only = yes option = { name = crisis.1008.a hidden_effect = { country_event = { id = crisis.1009 days = 30 } } } } # Threat Identified country_event = { id = crisis.1009 title = "crisis.1007.name" desc = "crisis.1009.desc" picture = GFX_evt_wormhole show_sound = event_ex_started location = event_target:extradimensional_system is_triggered_only = yes immediate = { random_system = { limit = { has_star_flag = extradimensional_origin_system } save_event_target_as = extradimensional_system } } after = { begin_event_chain = { event_chain = "extradimensional_invasion_chain" target = ROOT } create_point_of_interest = { id = extradimensional_invasion_poi.1 name = "extradimensional_invasion_1_poi" desc = "extradimensional_invasion_1_poi_desc" event_chain = "extradimensional_invasion_chain" location = event_target:extradimensional_system } create_point_of_interest = { id = extradimensional_invasion_poi.4 name = "extradimensional_invasion_4_poi" desc = "extradimensional_invasion_4_poi_desc" event_chain = "extradimensional_invasion_chain" } hidden_effect = { add_event_chain_counter = { event_chain = "extradimensional_invasion_chain" counter = "dimensional_anchors_1" amount = 1 } country_event = { id = crisis.1010 } } if = { limit = { any_planet_within_border = { has_planet_flag = fotd_seperatist_planet@root owner = { has_country_flag = fotd_seperatist_country@root } } } country_event = { id = origin.6130 days = 5 random = 2 } } } option = { name = crisis.18.a trigger = { has_spiritualist_government = yes NOR = { has_ethic = "ethic_fanatic_egalitarian" has_ethic = "ethic_fanatic_authoritarian" has_ethic = "ethic_fanatic_xenophile" has_ethic = "ethic_fanatic_xenophobe" } } } option = { name = crisis.18.b trigger = { has_militarist_government = yes NOR = { has_ethic = "ethic_fanatic_egalitarian" has_ethic = "ethic_fanatic_authoritarian" has_ethic = "ethic_fanatic_xenophile" has_ethic = "ethic_fanatic_xenophobe" } } } option = { name = crisis.18.c trigger = { has_materialist_government = yes NOR = { has_ethic = "ethic_fanatic_egalitarian" has_ethic = "ethic_fanatic_authoritarian" has_ethic = "ethic_fanatic_xenophile" has_ethic = "ethic_fanatic_xenophobe" } } } option = { name = crisis.18.d trigger = { has_pacifist_government = yes NOR = { has_ethic = "ethic_fanatic_egalitarian" has_ethic = "ethic_fanatic_authoritarian" has_ethic = "ethic_fanatic_xenophile" has_ethic = "ethic_fanatic_xenophobe" } } } option = { name = crisis.18.e trigger = { OR = { has_government = gov_megacorporation has_government = gov_trade_league is_megacorp = yes } NOR = { has_ethic = "ethic_fanatic_egalitarian" has_ethic = "ethic_fanatic_authoritarian" has_ethic = "ethic_fanatic_xenophile" has_ethic = "ethic_fanatic_xenophobe" } } } option = { name = crisis.18.f trigger = { OR = { has_generic_government = yes has_government = gov_enlightened_monarchy has_government = gov_elective_monarchy has_government = gov_hive_mind has_government = gov_wilderness has_government = gov_parasitic_overmind has_government = gov_successor_khanate has_government = gov_diadochi is_fallen_empire = yes } NOR = { has_ethic = "ethic_fanatic_egalitarian" has_ethic = "ethic_fanatic_authoritarian" has_ethic = "ethic_fanatic_xenophile" has_ethic = "ethic_fanatic_xenophobe" } } } option = { name = crisis.18.g trigger = { has_ethic = "ethic_fanatic_xenophobe" } } option = { name = crisis.1007.a trigger = { has_ethic = "ethic_fanatic_xenophile" } } option = { name = crisis.1007.b trigger = { has_ethic = "ethic_fanatic_authoritarian" } } option = { name = crisis.18.j trigger = { has_ethic = "ethic_fanatic_egalitarian" } } option = { name = crisis.18.h trigger = { has_ethic = ethic_gestalt_consciousness } } } # Intercepted Transmission country_event = { id = crisis.1010 title = "crisis.1010.name" diplomatic_title = BLANK_STRING desc = "crisis.1010.desc" diplomatic = yes picture_event_data = { portrait = exd1 room = "extradimensional_blue_room" } is_triggered_only = yes immediate = { establish_communications_no_message = event_target:extradimensionals } option = { name = crisis.1010.a } } # Colony Bombarded planet_event = { id = crisis.1011 title = "crisis.1011.name" desc = "crisis.1011.desc" picture = GFX_evt_city_ruins show_sound = event_ghost_town is_triggered_only = yes trigger = { planet_devastation >= 100 FROM = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } } } immediate = { add_threat = { who = from amount = 2 } destroy_colony = yes if = { limit = { is_artificial = no } random_list = { 50 = { change_pc = pc_barren } 50 = { change_pc = pc_barren_cold } } reset_planet = yes add_modifier = { modifier = "terraforming_candidate" days = -1 } } else_if = { limit = { is_ringworld = yes } change_pc = pc_ringworld_habitable_damaged reset_planet = yes } else_if = { limit = { is_planet_class = pc_habitat } spawn_habitat_cracker_effect = yes } if = { limit = { FROM = { is_country_type = extradimensional } } every_country = { limit = { has_event_chain = "extradimensional_invasion_chain" } add_event_chain_counter = { event_chain = "extradimensional_invasion_chain" counter = "extradimensional_planets_1" amount = 1 } } } else_if = { limit = { FROM = { is_country_type = extradimensional_2 } } every_country = { limit = { has_event_chain = "extradimensional_invasion_chain_2" } add_event_chain_counter = { event_chain = "extradimensional_invasion_chain_2" counter = "extradimensional_planets_2" amount = 1 } } } else_if = { limit = { FROM = { is_country_type = extradimensional_3 } } every_country = { limit = { has_event_chain = "extradimensional_invasion_chain_3" } add_event_chain_counter = { event_chain = "extradimensional_invasion_chain_3" counter = "extradimensional_planets_3" amount = 1 } } } solar_system = { if = { # Build starbase if no other colonies are left limit = { NOT = { exists = starbase any_system_planet = { has_owner = yes owner = { NOT = { is_same_value = from } } } } } create_starbase = { size = starbase_exd_0 owner = from } random_ship_in_system = { limit = { owner = { is_same_value = from } } ship_event = { id = crisis.1300 } # Check if starbase should be Anchor ship_event = { id = crisis.1310 } # Create system effect } } } } option = { name = crisis.1011.a } } # Portal Destroyed (HIDDEN) country_event = { id = crisis.1012 hide_window = yes fire_only_once = yes is_triggered_only = yes trigger = { is_country_type = extradimensional FROMFROM = { is_ship_size = dimensional_portal_ed } } immediate = { random_system = { limit = { has_star_flag = extradimensional_origin_system } random_system_ambient_object = { limit = { has_ambient_object_flag = extradimensional_system_effect_2 } destroy_ambient_object = this } } if = { limit = { OR = { NOT = { has_global_flag = extradimensional_second_portal } AND = { has_global_flag = extradimensional_second_portal_destroyed has_global_flag = extradimensional_third_portal_destroyed } } } stop_crisis_sound = yes FROM = { save_event_target_as = portal_killer if = { limit = { is_ai = no } country_event = { id = crisis.1250 days = 10 random = 10 } set_country_flag = with_great_power_achievement } } observer_event = { id = observer.35 } every_playable_country = { if = { limit = { has_communications = FROM } add_opinion_modifier = { who = FROM modifier = opinion_destroyed_portal } } add_modifier = { modifier = "extradimensionals_defeated" days = 360 } country_event = { id = crisis.1013 } } } else_if = { limit = { has_global_flag = extradimensional_second_portal NOR = { has_global_flag = extradimensional_second_portal_destroyed has_global_flag = extradimensional_third_portal_destroyed } } every_playable_country = { country_event = { id = crisis.1016 } } } } } # Portal Destroyed country_event = { id = crisis.1013 title = "crisis.1013.name" desc = "crisis.1013.desc" picture = GFX_evt_wormhole show_sound = event_super_explosion is_triggered_only = yes immediate = { random_system = { limit = { has_star_flag = extradimensional_origin_system } save_event_target_as = extradimensional_system } remove_point_of_interest = extradimensional_invasion_poi.1 set_country_flag = extradimensionals_expunged } option = { name = crisis.1013.a } } # Portal Destroyed (Other Portals Exist) country_event = { id = crisis.1016 title = "crisis.1016.name" desc = "crisis.1016.desc" picture = GFX_evt_wormhole show_sound = event_super_explosion is_triggered_only = yes immediate = { random_system = { limit = { has_star_flag = extradimensional_origin_system } save_event_target_as = extradimensional_system } set_global_flag = extradimensional_first_portal_destroyed remove_point_of_interest = extradimensional_invasion_poi.1 } option = { name = crisis.1016.a } } # Unbidden Diplomacy country_event = { id = crisis.1050 title = "TRANSMISSION" desc = { text = crisis.1050.desc_01 trigger = { NOR = { owner_species = { is_psionic_species = yes has_trait = trait_mechanical } is_machine_empire = yes } } } desc = { text = crisis.1050.desc_02 trigger = { NOT = { owner_species = { is_psionic_species = yes } } } } desc = { text = crisis.1050.desc_03 trigger = { NOR = { owner_species = { is_psionic_species = yes has_trait = trait_mechanical } is_machine_empire = yes } } } desc = { text = crisis.1050.desc_04 trigger = { owner_species = { is_psionic_species = yes } } } desc = { text = crisis.1050.desc_05 trigger = { owner_species = { is_psionic_species = yes } } } desc = { text = crisis.1050.desc_06 trigger = { owner_species = { is_psionic_species = yes } } } desc = { text = crisis.1050.desc_07 trigger = { OR = { owner_species = { has_trait = trait_mechanical } is_machine_empire = yes } } } diplomatic = yes force_open = yes picture_event_data = { portrait = exd1 room = "extradimensional_blue_room" } is_triggered_only = yes trigger = { FROM = { is_country_type = extradimensional } } option = { name = crisis.1050.a response_text = crisis.1050.a.response trigger = { NOR = { is_machine_empire = yes owner_species = { has_trait = trait_mechanical } } } } option = { name = crisis.1050.b trigger = { OR = { has_ethic = "ethic_pacifist" has_ethic = "ethic_fanatic_pacifist" } } response_text = crisis.1050.b.response } option = { name = crisis.1050.c trigger = { OR = { is_militarist = yes is_machine_empire = yes } } response_text = crisis.1050.c.response } option = { name = crisis.1050.d trigger = { is_xenophobe = yes } response_text = crisis.1050.d.response } option = { name = crisis.1050.e trigger = { OR = { has_ethic = "ethic_xenophile" has_ethic = "ethic_fanatic_xenophile" } NOT = { owner_species = { has_trait = trait_mechanical } } } response_text = crisis.1050.e.response } option = { name = crisis.1050.f trigger = { OR = { has_ethic = "ethic_spiritualist" has_ethic = "ethic_fanatic_spiritualist" } NOT = { owner_species = { is_psionic_species = yes } } } response_text = crisis.1050.f.response } option = { name = crisis.1050.g trigger = { owner_species = { is_psionic_species = yes } } response_text = crisis.1050.g.response } option = { name = crisis.1050.a response_text = crisis.1050.a.b.response trigger = { OR = { is_machine_empire = yes owner_species = { has_trait = trait_mechanical } } } } } # Aberrant Diplomacy country_event = { id = crisis.1051 title = "TRANSMISSION" desc = { text = crisis.1051.desc_01 trigger = { NOT = { has_country_flag = works_with_formless } } } desc = { text = crisis.1051.desc_02 trigger = { NOT = { has_country_flag = works_with_formless } } } desc = { text = crisis.1051.desc_03 trigger = { NOT = { has_country_flag = works_with_formless } } } desc = { text = crisis.1051.desc_04 trigger = { has_country_flag = works_with_formless # Happens if you have a Formless Admiral leader } } diplomatic = yes force_open = yes picture_event_data = { portrait = exd2 room = "extradimensional_orange_room" } is_triggered_only = yes trigger = { FROM = { is_country_type = extradimensional_2 } } option = { name = crisis.1051.a response_text = crisis.1051.a.response } } # Vehement Diplomacy country_event = { id = crisis.1052 title = "TRANSMISSION" desc = { text = crisis.1052.desc_01 } desc = { text = crisis.1052.desc_02 } desc = { text = crisis.1052.desc_03 } diplomatic = yes force_open = yes picture_event_data = { portrait = exd3 room = "extradimensional_green_room" } is_triggered_only = yes trigger = { FROM = { is_country_type = extradimensional_3 } } option = { name = crisis.1052.a response_text = crisis.1052.a.response } } ### Second Portal # Second Portal Appears (HIDDEN) country_event = { id = crisis.1100 hide_window = yes fire_only_once = yes trigger = { is_country_type = extradimensional NOT = { has_global_flag = extradimensional_second_portal } endgame_crisis_large_size_trigger = yes } mean_time_to_happen = { months = 12 } immediate = { set_crisis_sound = extradimensional_crisis_ambient_stage_3 set_crisis_stage_3 = yes set_global_flag = extradimensional_second_portal random_system_within_border = { limit = { NOR = { is_star_class = sc_pulsar is_star_class = sc_binary_1 has_star_flag = extradimensional_origin_system } } set_star_flag = extradimensional_second_portal_system save_event_target_as = second_portal_system random_system_planet = { create_species = { name = "NAME_Aberrant" class = EXD namelist = Extradimensional portrait = exd2_leader traits = random effect = { save_event_target_as = extradimensional_hunters_species } } create_country = { name = "NAME_Aberrant" type = "extradimensional_2" species = event_target:extradimensional_hunters_species name_list = "Extradimensional" flag = { icon= { category = "special" file = "extradimensional_02.dds" } background= { category = "backgrounds" file = "triangle_split.dds" } colors={ "brown" "orange" "null" "null" } } effect = { set_country_flag = aberrant save_global_event_target_as = extradimensionals2 create_ship_design = { design = "NAME_Void_Former" } add_ship_design = last_created_design create_ship_design = { design = "NAME_Aberrant_Anchor" } add_ship_design = last_created_design create_ship_design = { design = "NAME_Unbidden_Starbase" } add_ship_design = last_created_design establish_communications_no_message = event_target:portal_holder_1 set_faction_hostility = { target = event_target:portal_holder_1 set_hostile = no } save_event_target_as = extradimensional_hunters set_graphical_culture = extra_dimensional_02 } } event_target:extradimensional_hunters = { create_fleet = { name = "NAME_Dimensional_Portal" effect = { set_owner = PREV create_ship = { name = random design = "NAME_Aberrant_Portal" graphical_culture = "extra_dimensional_02" effect = { set_ship_flag = aberrant_portal } } set_location = { target = PREVPREV distance = 40 angle = random } save_event_target_as = second_portal fleet_event = { id = crisis.1103 days = 1 } # Fleet Arrives fleet_event = { id = crisis.1103 days = 5 } # Fleet Arrives fleet_event = { id = crisis.1103 days = 15 } # Fleet Arrives fleet_event = { id = crisis.1103 days = 30 } # Fleet Arrives fleet_event = { id = crisis.1103 days = 45 } # Fleet Arrives fleet_event = { id = crisis.1103 days = 60 } # Fleet Arrives fleet_event = { id = crisis.1103 days = 150 } # Fleet Arrives fleet_event = { id = crisis.1103 days = 350 } # Fleet Arrives fleet_event = { id = crisis.1106 days = 20 } # Constructor Arrives fleet_event = { id = crisis.1106 days = 25 } # Constructor Arrives fleet_event = { id = crisis.1106 days = 90 } # Constructor Arrives fleet_event = { id = crisis.1106 days = 210 } # Constructor Arrives event_target:extradimensional_hunters = { country_event = { id = crisis.1260 days = 550 } } # Spawn Cycle starts } } random_list = { 25 = { create_leader = { class = commander species = event_target:extradimensional_hunters_species name = random skill = 3 traits = { trait = leader_trait_ethereal } } } 25 = { create_leader = { class = commander species = event_target:extradimensional_hunters_species name = random skill = 3 traits = { trait = leader_trait_dimensional_stutter } } } 50 = { create_leader = { class = commander species = event_target:extradimensional_hunters_species name = random skill = 3 } } } create_fleet = { effect = { set_owner = PREV create_ship = { name = random design = "NAME_Huntress" graphical_culture = "extra_dimensional_02" } assign_leader = last_created_leader while = { count = 12 create_ship = { name = random design = "NAME_Huntress" graphical_culture = "extra_dimensional_02" } } while = { count = 20 create_ship = { name = random design = "NAME_Assassin" graphical_culture = "extra_dimensional_02" } } while = { count = 30 create_ship = { name = random design = "NAME_Predator" graphical_culture = "extra_dimensional_02" } } set_location = { target = event_target:second_portal distance = 5 angle = random } set_fleet_stance = aggressive set_aggro_range = 500 set_aggro_range_measure_from = self set_fleet_bombardment_stance = armageddon } } } } if = { limit = { exists = starbase } starbase = { fleet = { destroy_fleet = this } } } create_starbase = { size = starbase_exd owner = event_target:extradimensionals2 } star = { create_ambient_object = { type = "extradimensional_2" location = this } last_created_ambient_object = { set_ambient_object_flag = extradimensional_system_effect_2 set_location = { target = prev distance = 0 angle = random } } } } observer_event = { id = observer.36 } # make portal invincible event_target:extradimensionals2 = { random_controlled_ship = { ship_event = { id = crisis.1280 } } } every_country = { limit = { OR = { is_country_type = default is_country_type = fallen_empire is_country_type = awakened_fallen_empire } } country_event = { id = crisis.1110 days = 1 } } random_country = { limit = { is_country_type = extradimensional_2 } establish_communications_no_message = root } } } # Fleet Reinforcements fleet_event = { id = crisis.1103 hide_window = yes is_triggered_only = yes immediate = { event_target:extradimensional_hunters = { random_list = { 25 = { create_leader = { class = commander species = event_target:extradimensional_hunters_species name = random skill = 3 traits = { trait = leader_trait_ethereal } } } 25 = { create_leader = { class = commander species = event_target:extradimensional_hunters_species name = random skill = 3 traits = { trait = leader_trait_dimensional_stutter } } } 50 = { create_leader = { class = commander species = event_target:extradimensional_hunters_species name = random skill = 3 } } } create_fleet = { effect = { set_owner = PREV create_ship = { name = random design = "NAME_Huntress" graphical_culture = "extra_dimensional_02" } assign_leader = last_created_leader while = { count = 5 create_ship = { name = random design = "NAME_Huntress" graphical_culture = "extra_dimensional_02" } } while = { count = 8 create_ship = { name = random design = "NAME_Assassin" graphical_culture = "extra_dimensional_02" } } while = { count = 12 create_ship = { name = random design = "NAME_Predator" graphical_culture = "extra_dimensional_02" } } set_location = { target = ROOT distance = 5 angle = random } set_fleet_stance = aggressive set_aggro_range = 500 set_aggro_range_measure_from = self set_fleet_bombardment_stance = armageddon } } } } } # Constructor fleet_event = { id = crisis.1106 hide_window = yes is_triggered_only = yes immediate = { event_target:extradimensional_hunters = { create_fleet = { effect = { set_owner = PREV create_ship = { name = random design = "NAME_Void_Former" graphical_culture = "extra_dimensional_02" } set_location = { target = ROOT distance = 5 angle = random } } } } } } # Second Portal Notification country_event = { id = crisis.1110 title = "crisis.1110.name" desc = "crisis.1110.desc" picture = GFX_evt_wormhole show_sound = event_ex_started location = event_target:second_portal_system is_triggered_only = yes immediate = { random_country = { limit = { is_country_type = extradimensional_2 } establish_communications_no_message = ROOT } } option = { name = crisis.1110.a begin_event_chain = { event_chain = "extradimensional_invasion_chain_2" target = ROOT } create_point_of_interest = { id = extradimensional_invasion_poi.2 name = "extradimensional_invasion_2_poi" desc = "extradimensional_invasion_2_poi_desc" event_chain = "extradimensional_invasion_chain_2" location = event_target:second_portal_system } hidden_effect = { add_event_chain_counter = { event_chain = "extradimensional_invasion_chain_2" counter = "dimensional_anchors_2" amount = 1 } } } } # Extradimensionals Fight Each Other (HIDDEN) country_event = { id = crisis.1111 hide_window = yes fire_only_once = yes is_triggered_only = yes trigger = { exists = from NOT = { has_global_flag = extradimensionals_fight } OR = { is_country_type = extradimensional is_country_type = extradimensional_2 } FROM = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 } } } immediate = { set_global_flag = extradimensionals_fight every_country = { limit = { is_country_type = default } country_event = { id = crisis.1112 } } } } # Extradimensionals Fight Each Other country_event = { id = crisis.1112 title = "crisis.1112.name" desc = "crisis.1112.desc" picture = GFX_evt_wormhole show_sound = event_alien_signal is_triggered_only = yes option = { name = crisis.1112.a hidden_effect = { country_event = { id = crisis.1113 } } } } # Transmission from Second Portal country_event = { id = crisis.1113 title = "TRANSMISSION" desc = "crisis.1113.desc" diplomatic = yes picture_event_data = { portrait = exd2 room = "extradimensional_orange_room" } is_triggered_only = yes option = { name = crisis.1113.a } } # Second Portal Destroyed (HIDDEN) country_event = { id = crisis.1115 hide_window = yes fire_only_once = yes is_triggered_only = yes trigger = { is_country_type = extradimensional_2 FROMFROM = { is_ship_size = dimensional_portal_ed } } immediate = { observer_event = { id = observer.37 } random_system = { limit = { has_star_flag = extradimensional_second_portal_system } random_system_ambient_object = { limit = { has_ambient_object_flag = extradimensional_system_effect_2 } destroy_ambient_object = this } } if = { limit = { has_global_flag = extradimensional_first_portal_destroyed has_global_flag = extradimensional_third_portal_destroyed } stop_crisis_sound = yes every_country = { limit = { is_country_type = default } country_event = { id = crisis.1116 } } FROM = { save_event_target_as = portal_killer } if = { limit = { from = { is_ai = no } } country_event = { id = crisis.1250 days = 10 random = 10 } set_country_flag = with_great_power_achievement } every_country = { limit = { is_country_type = default has_communications = FROM } add_opinion_modifier = { who = FROM modifier = opinion_destroyed_portal } } every_country = { limit = { is_country_type = default } add_modifier = { modifier = "extradimensionals_defeated" days = 360 } } } else = { every_country = { limit = { is_country_type = default } country_event = { id = crisis.1117 } } } } } # Second Portal Destroyed country_event = { id = crisis.1116 title = "crisis.1116.name" picture = GFX_evt_wormhole show_sound = event_super_explosion desc = { text = "crisis.1116.desc.a" trigger = { has_communications = event_target:portal_killer } } desc = { text = "crisis.1116.desc.b" trigger = { NOT = { has_communications = event_target:portal_killer } } } is_triggered_only = yes immediate = { random_system = { limit = { has_star_flag = extradimensional_second_portal_system } save_event_target_as = extradimensional_system } remove_point_of_interest = extradimensional_invasion_poi.2 set_country_flag = extradimensionals_expunged } option = { name = crisis.1013.a } } # Second Portal Destroyed (Other Portals Exist) country_event = { id = crisis.1117 title = "crisis.1116.name" desc = "crisis.1117.desc" picture = GFX_evt_wormhole show_sound = event_super_explosion is_triggered_only = yes immediate = { random_system = { limit = { has_star_flag = extradimensional_second_portal_system } save_event_target_as = extradimensional_system } set_global_flag = extradimensional_second_portal_destroyed remove_point_of_interest = extradimensional_invasion_poi.2 } option = { name = crisis.1016.a } } ### Third Portal # Third Portal Appears (HIDDEN) country_event = { id = crisis.1200 hide_window = yes fire_only_once = yes trigger = { has_global_flag = extradimensionals_fight NOT = { has_global_flag = extradimensional_third_portal } is_country_type = extradimensional_2 any_country = { is_country_type = extradimensional } } mean_time_to_happen = { months = 40 } immediate = { set_global_flag = extradimensional_third_portal random_country = { limit = { is_country_type = extradimensional } random_system_within_border = { limit = { NOR = { is_star_class = sc_pulsar is_star_class = sc_binary_1 has_star_flag = extradimensional_origin_system has_star_flag = extradimensional_second_portal_system } } set_star_flag = extradimensional_third_portal_system save_event_target_as = third_portal_system random_system_planet = { create_species = { name = "NAME_Vehement" class = EXD namelist = Extradimensional portrait = exd3_leader traits = random effect = { save_event_target_as = extradimensional_trespassers_species } } create_country = { name = "NAME_Vehement" type = "extradimensional_3" species = event_target:extradimensional_trespassers_species name_list = "Extradimensional" flag = { icon= { category = "special" file = "extradimensional_03.dds" } background= { category = "backgrounds" file = "stripe.dds" } colors={ "green" "teal" "null" "null" } } effect = { set_country_flag = vehement save_global_event_target_as = extradimensionals3 create_ship_design = { design = "NAME_Void_Weaver" } add_ship_design = last_created_design create_ship_design = { design = "NAME_Vehement_Anchor" } add_ship_design = last_created_design create_ship_design = { design = "NAME_Unbidden_Starbase" } add_ship_design = last_created_design establish_communications_no_message = event_target:portal_holder_1 set_faction_hostility = { target = event_target:portal_holder_1 set_hostile = no } set_graphical_culture = extra_dimensional_03 save_event_target_as = extradimensional_trespassers } } event_target:extradimensional_trespassers = { create_fleet = { name = "NAME_Dimensional_Portal" effect = { set_owner = PREV create_ship = { name = random design = "NAME_Vehement_Portal" graphical_culture = "extra_dimensional_03" effect = { set_ship_flag = vehement_portal } } set_location = { target = PREVPREV distance = 40 angle = random } save_event_target_as = third_portal fleet_event = { id = crisis.1203 days = 1 } # Fleet Arrives fleet_event = { id = crisis.1203 days = 5 } # Fleet Arrives fleet_event = { id = crisis.1203 days = 15 } # Fleet Arrives fleet_event = { id = crisis.1203 days = 30 } # Fleet Arrives fleet_event = { id = crisis.1203 days = 45 } # Fleet Arrives fleet_event = { id = crisis.1203 days = 60 } # Fleet Arrives fleet_event = { id = crisis.1203 days = 150 } # Fleet Arrives fleet_event = { id = crisis.1203 days = 350 } # Fleet Arrives fleet_event = { id = crisis.1206 days = 20 } # Constructor Arrives fleet_event = { id = crisis.1206 days = 25 } # Constructor Arrives fleet_event = { id = crisis.1206 days = 90 } # Constructor Arrives fleet_event = { id = crisis.1206 days = 210 } # Constructor Arrives event_target:extradimensional_trespassers = { country_event = { id = crisis.1260 days = 550 } } # Spawn Cycle starts } } random_list = { 25 = { create_leader = { class = commander species = event_target:extradimensional_trespassers_species name = random skill = 3 traits = { trait = leader_trait_ethereal } } } 25 = { create_leader = { class = commander species = event_target:extradimensional_trespassers_species name = random skill = 3 traits = { trait = leader_trait_dimensional_stutter } } } 50 = { create_leader = { class = commander species = event_target:extradimensional_trespassers_species name = random skill = 3 } } } create_fleet = { effect = { set_owner = PREV create_ship = { name = random design = "NAME_Eradicator" graphical_culture = "extra_dimensional_03" } assign_leader = last_created_leader while = { count = 12 create_ship = { name = random design = "NAME_Eradicator" graphical_culture = "extra_dimensional_03" } } while = { count = 20 create_ship = { name = random design = "NAME_Annihilator" graphical_culture = "extra_dimensional_03" } } while = { count = 30 create_ship = { name = random design = "NAME_Obliterator" graphical_culture = "extra_dimensional_03" } } set_location = { target = event_target:third_portal distance = 5 angle = random } set_fleet_stance = aggressive set_aggro_range = 500 set_aggro_range_measure_from = self set_fleet_bombardment_stance = armageddon } } } } if = { limit = { exists = starbase } starbase = { fleet = { destroy_fleet = this } } } create_starbase = { size = starbase_exd owner = event_target:extradimensionals3 } star = { create_ambient_object = { type = "extradimensional_2" location = this } last_created_ambient_object = { set_ambient_object_flag = extradimensional_system_effect_2 set_location = { target = prev distance = 0 angle = random } } } } establish_communications_no_message = event_target:extradimensional_trespassers } observer_event = { id = observer.38 } # make portal invincible event_target:extradimensionals3 = { random_controlled_ship = { ship_event = { id= crisis.1280 } } } every_country = { limit = { OR = { is_country_type = default is_country_type = fallen_empire is_country_type = awakened_fallen_empire } } country_event = { id = crisis.1210 days = 1 } } establish_communications_no_message = event_target:extradimensional_trespassers } } # Fleet Reinforcements fleet_event = { id = crisis.1203 hide_window = yes is_triggered_only = yes immediate = { event_target:extradimensional_trespassers = { random_list = { 25 = { create_leader = { class = commander species = event_target:extradimensional_trespassers_species name = random skill = 3 traits = { trait = leader_trait_ethereal } } } 25 = { create_leader = { class = commander species = event_target:extradimensional_trespassers_species name = random skill = 3 traits = { trait = leader_trait_dimensional_stutter } } } 50 = { create_leader = { class = commander species = event_target:extradimensional_trespassers_species name = random skill = 3 } } } create_fleet = { effect = { set_owner = PREV create_ship = { name = random design = "NAME_Eradicator" graphical_culture = "extra_dimensional_03" } assign_leader = last_created_leader while = { count = 5 create_ship = { name = random design = "NAME_Eradicator" graphical_culture = "extra_dimensional_03" } } while = { count = 8 create_ship = { name = random design = "NAME_Annihilator" graphical_culture = "extra_dimensional_03" } } while = { count = 12 create_ship = { name = random design = "NAME_Obliterator" graphical_culture = "extra_dimensional_03" } } set_location = { target = ROOT distance = 5 angle = random } set_fleet_stance = aggressive set_aggro_range = 500 set_aggro_range_measure_from = self set_fleet_bombardment_stance = armageddon } } } } } # Constructor fleet_event = { id = crisis.1206 hide_window = yes is_triggered_only = yes immediate = { event_target:extradimensional_trespassers = { create_fleet = { effect = { set_owner = PREV create_ship = { name = random design = "NAME_Void_Weaver" graphical_culture = "extra_dimensional_03" } set_location = { target = ROOT distance = 5 angle = random } } } } } } # Third Portal Notification country_event = { id = crisis.1210 title = "crisis.1210.name" desc = "crisis.1210.desc" picture = GFX_evt_wormhole show_sound = event_ex_started location = event_target:third_portal_system is_triggered_only = yes immediate = { random_country = { limit = { is_country_type = extradimensional_3 } establish_communications_no_message = ROOT } } option = { name = crisis.1210.a begin_event_chain = { event_chain = "extradimensional_invasion_chain_3" target = ROOT } create_point_of_interest = { id = extradimensional_invasion_poi.3 name = "extradimensional_invasion_3_poi" desc = "extradimensional_invasion_3_poi_desc" event_chain = "extradimensional_invasion_chain_3" location = event_target:third_portal_system } hidden_effect = { hidden_effect = { add_event_chain_counter = { event_chain = "extradimensional_invasion_chain_3" counter = "dimensional_anchors_3" amount = 1 } country_event = { id = crisis.1211 } } } } } # Transmission from Third Portal country_event = { id = crisis.1211 title = "TRANSMISSION" desc = "crisis.1211.desc" diplomatic = yes picture_event_data = { portrait = exd3 room = "extradimensional_green_room" } is_triggered_only = yes option = { name = crisis.1211.a } } # Third Portal Destroyed (HIDDEN) country_event = { id = crisis.1215 hide_window = yes fire_only_once = yes is_triggered_only = yes trigger = { is_country_type = extradimensional_3 FROMFROM = { is_ship_size = dimensional_portal_ed } } immediate = { observer_event = { id = observer.39 } random_system = { limit = { has_star_flag = extradimensional_third_portal_system } random_system_ambient_object = { limit = { has_ambient_object_flag = extradimensional_system_effect_2 } destroy_ambient_object = this } } if = { limit = { has_global_flag = extradimensional_first_portal_destroyed has_global_flag = extradimensional_second_portal_destroyed } stop_crisis_sound = yes every_country = { limit = { is_country_type = default } country_event = { id = crisis.1216 } } FROM = { save_event_target_as = portal_killer } if = { limit = { from = { is_ai = no } } country_event = { id = crisis.1250 days = 10 random = 10 } set_country_flag = with_great_power_achievement } every_country = { limit = { is_country_type = default has_communications = FROM } add_opinion_modifier = { who = FROM modifier = opinion_destroyed_portal } } every_country = { limit = { is_country_type = default } add_modifier = { modifier = "extradimensionals_defeated" days = 360 } } } else = { every_country = { limit = { is_country_type = default } country_event = { id = crisis.1217 } } } } } # Third Portal Destroyed country_event = { id = crisis.1216 title = "crisis.1216.name" picture = GFX_evt_wormhole show_sound = event_super_explosion desc = { text = "crisis.1216.desc.a" trigger = { has_communications = event_target:portal_killer } } desc = { text = "crisis.1216.desc.b" trigger = { NOT = { has_communications = event_target:portal_killer } } } is_triggered_only = yes immediate = { random_system = { limit = { has_star_flag = extradimensional_third_portal_system } save_event_target_as = extradimensional_system } remove_point_of_interest = extradimensional_invasion_poi.3 set_country_flag = extradimensionals_expunged } option = { name = crisis.1013.a } } # Third Portal Destroyed (Other Portals Exist) country_event = { id = crisis.1217 title = "crisis.1216.name" desc = "crisis.1217.desc" picture = GFX_evt_wormhole show_sound = event_super_explosion is_triggered_only = yes immediate = { random_system = { limit = { has_star_flag = extradimensional_third_portal_system } save_event_target_as = extradimensional_system } set_global_flag = extradimensional_third_portal_destroyed remove_point_of_interest = extradimensional_invasion_poi.3 } option = { name = crisis.1016.a } } # Destroy EXDs if no portals and fewer than 20 ships remain # On yearly pulse event = { id = crisis.1254 hide_window = yes is_triggered_only = yes trigger = { any_country = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } } } immediate = { if = { limit = { any_country = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } OR = { AND = { has_global_flag = extradimensional_first_portal_destroyed NOT = { has_global_flag = extradimensional_second_portal } NOT = { has_global_flag = extradimensional_third_portal } } AND = { has_global_flag = extradimensional_first_portal_destroyed has_global_flag = extradimensional_second_portal_destroyed NOT = { has_global_flag = extradimensional_third_portal } } AND = { has_global_flag = extradimensional_first_portal_destroyed has_global_flag = extradimensional_second_portal_destroyed has_global_flag = extradimensional_third_portal_destroyed } } num_ships < 20 NOR = { any_controlled_ship = { is_ship_size = dimensional_portal_ed } any_country = { AND = { is_country_type = portal_holder any_controlled_ship = { is_ship_size = dimensional_portal_ed } } } } NOT = { any_system = { any_system_planet = { controller = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } } } } } NOT = { any_system = { any_system_planet = { owner = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } } } } } } } every_country = { limit = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } } destroy_country = yes } } } } # Extradimensionals: Military Reinforcements Spawn Cycle (HIDDEN) country_event = { id = crisis.1260 hide_window = yes is_triggered_only = yes trigger = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } OR = { count_controlled_ship = { limit = { is_ship_size = dimensional_portal_ed } count > 0 } any_country = { is_country_type = portal_holder count_controlled_ship = { limit = { is_ship_size = dimensional_portal_ed is_within_borders_of = root } count > 0 } } } } immediate = { # Spawn Construction Ships if needed country_event = { id = crisis.1266 days = 6 } # If at fleet cap if = { limit = { num_ships > 2000 } country_event = { id = crisis.1260 days = 600 random = 200 } # Check again later } # If no Anchors else_if = { limit = { count_controlled_ship = { limit = { is_ship_size = starbase_exd } count < 1 } } country_event = { id = crisis.1265 days = 1500 random = 200 } } else_if = { limit = { count_controlled_ship = { limit = { is_ship_size = starbase_exd } count = 1 } } country_event = { id = crisis.1265 days = 1300 random = 200 } } else_if = { limit = { count_controlled_ship = { limit = { is_ship_size = starbase_exd } count = 2 } } country_event = { id = crisis.1265 days = 1100 random = 200 } } else_if = { limit = { count_controlled_ship = { limit = { is_ship_size = starbase_exd } count = 3 } } country_event = { id = crisis.1265 days = 900 random = 200 } } else_if = { limit = { count_controlled_ship = { limit = { is_ship_size = starbase_exd } count = 4 } } country_event = { id = crisis.1265 days = 600 random = 200 } } else_if = { limit = { count_controlled_ship = { limit = { is_ship_size = starbase_exd } count = 5 } } country_event = { id = crisis.1265 days = 400 random = 200 } } else_if = { limit = { count_controlled_ship = { limit = { is_ship_size = starbase_exd } count = 6 } } country_event = { id = crisis.1265 days = 400 random = 200 } } else_if = { limit = { count_controlled_ship = { limit = { is_ship_size = starbase_exd } count = 7 } } country_event = { id = crisis.1265 days = 300 random = 100 } } else_if = { limit = { count_controlled_ship = { limit = { is_ship_size = starbase_exd } count = 8 } } country_event = { id = crisis.1265 days = 250 random = 50 } } else_if = { limit = { count_controlled_ship = { limit = { is_ship_size = starbase_exd } count = 9 } } country_event = { id = crisis.1265 days = 200 random = 50 } } else_if = { limit = { count_controlled_ship = { limit = { is_ship_size = starbase_exd } count > 9 } } country_event = { id = crisis.1265 days = 150 random = 50 } } } } # Reinforcements Arrive (HIDDEN) country_event = { id = crisis.1265 hide_window = yes is_triggered_only = yes trigger = { # Must only trigger if portal is still alive OR = { count_controlled_ship = { limit = { is_ship_size = dimensional_portal_ed } count > 0 } any_country = { AND = { is_country_type = portal_holder count_controlled_ship = { limit = { is_ship_size = dimensional_portal_ed is_within_borders_of = root } count > 0 } } } } } immediate = { random_country = { limit = { is_country_type = portal_holder } random_controlled_ship = { limit = { is_ship_size = dimensional_portal_ed is_within_borders_of = root } save_event_target_as = dimensional_portal } } random_controlled_ship = { limit = { is_ship_size = dimensional_portal_ed } save_event_target_as = dimensional_portal } owner_species = { save_event_target_as = extradimensional_species } country_event = { id = crisis.1260 } # Restart spawn cycle # Extradimensionals 1 create_unbidden_fleet = yes if = { limit = { is_difficulty >= 5 } create_unbidden_fleet = yes } # Extradimensionals 2 else_if = { limit = { is_country_type = extradimensional_2 } create_aberrant_fleet = yes if = { limit = { is_difficulty >= 5 } create_aberrant_fleet = yes } } # Extradimensionals 3 else_if = { limit = { is_country_type = extradimensional_3 } create_vehement_fleet = yes if = { limit = { is_difficulty >= 5 } create_vehement_fleet = yes } } } } # Construction Ships Arrive if Needed (HIDDEN) country_event = { id = crisis.1266 hide_window = yes is_triggered_only = yes trigger = { # Must only trigger if portal is still alive OR = { count_controlled_ship = { limit = { is_ship_size = dimensional_portal_ed } count > 0 } any_country = { AND = { is_country_type = portal_holder count_controlled_ship = { limit = { is_ship_size = dimensional_portal_ed is_within_borders_of = root } count > 0 } } } } count_controlled_ship = { limit = { is_ship_size = construction_ship_ed } count < 3 } } immediate = { # Extradimensionals 1 random_country = { limit = { is_country_type = portal_holder } random_controlled_ship = { limit = { is_ship_size = dimensional_portal_ed is_within_borders_of = root } save_event_target_as = dimensional_portal } } random_controlled_ship = { limit = { is_ship_size = dimensional_portal_ed } save_event_target_as = dimensional_portal } if = { limit = { is_country_type = extradimensional } while = { count = 2 create_fleet = { effect = { set_owner = ROOT create_ship = { name = random design = "NAME_Void_Shaper" graphical_culture = "extra_dimensional_01" } set_location = { target = event_target:dimensional_portal distance = 5 angle = random } } } } } # Extradimensionals 2 else_if = { limit = { is_country_type = extradimensional_2 } while = { count = 2 create_fleet = { effect = { set_owner = ROOT create_ship = { name = random design = "NAME_Void_Former" graphical_culture = "extra_dimensional_02" } set_location = { target = event_target:dimensional_portal distance = 5 angle = random } } } } } # Extradimensionals 3 else_if = { limit = { is_country_type = extradimensional_3 } while = { count = 2 create_fleet = { effect = { set_owner = ROOT create_ship = { name = random design = "NAME_Void_Weaver" graphical_culture = "extra_dimensional_03" } set_location = { target = event_target:dimensional_portal distance = 5 angle = random } } } } } } } # Reinforcements Arrive After Building Anchor (HIDDEN) ship_event = { id = crisis.1267 hide_window = yes is_triggered_only = yes trigger = { #is_ship_size = starbase_exd # now implicit owner = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } # Must only trigger if portal is still alive OR = { count_controlled_ship = { limit = { is_ship_size = dimensional_portal_ed } count > 0 } any_country = { AND = { is_country_type = portal_holder count_controlled_ship = { limit = { is_ship_size = dimensional_portal_ed is_within_borders_of = root.owner } count > 0 } } } } OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } num_ships < 2001 } } immediate = { owner = { country_event = { id = crisis.1266 days = 6 } # Spawn Construction Ships if needed random_country = { limit = { is_country_type = portal_holder } random_controlled_ship = { limit = { is_ship_size = dimensional_portal_ed is_within_borders_of = root } save_event_target_as = dimensional_portal } } random_controlled_ship = { limit = { is_ship_size = dimensional_portal_ed } save_event_target_as = dimensional_portal } owner_species = { save_event_target_as = extradimensional_species } # Extradimensionals 1 if = { limit = { is_country_type = extradimensional } # Create Admiral random_list = { 25 = { create_leader = { class = commander species = event_target:extradimensional_species name = random skill = 3 traits = { trait = leader_trait_ethereal } } } 25 = { create_leader = { class = commander species = event_target:extradimensional_species name = random skill = 3 traits = { trait = leader_trait_dimensional_stutter } } } 50 = { create_leader = { class = commander species = event_target:extradimensional_species name = random skill = 3 } } } # Create Fleet create_fleet = { effect = { set_owner = ROOT.owner create_ship = { name = random design = "NAME_Revenant" graphical_culture = "extra_dimensional_01" } assign_leader = last_created_leader while = { count = 3 create_ship = { name = random design = "NAME_Revenant" graphical_culture = "extra_dimensional_01" } } while = { count = 5 create_ship = { name = random design = "NAME_Phantom" graphical_culture = "extra_dimensional_01" } } while = { count = 10 create_ship = { name = random design = "NAME_Wraith" graphical_culture = "extra_dimensional_01" } } set_location = { target = event_target:dimensional_portal distance = 5 angle = random } set_fleet_stance = aggressive set_aggro_range = 500 set_aggro_range_measure_from = self set_fleet_bombardment_stance = armageddon } } } # Extradimensionals 2 else_if = { limit = { is_country_type = extradimensional_2 } # Create Admiral random_list = { 25 = { create_leader = { class = commander species = event_target:extradimensional_species name = random skill = 3 traits = { trait = leader_trait_ethereal } } } 25 = { create_leader = { class = commander species = event_target:extradimensional_species name = random skill = 3 traits = { trait = leader_trait_dimensional_stutter } } } 50 = { create_leader = { class = commander species = event_target:extradimensional_species name = random skill = 3 } } } # Create Fleet create_fleet = { effect = { set_owner = ROOT.owner create_ship = { name = random design = "NAME_Huntress" graphical_culture = "extra_dimensional_02" } assign_leader = last_created_leader while = { count = 3 create_ship = { name = random design = "NAME_Huntress" graphical_culture = "extra_dimensional_02" } } while = { count = 5 create_ship = { name = random design = "NAME_Assassin" graphical_culture = "extra_dimensional_02" } } while = { count = 10 create_ship = { name = random design = "NAME_Predator" graphical_culture = "extra_dimensional_02" } } set_location = { target = event_target:dimensional_portal distance = 5 angle = random } set_fleet_stance = aggressive set_aggro_range = 500 set_aggro_range_measure_from = self set_fleet_bombardment_stance = armageddon } } } # Extradimensionals 3 else_if = { limit = { is_country_type = extradimensional_3 } # Create Admiral random_list = { 25 = { create_leader = { class = commander species = event_target:extradimensional_species name = random skill = 3 traits = { trait = leader_trait_ethereal } } } 25 = { create_leader = { class = commander species = event_target:extradimensional_species name = random skill = 3 traits = { trait = leader_trait_dimensional_stutter } } } 50 = { create_leader = { class = commander species = event_target:extradimensional_species name = random skill = 3 } } } # Create Fleet create_fleet = { effect = { set_owner = ROOT.owner create_ship = { name = random design = "NAME_Eradicator" graphical_culture = "extra_dimensional_03" } assign_leader = last_created_leader while = { count = 3 create_ship = { name = random design = "NAME_Eradicator" graphical_culture = "extra_dimensional_03" } } while = { count = 5 create_ship = { name = random design = "NAME_Annihilator" graphical_culture = "extra_dimensional_03" } } while = { count = 10 create_ship = { name = random design = "NAME_Obliterator" graphical_culture = "extra_dimensional_03" } } set_location = { target = event_target:dimensional_portal distance = 5 angle = random } set_fleet_stance = aggressive set_aggro_range = 500 set_aggro_range_measure_from = self set_fleet_bombardment_stance = armageddon } } } } } } # Extradimensionals Defeated (HIDDEN) country_event = { id = crisis.1270 hide_window = yes is_triggered_only = yes trigger = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } NOT = { any_country = { AND = { NOT = { is_same_value = ROOT } OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } } } } } immediate = { observer_event = { id = observer.40 } every_country = { limit = { OR = { is_country_type = default is_country_type = fallen_empire } } country_event = { id = crisis.1271 } } set_global_flag = extradimensional_invasion_defeated remove_global_flag = galactic_crisis_recently_fired if = { limit = { has_global_flag = galactic_crisis_early_defeat_tracker_1 } remove_global_flag = galactic_crisis_early_defeat_tracker_1 multiply_crisis_strength = 1.5 } else_if = { limit = { has_global_flag = galactic_crisis_early_defeat_tracker_2 } remove_global_flag = galactic_crisis_early_defeat_tracker_2 multiply_crisis_strength = 1.25 } end_crisis = yes } } # Extradimensionals Defeated country_event = { id = crisis.1271 title = "crisis.1271.name" desc = "crisis.1271.desc" picture = GFX_evt_crisis_defeated show_sound = event_celebration is_triggered_only = yes immediate = { end_event_chain = "extradimensional_invasion_chain" end_event_chain = "extradimensional_invasion_chain_2" end_event_chain = "extradimensional_invasion_chain_3" } option = { # Spiritualist Response name = crisis.1271.a trigger = { has_spiritualist_government = yes NOR = { has_ethic = "ethic_fanatic_xenophile" has_ethic = "ethic_fanatic_xenophobe" } } add_monthly_resource_mult = { resource = unity value = @tier5unityreward } } option = { # Militarist Response name = crisis.1271.b trigger = { has_militarist_government = yes NOR = { has_ethic = "ethic_fanatic_xenophile" has_ethic = "ethic_fanatic_xenophobe" } } add_monthly_resource_mult = { resource = unity value = @tier5unityreward } } option = { # Materialist Response name = crisis.1271.c trigger = { has_materialist_government = yes NOR = { has_ethic = "ethic_fanatic_xenophile" has_ethic = "ethic_fanatic_xenophobe" } } add_monthly_resource_mult = { resource = unity value = @tier5unityreward } } option = { # Pacifist Response name = crisis.1271.d trigger = { has_pacifist_government = yes NOR = { has_ethic = "ethic_fanatic_xenophile" has_ethic = "ethic_fanatic_xenophobe" } } add_monthly_resource_mult = { resource = unity value = @tier5unityreward } } option = { # Corporate Response name = crisis.1271.e trigger = { OR = { has_government = gov_megacorporation has_government = gov_trade_league is_megacorp = yes } NOR = { has_ethic = "ethic_fanatic_xenophile" has_ethic = "ethic_fanatic_xenophobe" } } add_monthly_resource_mult = { resource = unity value = @tier5unityreward } } option = { # Default Response name = crisis.211.f trigger = { OR = { has_generic_government = yes has_government = gov_enlightened_monarchy has_government = gov_elective_monarchy has_government = gov_hive_mind has_government = gov_wilderness has_government = gov_parasitic_overmind has_government = gov_successor_khanate has_government = gov_diadochi is_fallen_empire = yes is_machine_empire = yes } NOR = { has_ethic = "ethic_fanatic_xenophile" has_ethic = "ethic_fanatic_xenophobe" } } add_monthly_resource_mult = { resource = unity value = @tier5unityreward } } option = { # Xenophobe Response name = crisis.1271.g trigger = { has_ethic = "ethic_fanatic_xenophobe" } add_monthly_resource_mult = { resource = unity value = @tier5unityreward } } option = { # Xenophile Response name = crisis.1271.h trigger = { has_ethic = "ethic_fanatic_xenophile" } add_monthly_resource_mult = { resource = unity value = @tier5unityreward } } after = { if = { limit = { has_origin = origin_fear_of_the_dark } country_event = { id = origin.6136 } } } } # Anchor Built (HIDDEN) ship_event = { id = crisis.1280 hide_window = yes is_triggered_only = yes trigger = { owner = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } } #is_ship_size = starbase_exd # now implicit } immediate = { owner = { log = "anchor built and crisis.1280 executed, not yet reaching fleet owner switch" random_country = { limit = { is_country_type = portal_holder } save_event_target_as = portal_holder_1 } random_controlled_ship = { limit = { is_ship_size = dimensional_portal_ed } fleet = { set_event_locked = yes set_owner = event_target:portal_holder_1 log = "anchor built and crisis.1280 executed, reaching fleet owner switch" } } } if = { limit = { owner = { is_country_type = extradimensional } } every_country = { limit = { has_event_chain = "extradimensional_invasion_chain" } add_event_chain_counter = { event_chain = "extradimensional_invasion_chain" counter = "dimensional_anchors_1" amount = 1 } } } else_if = { limit = { owner = { is_country_type = extradimensional_2 } } every_country = { limit = { has_event_chain = "extradimensional_invasion_chain_2" } add_event_chain_counter = { event_chain = "extradimensional_invasion_chain_2" counter = "dimensional_anchors_2" amount = 1 } } } else_if = { limit = { owner = { is_country_type = extradimensional_3 } } every_country = { limit = { has_event_chain = "extradimensional_invasion_chain_3" } add_event_chain_counter = { event_chain = "extradimensional_invasion_chain_3" counter = "dimensional_anchors_3" amount = 1 } } } } } # Anchor Destroyed (HIDDEN) country_event = { id = crisis.1281 hide_window = yes is_triggered_only = yes trigger = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } FROMFROM = { is_ship_size = starbase_exd } } immediate = { log = "anchor destroyed event crisis.1281 triggered" if = { limit = { count_controlled_ship = { limit = { is_ship_size = starbase_exd } count < 1 } } switch = { trigger = has_country_flag unbidden = { random_country = { limit = { is_country_type = portal_holder } random_controlled_ship = { limit = { is_ship_size = dimensional_portal_ed has_ship_flag = unbidden_portal } fleet = { set_owner = root } fleet = { set_event_locked = no } } } } aberrant = { random_country = { limit = { is_country_type = portal_holder } random_controlled_ship = { limit = { is_ship_size = dimensional_portal_ed has_ship_flag = aberrant_portal } fleet = { set_owner = root } fleet = { set_event_locked = no } } } } vehement = { random_country = { limit = { is_country_type = portal_holder } random_controlled_ship = { limit = { is_ship_size = dimensional_portal_ed has_ship_flag = vehement_portal } fleet = { set_owner = root } fleet = { set_event_locked = no } } } } } } if = { limit = { is_country_type = extradimensional } every_country = { limit = { has_event_chain = "extradimensional_invasion_chain" } add_event_chain_counter = { event_chain = "extradimensional_invasion_chain" counter = "dimensional_anchors_1" amount = -1 } } } else_if = { limit = { is_country_type = extradimensional_2 } every_country = { limit = { has_event_chain = "extradimensional_invasion_chain_2" } add_event_chain_counter = { event_chain = "extradimensional_invasion_chain_2" counter = "dimensional_anchors_2" amount = -1 } } } else_if = { limit = { is_country_type = extradimensional_3 } every_country = { limit = { has_event_chain = "extradimensional_invasion_chain_3" } add_event_chain_counter = { event_chain = "extradimensional_invasion_chain_3" counter = "dimensional_anchors_3" amount = -1 } } } } } # Extradimensional Kill Count (HIDDEN) country_event = { id = crisis.1282 hide_window = yes is_triggered_only = yes trigger = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } } immediate = { if = { limit = { is_country_type = extradimensional FROM = { has_event_chain = "extradimensional_invasion_chain" } } FROM = { add_event_chain_counter = { event_chain = "extradimensional_invasion_chain" counter = "extradimensional_kills_us_1" amount = 1 } } } else_if = { limit = { is_country_type = extradimensional_2 FROM = { has_event_chain = "extradimensional_invasion_chain_2" } } FROM = { add_event_chain_counter = { event_chain = "extradimensional_invasion_chain_2" counter = "extradimensional_kills_us_2" amount = 1 } } } else_if = { limit = { is_country_type = extradimensional_3 FROM = { has_event_chain = "extradimensional_invasion_chain_3" } } FROM = { add_event_chain_counter = { event_chain = "extradimensional_invasion_chain_3" counter = "extradimensional_kills_us_3" amount = 1 } } } if = { limit = { is_country_type = extradimensional } every_country = { limit = { has_event_chain = "extradimensional_invasion_chain" NOT = { is_same_value = FROM } } add_event_chain_counter = { event_chain = "extradimensional_invasion_chain" counter = "extradimensional_kills_others_1" amount = 1 } } } else_if = { limit = { is_country_type = extradimensional_2 } every_country = { limit = { has_event_chain = "extradimensional_invasion_chain_2" NOT = { is_same_value = FROM } } add_event_chain_counter = { event_chain = "extradimensional_invasion_chain_2" counter = "extradimensional_kills_others_2" amount = 1 } } } else_if = { limit = { is_country_type = extradimensional_3 } every_country = { limit = { has_event_chain = "extradimensional_invasion_chain_3" NOT = { is_same_value = FROM } } add_event_chain_counter = { event_chain = "extradimensional_invasion_chain_3" counter = "extradimensional_kills_others_3" amount = 1 } } } } } # Extradimensional Victims (HIDDEN) country_event = { id = crisis.1283 hide_window = yes is_triggered_only = yes trigger = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } FROM = { NOR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } } } immediate = { if = { limit = { is_country_type = extradimensional } every_country = { limit = { has_event_chain = "extradimensional_invasion_chain" } add_event_chain_counter = { event_chain = "extradimensional_invasion_chain" counter = "extradimensional_victims_1" amount = 1 } } } else_if = { limit = { is_country_type = extradimensional_2 } every_country = { limit = { has_event_chain = "extradimensional_invasion_chain_2" } add_event_chain_counter = { event_chain = "extradimensional_invasion_chain_2" counter = "extradimensional_victims_2" amount = 1 } } } else_if = { limit = { is_country_type = extradimensional_3 } every_country = { limit = { has_event_chain = "extradimensional_invasion_chain_3" } add_event_chain_counter = { event_chain = "extradimensional_invasion_chain_3" counter = "extradimensional_victims_3" amount = 1 } } } } } # Events to manage crisis sound loop country_event = { id = crisis.1230 hide_window = yes trigger = { has_crisis_stage_3 = yes OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } NOT = { any_country = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } galaxy_percentage > 0.10 } } } mean_time_to_happen = { months = 1 } immediate = { set_crisis_sound = extradimensional_crisis_ambient_stage_2 set_crisis_stage_2 = yes } } country_event = { id = crisis.1231 hide_window = yes trigger = { has_crisis_stage_2 = yes OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } any_country = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } galaxy_percentage > 0.15 } } mean_time_to_happen = { months = 1 } immediate = { set_crisis_sound = extradimensional_crisis_ambient_stage_3 set_crisis_stage_3 = yes } } country_event = { id = crisis.1232 hide_window = yes trigger = { has_crisis_stage_4 = yes OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } NOT = { any_country = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } galaxy_percentage > 0.25 } } } mean_time_to_happen = { months = 1 } immediate = { set_crisis_sound = extradimensional_crisis_ambient_stage_3 set_crisis_stage_3 = yes } } country_event = { id = crisis.1233 hide_window = yes trigger = { has_crisis_stage_3 = yes OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } any_country = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } galaxy_percentage > 0.30 } } mean_time_to_happen = { months = 1 } immediate = { set_crisis_sound = extradimensional_crisis_ambient_stage_final set_crisis_stage_4 = yes } } country_event = { id = crisis.1234 hide_window = yes trigger = { has_crisis_stage_1 = yes OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } any_country = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } galaxy_percentage > 0.05 } } mean_time_to_happen = { months = 1 } immediate = { set_crisis_sound = extradimensional_crisis_ambient_stage_2 set_crisis_stage_2 = yes } } # Warlock Captured country_event = { id = crisis.1250 title = "crisis.1250.name" desc = "crisis.1250.desc" picture = GFX_evt_surreal_visions show_sound = event_mystic_reveal is_triggered_only = yes option = { name = GOOD add_relic = r_unbidden_warlock } } # Build Anchors ship_event = { id = crisis.1300 hide_window = yes is_triggered_only = yes trigger = { owner = { count_starbase_sizes = { starbase_size = starbase_exd_0 count <= 99 } count_starbase_sizes = { starbase_size = starbase_exd count < 10 } } } immediate = { if = { limit = { owner = { count_starbase_sizes = { starbase_size = starbase_exd_0 count >= 90 } } } ship_event = { id = crisis.1301 days = 1 } # Done this way because starbase does not exist yet } else_if = { limit = { owner = { count_starbase_sizes = { starbase_size = starbase_exd_0 count >= 80 } count_starbase_sizes = { starbase_size = starbase_exd count < 9 } } } ship_event = { id = crisis.1301 days = 1 } } else_if = { limit = { owner = { count_starbase_sizes = { starbase_size = starbase_exd_0 count >= 70 } count_starbase_sizes = { starbase_size = starbase_exd count < 8 } } } ship_event = { id = crisis.1301 days = 1 } } else_if = { limit = { owner = { count_starbase_sizes = { starbase_size = starbase_exd_0 count >= 60 } count_starbase_sizes = { starbase_size = starbase_exd count < 7 } } } ship_event = { id = crisis.1301 days = 1 } } else_if = { limit = { owner = { count_starbase_sizes = { starbase_size = starbase_exd_0 count >= 50 } count_starbase_sizes = { starbase_size = starbase_exd count < 6 } } } ship_event = { id = crisis.1301 days = 1 } } else_if = { limit = { owner = { count_starbase_sizes = { starbase_size = starbase_exd_0 count >= 40 } count_starbase_sizes = { starbase_size = starbase_exd count < 5 } } } ship_event = { id = crisis.1301 days = 1 } } else_if = { limit = { owner = { count_starbase_sizes = { starbase_size = starbase_exd_0 count >= 30 } count_starbase_sizes = { starbase_size = starbase_exd count < 4 } } } ship_event = { id = crisis.1301 days = 1 } } else_if = { limit = { owner = { count_starbase_sizes = { starbase_size = starbase_exd_0 count >= 20 } count_starbase_sizes = { starbase_size = starbase_exd count < 3 } } } ship_event = { id = crisis.1301 days = 1 } } else_if = { limit = { owner = { count_starbase_sizes = { starbase_size = starbase_exd_0 count >= 10 } count_starbase_sizes = { starbase_size = starbase_exd count < 2 } } } ship_event = { id = crisis.1301 days = 1 } } } } # Build Anchors ship_event = { id = crisis.1301 hide_window = yes is_triggered_only = yes trigger = { exists = solar_system } immediate = { solar_system = { starbase = { set_starbase_size = starbase_exd } } ship_event = { id = crisis.1267 } # Reinforcements Arrive After Building Anchor ship_event = { id = crisis.1280 } # Anchor Built } } # Spawn System Effect ship_event = { id = crisis.1310 hide_window = yes is_triggered_only = yes immediate = { solar_system = { if = { limit = { NOT = { any_system_ambient_object = { has_ambient_object_flag = extradimensional_system_effect } } } star = { create_ambient_object = { type = "extradimensional_1" location = this } last_created_ambient_object = { set_ambient_object_flag = extradimensional_system_effect set_location = { target = prev distance = 0 angle = random } } } } } } } # Remove System Effect country_event = { id = crisis.1311 hide_window = yes is_triggered_only = yes trigger = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } fromfrom = { OR = { is_ship_size = starbase_exd_0 is_ship_size = starbase_exd } } } immediate = { fromfrom = { solar_system = { random_system_ambient_object = { limit = { has_ambient_object_flag = extradimensional_system_effect } destroy_ambient_object = this } } } } } # Extradimensionals Destroyed Starbase starbase_event = { id = crisis.1320 hide_window = yes is_triggered_only = yes trigger = { from.owner = { OR = { is_country_type = extradimensional is_country_type = extradimensional_2 is_country_type = extradimensional_3 } } NOT = { solar_system = { any_system_planet = { is_colony = yes } # For populated systems, they need to destroy the colonies } } } immediate = { solar_system = { save_event_target_as = starbase_system } from.owner = { country_event = { id = crisis.1321 days = 5 } # Delay so that destroyed starbase is properly cleared out } } } # Extradimensionals Build New Starbase country_event = { id = crisis.1321 hide_window = yes is_triggered_only = yes immediate = { event_target:starbase_system = { solar_system = { create_starbase = { size = starbase_exd_0 owner = root } every_system_planet = { limit = { has_orbital_station = yes } orbital_station = { dismantle = yes } } } } if = { limit = { exists = fromfrom } fromfrom = { if = { limit = { #theoretically, it is possible that they may have jumped exists = solar_system } random_controlled_ship = { ship_event = { id = crisis.1300 } # Check if starbase should be Anchor ship_event = { id = crisis.1310 } # Create system effect } } } } } }