Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### PRETHORYN SCOURGE
- @tier1unityreward = 6
- @tier1unitymin = 100
- @tier1unitymax = 500
- @tier2unityreward = 12
- @tier2unitymin = 150
- @tier2unitymax = 1000
- @tier3unityreward = 18
- @tier3unitymin = 250
- @tier3unitymax = 1500
- @tier4unityreward = 24
- @tier4unitymin = 350
- @tier4unitymax = 2000
- @tier5unityreward = 48
- @tier5unitymin = 700
- @tier5unitymax = 4000
- # Vanguard Arrives (HIDDEN)
- country_event = {
- id = crisis_playable.17
- hide_window = yes
- fire_only_once = yes
- mean_time_to_happen = {
- days = 10
- }
- trigger = {
- has_ascension_perk = ap_true_swarm
- #NOT = { has_global_flag = prethoryn_arrival_playable }
- }
- immediate = {
- closest_system = {
- limit = {
- NOT = {
- any_country = {
- is_ai = yes
- OR = {
- is_country_type = fallen_empire
- is_country_type = awakened_fallen_empire
- }
- any_system_within_border = {
- is_same_value = prev
- }
- }
- }
- any_country = {
- has_trait = trait_true_swarm
- }
- }
- #print_scope_effect = yes
- set_star_flag = swarm_invasion_target_1_playable
- save_event_target_as = prethoryn_invasion_system_playable
- }
- set_global_flag = prethoryn_arrival_playable
- #random_rim_system = {
- random_system = {
- limit = { has_star_flag = swarm_invasion_target_1_playable }
- random_system_planet = {
- every_country = {
- limit = {
- OR = {
- is_country_type = default
- #is_country_type = fallen_empire
- #is_country_type = awakened_fallen_empire
- }
- NOT = { has_trait = trait_true_swarm }
- }
- establish_communications_no_message = root
- declare_war = {
- target = root
- attacker_war_goal = wg_end_threat_swarm
- }
- add_opinion_modifier = {
- who = root
- modifier = opinion_swarm
- }
- root = {
- add_opinion_modifier = {
- who = PREV
- modifier = opinion_prey
- }
- }
- }
- root = {
- set_country_type = swarm_playable
- set_graphical_culture = swarm_01
- #create_ship_design = { design = "Swarm Transport" }
- #add_ship_design = last_created_design
- #create_ship_design = { design = "Swarm Colonizer" }
- #add_ship_design = last_created_design
- #create_ship_design = { design = "Swarm Constructor" }
- #add_ship_design = last_created_design
- #create_ship_design = { design = "Swarm Small Station" }
- #add_ship_design = last_created_design
- #create_ship_design = { design = "Swarm Large Station" }
- #add_ship_design = last_created_design
- create_ship_design = { design = "NAME_Swarm_Transport" }
- add_ship_design = last_created_design
- create_ship_design = { design = "NAME_Swarm_Colonizer" }
- add_ship_design = last_created_design
- create_ship_design = { design = "NAME_Swarm_Constructor" }
- add_ship_design = last_created_design
- create_ship_design = { design = "NAME_Swarm_Starbase" }
- add_ship_design = last_created_design
- save_event_target_as = prethoryn_playable
- owner_species = { save_event_target_as = prethoryn_species_playable }
- ### FIRST SYSTEM
- swarm_vanguard_playable = yes
- # Constructor
- create_fleet = {
- name = "Prethoryn Constructor"
- effect = {
- set_owner = PREV
- create_ship = {
- name = random
- design = "Swarm Constructor"
- graphical_culture = "swarm_01"
- }
- set_location = PREVPREV
- }
- }
- }
- }
- ### SECOND SYSTEM
- random_system = {
- limit = {
- distance = {
- source = PREV
- use_bypasses = no
- min_jumps = 2
- max_jumps = 6
- #max_distance <= 60
- #min_distance >= 5
- }
- }
- set_star_flag = swarm_invasion_target_2_playable
- random_system_planet = {
- root = {
- swarm_vanguard_playable = yes
- # Constructor
- create_fleet = {
- name = "Prethoryn Constructor"
- effect = {
- set_owner = PREV
- create_ship = {
- name = random
- design = "Swarm Constructor"
- graphical_culture = "swarm_01"
- }
- set_location = PREVPREV
- }
- }
- }
- }
- }
- ### THIRD SYSTEM
- random_system = {
- limit = {
- distance = {
- source = PREV
- use_bypasses = no
- min_jumps = 2
- max_jumps = 6
- #max_distance >= 60
- #min_distance <= 5
- }
- NOT = {
- has_star_flag = swarm_invasion_target_1_playable
- has_star_flag = swarm_invasion_target_2_playable
- }
- }
- set_star_flag = swarm_invasion_target_3_playable
- random_system_planet = {
- root = {
- swarm_vanguard_playable = yes
- # Constructor
- create_fleet = {
- name = "Prethoryn Constructor"
- effect = {
- set_owner = PREV
- create_ship = {
- name = random
- design = "Swarm Constructor"
- graphical_culture = "swarm_01"
- }
- set_location = PREVPREV
- }
- }
- }
- }
- }
- ### FOURTH SYSTEM
- random_system = {
- limit = {
- distance = {
- source = PREV
- max_distance <= 60
- min_distance >= 5
- }
- NOT = {
- has_star_flag = swarm_invasion_target_1_playable
- has_star_flag = swarm_invasion_target_2_playable
- has_star_flag = swarm_invasion_target_3_playable
- }
- }
- set_star_flag = swarm_invasion_target_4_playable
- random_system_planet = {
- root = {
- swarm_vanguard_playable = yes
- # Constructor
- create_fleet = {
- name = "Prethoryn Constructor"
- effect = {
- set_owner = PREV
- create_ship = {
- name = random
- design = "Swarm Constructor"
- graphical_culture = "swarm_01"
- }
- set_location = PREVPREV
- }
- }
- }
- }
- }
- }
- root = {
- #country_event = { id = crisis_playable.19 days = 10 random = 5 }
- #country_event = { id = crisis_playable.19 days = 60 random = 20 months = 12 } #before the change
- country_event = { id = crisis_playable.19 days = 340 } #new #365 370
- }
- }
- }
- }
- # Vanguard Arrives
- country_event = {
- id = crisis_playable.18
- title = "crisis_playable.18.name"
- desc = "crisis_playable.18.desc"
- picture = GFX_evt_physics_research
- show_sound = event_alien_nature
- location = event_target:prethoryn_invasion_system_playable
- is_triggered_only = yes
- immediate = {
- #random_rim_system = {
- random_system = {
- limit = { has_star_flag = swarm_invasion_target_1_playable }
- save_event_target_as = prethoryn_invasion_system_playable
- }
- }
- option = {
- name = crisis_playable.18.a
- trigger = {
- has_spiritualist_government = yes
- NOT = {
- has_ethic = "ethic_fanatic_egalitarian"
- has_ethic = "ethic_fanatic_authoritarian"
- has_ethic = "ethic_fanatic_xenophile"
- has_ethic = "ethic_fanatic_xenophobe"
- }
- }
- begin_event_chain = {
- event_chain = "prethoryn_scourge_chain_playable"
- target = ROOT
- }
- }
- option = {
- name = crisis_playable.18.b
- trigger = {
- has_militarist_government = yes
- NOT = {
- has_ethic = "ethic_fanatic_egalitarian"
- has_ethic = "ethic_fanatic_authoritarian"
- has_ethic = "ethic_fanatic_xenophile"
- has_ethic = "ethic_fanatic_xenophobe"
- }
- }
- begin_event_chain = {
- event_chain = "prethoryn_scourge_chain_playable"
- target = ROOT
- }
- }
- option = {
- name = crisis_playable.18.c
- trigger = {
- has_materialist_government = yes
- NOT = {
- has_ethic = "ethic_fanatic_egalitarian"
- has_ethic = "ethic_fanatic_authoritarian"
- has_ethic = "ethic_fanatic_xenophile"
- has_ethic = "ethic_fanatic_xenophobe"
- }
- }
- begin_event_chain = {
- event_chain = "prethoryn_scourge_chain_playable"
- target = ROOT
- }
- }
- option = {
- name = crisis_playable.18.d
- trigger = {
- has_pacifist_government = yes
- NOT = {
- has_ethic = "ethic_fanatic_egalitarian"
- has_ethic = "ethic_fanatic_authoritarian"
- has_ethic = "ethic_fanatic_xenophile"
- has_ethic = "ethic_fanatic_xenophobe"
- }
- }
- begin_event_chain = {
- event_chain = "prethoryn_scourge_chain_playable"
- target = ROOT
- }
- }
- option = {
- name = crisis_playable.18.e
- trigger = {
- has_government = gov_megacorporation
- NOT = {
- has_ethic = "ethic_fanatic_egalitarian"
- has_ethic = "ethic_fanatic_authoritarian"
- has_ethic = "ethic_fanatic_xenophile"
- has_ethic = "ethic_fanatic_xenophobe"
- }
- }
- begin_event_chain = {
- event_chain = "prethoryn_scourge_chain_playable"
- target = ROOT
- }
- }
- option = {
- name = crisis_playable.18.f
- trigger = {
- OR = {
- has_generic_government = yes
- has_government = gov_enlightened_monarchy
- #has_government = gov_enlightened_dictatorship
- has_government = gov_hive_mind
- }
- NOT = {
- has_ethic = "ethic_fanatic_egalitarian"
- has_ethic = "ethic_fanatic_authoritarian"
- has_ethic = "ethic_fanatic_xenophile"
- has_ethic = "ethic_fanatic_xenophobe"
- }
- }
- begin_event_chain = {
- event_chain = "prethoryn_scourge_chain_playable"
- target = ROOT
- }
- }
- option = {
- name = crisis_playable.18.g
- trigger = {
- has_ethic = "ethic_fanatic_xenophobe"
- }
- begin_event_chain = {
- event_chain = "prethoryn_scourge_chain_playable"
- target = ROOT
- }
- }
- option = {
- name = crisis_playable.18.h
- trigger = {
- has_ethic = "ethic_fanatic_xenophile"
- }
- begin_event_chain = {
- event_chain = "prethoryn_scourge_chain_playable"
- target = ROOT
- }
- }
- option = {
- name = crisis_playable.18.i
- trigger = {
- has_ethic = "ethic_fanatic_authoritarian"
- }
- begin_event_chain = {
- event_chain = "prethoryn_scourge_chain_playable"
- target = ROOT
- }
- }
- option = {
- name = crisis_playable.18.j
- trigger = {
- has_ethic = "ethic_fanatic_egalitarian"
- }
- begin_event_chain = {
- event_chain = "prethoryn_scourge_chain_playable"
- target = ROOT
- }
- }
- }
- }
- # Main Invasion Arrives (HIDDEN)
- country_event = {
- id = crisis_playable.19
- hide_window = yes
- fire_only_once = yes
- is_triggered_only = yes
- trigger = {
- is_ai = no
- OR = {
- is_country_type = swarm_playable
- has_trait = trait_true_swarm
- }
- }
- immediate = {
- set_global_flag = prethoryn_main_invasion_playable
- root = {
- #limit = {
- # is_ai = no
- #is_country_type = default
- # has_trait = trait_true_swarm
- #}
- #prethoryn_playable = root
- #country_event = { id = crisis_playable.20 }
- #create_species = {
- # name = "Prethoryn"
- # class = SWARM_TRUE #SWARM
- # portrait = random
- # traits = random
- # immortal = yes
- #}
- #save_event_target_as = prethoryn_playable
- }
- #random_rim_system = {
- random_system = {
- limit = { has_star_flag = swarm_invasion_target_1_playable }
- random_system_planet = {
- root = {
- ### FIRST SYSTEM
- swarm_brood_playable = yes
- # Infestors
- while = {
- count = 3
- create_fleet = {
- name = "Prethoryn Infestor"
- effect = {
- set_owner = root
- create_ship = {
- name = random
- design = "Swarm Colonizer"
- graphical_culture = "swarm_01"
- }
- set_location = PREVPREV
- }
- }
- }
- # Constructor
- create_fleet = {
- name = "Prethoryn Constructor"
- effect = {
- set_owner = root
- create_ship = {
- name = random
- design = "Swarm Constructor"
- graphical_culture = "swarm_01"
- }
- set_location = PREVPREV
- }
- }
- # Army Transports
- create_fleet = {
- name = "Prethoryn Armies"
- effect = {
- set_owner = root
- while = {
- count = 3
- create_army_transport = {
- ship_name = "Prethoryn Transport"
- graphical_culture = "swarm_01"
- army_name = "Prethoryn Invaders"
- army_type = "swarm_army"
- species = owner_species #last_created_species #event_target:prethoryn_species_playable
- }
- }
- set_location = PREVPREV
- }
- }
- }
- }
- ### SECOND SYSTEM
- random_system = {
- limit = { has_star_flag = swarm_invasion_target_2_playable }
- random_system_planet = {
- root = {
- swarm_brood_playable = yes
- # Infestors
- while = {
- count = 3
- create_fleet = {
- name = "Prethoryn Infestor"
- effect = {
- set_owner = root
- create_ship = {
- name = random
- design = "Swarm Colonizer"
- graphical_culture = "swarm_01"
- }
- set_location = PREVPREV
- }
- }
- }
- # Constructor
- create_fleet = {
- name = "Prethoryn Constructor"
- effect = {
- set_owner = root
- create_ship = {
- name = random
- design = "Swarm Constructor"
- graphical_culture = "swarm_01"
- }
- set_location = PREVPREV
- }
- }
- # Army Transports
- create_fleet = {
- name = "Prethoryn Armies"
- effect = {
- set_owner = root
- while = {
- count = 3
- create_army_transport = {
- ship_name = "Prethoryn Transport"
- graphical_culture = "swarm_01"
- army_name = "Prethoryn Invaders"
- army_type = "swarm_army"
- species = owner_species #last_created_species #event_target:prethoryn_species_playable
- }
- }
- set_location = PREVPREV
- }
- }
- }
- }
- }
- ### THIRD FLEET
- random_system = {
- limit = { has_star_flag = swarm_invasion_target_3_playable }
- random_system_planet = {
- root = {
- swarm_brood_playable = yes
- # Infestors
- while = {
- count = 3
- create_fleet = {
- name = "Prethoryn Infestor"
- effect = {
- set_owner = root
- create_ship = {
- name = random
- design = "Swarm Colonizer"
- graphical_culture = "swarm_01"
- }
- set_location = PREVPREV
- }
- }
- }
- # Constructor
- create_fleet = {
- name = "Prethoryn Constructor"
- effect = {
- set_owner = root
- create_ship = {
- name = random
- design = "Swarm Constructor"
- graphical_culture = "swarm_01"
- }
- set_location = PREVPREV
- }
- }
- # Army Transports
- create_fleet = {
- name = "Prethoryn Armies"
- effect = {
- set_owner = root
- while = {
- count = 3
- create_army_transport = {
- ship_name = "Prethoryn Transport"
- graphical_culture = "swarm_01"
- army_name = "Prethoryn Invaders"
- army_type = "swarm_army"
- species = owner_species #last_created_species #event_target:prethoryn_species_playable
- }
- }
- set_location = PREVPREV
- }
- }
- }
- }
- }
- ### FOURTH FLEET
- random_system = {
- limit = { has_star_flag = swarm_invasion_target_4_playable }
- random_system_planet = {
- root = {
- swarm_brood_playable = yes
- # Infestors
- while = {
- count = 3
- create_fleet = {
- name = "Prethoryn Infestor"
- effect = {
- set_owner = root
- create_ship = {
- name = random
- design = "Swarm Colonizer"
- graphical_culture = "swarm_01"
- }
- set_location = PREVPREV
- }
- }
- }
- # Constructor
- create_fleet = {
- name = "Prethoryn Constructor"
- effect = {
- set_owner = root
- create_ship = {
- name = random
- design = "Swarm Constructor"
- graphical_culture = "swarm_01"
- }
- set_location = PREVPREV
- }
- }
- # Army Transports
- create_fleet = {
- name = "Prethoryn Armies"
- effect = {
- set_owner = root
- while = {
- count = 3
- create_army_transport = {
- ship_name = "Prethoryn Transport"
- graphical_culture = "swarm_01"
- army_name = "Prethoryn Invaders"
- army_type = "swarm_army"
- species = owner_species #last_created_species #event_target:prethoryn_species_playable
- }
- }
- set_location = PREVPREV
- }
- }
- }
- }
- }
- }
- }
- }
- }
- # Main Invasion Arrives
- country_event = {
- id = crisis_playable.20
- title = "crisis_playable.20.name"
- desc = "crisis_playable.20.desc"
- picture = GFX_evt_physics_research
- show_sound = event_alien_nature
- location = event_target:prethoryn_invasion_system_playable
- is_triggered_only = yes
- immediate = {
- #random_rim_system = {
- random_system = {
- limit = { has_star_flag = swarm_invasion_target_1_playable }
- save_event_target_as = prethoryn_invasion_system_playable
- }
- }
- option = {
- name = crisis_playable.20.a
- }
- }
- # Swarm Diplomacy
- country_event = {
- id = crisis_playable.30
- title = "TRANSMISSION"
- desc = {
- text = crisis_playable.30.desc_01
- trigger = {
- NOT = { owner_species = { has_trait = trait_psionic } }
- NOR = { owner_species = { has_trait = trait_true_swarm } }
- }
- }
- desc = {
- text = crisis_playable.30.desc_02
- trigger = {
- NOT = { owner_species = { has_trait = trait_psionic } }
- NOR = { owner_species = { has_trait = trait_true_swarm } }
- }
- }
- desc = {
- text = crisis_playable.30.desc_03
- trigger = {
- NOT = { owner_species = { has_trait = trait_psionic } }
- NOR = { owner_species = { has_trait = trait_true_swarm } }
- }
- }
- desc = {
- text = crisis_playable.30.desc_04
- trigger = {
- owner_species = { has_trait = trait_psionic }
- NOR = { owner_species = { has_trait = trait_true_swarm } }
- }
- }
- desc = {
- text = crisis_playable.30.desc_05
- trigger = {
- owner_species = { has_trait = trait_psionic }
- NOR = { owner_species = { has_trait = trait_true_swarm } }
- }
- }
- desc = {
- text = crisis_playable.30.desc_06
- trigger = {
- owner_species = { has_trait = trait_psionic }
- NOR = { owner_species = { has_trait = trait_true_swarm } }
- }
- }
- desc = {
- text = crisis_playable.30.desc_07
- trigger = {
- owner_species = { has_trait = trait_true_swarm }
- }
- }
- diplomatic = yes
- picture_event_data = {
- portrait = swarm1
- room = "swarm_room"
- }
- is_triggered_only = yes
- trigger = {
- FROM = {
- OR = {
- is_country_type = swarm_playable
- #has_trait = trait_true_swarm
- }
- }
- }
- option = {
- name = crisis_playable.30.b
- trigger = {
- OR = {
- has_ethic = "ethic_pacifist"
- has_ethic = "ethic_fanatic_pacifist"
- }
- NOT = { owner_species = { has_trait = trait_psionic } }
- }
- response_text = crisis_playable.30.b.response
- }
- option = {
- name = crisis_playable.30.c
- trigger = {
- OR = {
- has_ethic = "ethic_militarist"
- has_ethic = "ethic_fanatic_militarist"
- }
- NOT = { owner_species = { has_trait = trait_psionic } }
- }
- response_text = crisis_playable.30.c.response
- }
- option = {
- name = crisis_playable.30.d
- trigger = {
- OR = {
- has_ethic = "ethic_xenophobe"
- has_ethic = "ethic_fanatic_xenophobe"
- }
- NOT = { owner_species = { has_trait = trait_psionic } }
- }
- response_text = crisis_playable.30.d.response
- }
- option = {
- name = crisis_playable.30.e
- trigger = {
- OR = {
- has_ethic = "ethic_xenophile"
- has_ethic = "ethic_fanatic_xenophile"
- }
- NOT = { owner_species = { has_trait = trait_psionic } }
- }
- response_text = crisis_playable.30.e.response
- }
- option = {
- name = crisis_playable.30.f
- trigger = {
- OR = {
- has_ethic = "ethic_spiritualist"
- has_ethic = "ethic_fanatic_spiritualist"
- }
- NOT = { owner_species = { has_trait = trait_psionic } }
- }
- response_text = crisis_playable.30.f.response
- }
- option = {
- name = crisis_playable.30.x
- trigger = {
- is_country_type = default
- NOT = { owner_species = { has_trait = trait_psionic } }
- NOT = { has_trait = trait_true_swarm }
- }
- response_text = crisis_playable.30.f.response
- custom_tooltip = fallen_empire_refuse_tooltip
- }
- option = {
- name = crisis_playable.30.a
- trigger = {
- NOT = { owner_species = { has_trait = trait_psionic } }
- }
- response_text = crisis_playable.30.a.response
- }
- option = {
- name = crisis_playable.30.g
- trigger = {
- owner_species = { has_trait = trait_psionic }
- NOT = { has_trait = trait_true_swarm }
- }
- response_text = crisis_playable.30.g.response
- is_dialog_only = yes
- }
- option = {
- name = crisis_playable.30.h
- trigger = {
- owner_species = { has_trait = trait_psionic }
- NOT = { has_trait = trait_true_swarm }
- }
- response_text = crisis_playable.30.h.response
- is_dialog_only = yes
- }
- option = {
- name = crisis_playable.30.i
- trigger = {
- owner_species = { has_trait = trait_psionic }
- NOT = { has_trait = trait_true_swarm }
- }
- response_text = crisis_playable.30.i.response
- is_dialog_only = yes
- }
- option = {
- name = crisis_playable.30.j
- trigger = {
- owner_species = { has_trait = trait_psionic }
- NOT = { has_trait = trait_true_swarm }
- }
- response_text = crisis_playable.30.j.response
- is_dialog_only = yes
- }
- option = {
- name = crisis_playable.30.a
- trigger = {
- owner_species = { has_trait = trait_psionic }
- NOT = { has_trait = trait_true_swarm }
- }
- response_text = crisis_playable.30.k.response
- }
- #### SWARM TO SWARM
- option = {
- name = crisis_playable.30.l
- trigger = {
- owner_species = { has_trait = trait_true_swarm }
- }
- is_dialog_only = yes
- response_text = crisis_playable.30.l.response1
- response_text = crisis_playable.30.l.response2
- }
- option = {
- name = crisis_playable.30.m
- trigger = {
- owner_species = { has_trait = trait_true_swarm }
- }
- is_dialog_only = yes
- from = { add_opinion_modifier = { who = root modifier = opinion_swarm_link } }
- }
- option = {
- name = crisis_playable.30.a
- trigger = {
- owner_species = { has_trait = trait_true_swarm }
- }
- response_text = crisis_playable.30.k.response
- }
- }
- # Swarm Kill Count
- country_event = {
- id = crisis_playable.70
- hide_window = yes
- is_triggered_only = yes
- trigger = {
- exists = from
- #has_global_flag = sentinels_founded_playable
- #is_ai = no
- is_country_type = default
- FROM = {
- OR = {
- is_country_type = swarm_playable
- has_trait = trait_true_swarm
- }
- }
- }
- immediate = {
- change_variable = {
- which = "swarm_fleet_kills_playable"
- value = 1
- }
- }
- }
- }
- # Swarm Brood Queens Breed
- fleet_event = {
- id = crisis_playable.106
- hide_window = yes
- trigger = {
- has_fleet_flag = pet_queen_playable
- num_ships < 40
- owner = {
- #has_trait = trait_true_swarm
- has_ascension_perk = ap_true_swarm
- #used_naval_capacity_percent < 1.0
- }
- any_ship = { is_ship_size = queen_swarm }
- }
- mean_time_to_happen = {
- months = 4
- }
- immediate = {
- random_list = {
- 50 = {
- create_ship = {
- name = "Spawned Warrior"
- design = "Swarm Large"
- graphical_culture = "swarm_01"
- upgradable = no
- }
- }
- 50 = {
- create_ship = {
- name = "Spawned Swarmling"
- design = "Swarm Small"
- graphical_culture = "swarm_01"
- upgradable = no
- }
- }
- }
- }
- }
- ### HIDDEN SWARM FUNCTIONALITY
- # Infested to Barren after Orbital Bombardment
- planet_event = {
- id = crisis_playable.200
- hide_window = yes
- is_triggered_only = yes
- trigger = {
- is_planet_class = pc_infested_swarmtech
- }
- immediate = {
- destroy_colony = yes
- #set_planet_max_health = 0
- random_list = {
- 50 = { change_pc = pc_barren }
- 50 = { change_pc = pc_barren_cold }
- }
- #planet_event = { id = crisis_playable.216 }
- }
- }
- # Purge Begins
- country_event = {
- id = crisis_playable.201
- hide_window = yes
- is_triggered_only = yes
- trigger = {
- OR = {
- is_country_type = "swarm_playable"
- has_trait = trait_true_swarm
- }
- }
- immediate = {
- FROMFROM = {
- set_controller = root
- #set_owner = root #new
- #purge = yes
- }
- }
- }
- # Purge Complete
- planet_event = {
- id = crisis_playable.202
- hide_window = yes
- is_triggered_only = yes
- trigger = {
- #num_pops = 0
- OR = {
- controller = {
- OR = {
- is_country_type = "swarm_playable"
- has_trait = trait_true_swarm
- }
- }
- #controller = { has_trait = trait_true_swarm }
- owner = {
- is_country_type = "swarm_playable"
- has_trait = trait_true_swarm
- }
- }
- }
- immediate = {
- #set_controller = owner #new
- set_owner = fromfrom #newer
- if = {
- limit = {
- NOR = {
- is_planet_class = pc_ringworld_habitable
- is_planet_class = pc_habitat # habitats are currently uninfestable
- }
- }
- every_owned_pop = { kill_pop = yes }
- change_pc = pc_infested_swarmtech
- set_owner = fromfrom #worked, but made it so armies couldn't leave
- }
- else_if = {
- # Habitable Ring Worlds can't be infested...
- # they are destroyed instead
- limit = { is_planet_class = pc_ringworld_habitable }
- destroy_colony = yes
- change_pc = pc_ringworld_habitable_damaged
- reset_planet = yes
- }
- else_if = {
- limit = { is_planet_class = pc_habitat }
- remove_planet = yes
- }
- }
- }
- # Planet Colonized
- planet_event = {
- id = crisis_playable.203
- hide_window = yes
- is_triggered_only = yes
- trigger = {
- owner = {
- OR = {
- is_country_type = "swarm_playable"
- has_trait = trait_true_swarm
- }
- }
- }
- immediate = {
- change_pc = pc_infested_swarmtech
- set_planet_max_health = 8000
- set_planet_health = 8000
- planet_event = { id = crisis_playable.215 }
- }
- }
- # Spawn Infestors if less than 4 are available, on_yearly_pulse
- event = {
- id = crisis_playable.204
- hide_window = yes
- is_triggered_only = yes
- trigger = {
- any_country = {
- OR = {
- is_country_type = "swarm_playable"
- has_ascension_perk = ap_true_swarm
- }
- #num_ships > 10
- count_owned_ships = {
- limit = { is_ship_size = colony_ship_swarm }
- count < 4
- }
- }
- }
- immediate = {
- random_country = {
- limit = {
- OR = {
- is_country_type = swarm_playable
- has_ascension_perk = ap_true_swarm
- }
- }
- #if = {
- # limit = {
- # NOT = {
- # exists = root #event_target:prethoryn_playable
- # }
- # }
- # save_event_target_as = prethoryn_playable
- #}
- random_owned_ship = {
- save_event_target_as = infestor_respawn_system_playable
- }
- while = {
- count = 5
- create_fleet = {
- name = "Prethoryn Infestor"
- effect = {
- set_owner = root #event_target:prethoryn_playable
- create_ship = {
- name = random
- design = "Swarm Colonizer"
- graphical_culture = "swarm_01"
- }
- set_location = {
- target = event_target:infestor_respawn_system_playable
- distance = 5
- angle = random
- }
- }
- }
- }
- }
- }
- }
- # Spawn Constructors if less than 4 are available, on_yearly_pulse
- event = {
- id = crisis_playable.205
- hide_window = yes
- is_triggered_only = yes
- trigger = {
- any_country = {
- OR = {
- has_ascension_perk = ap_true_swarm
- is_country_type = "swarm_playable"
- }
- num_ships > 10
- count_owned_ships = {
- limit = { is_ship_size = construction_ship_swarm }
- count < 4
- }
- }
- }
- immediate = {
- random_country = {
- limit = {
- OR = {
- is_country_type = swarm_playable
- has_trait = trait_true_swarm
- }
- }
- #if = {
- # limit = {
- # NOT = {
- # exists = root #event_target:prethoryn_playable
- # }
- # }
- # save_event_target_as = prethoryn_playable
- #}
- random_owned_ship = {
- save_event_target_as = constructor_respawn_system_playable
- }
- while = {
- count = 3
- create_fleet = {
- name = "Prethoryn Constructor"
- effect = {
- set_owner = root #event_target:prethoryn_playable
- create_ship = {
- name = random
- design = "Swarm Constructor"
- graphical_culture = "swarm_01"
- }
- set_location = {
- target = event_target:constructor_respawn_system_playable
- distance = 5
- angle = random
- }
- }
- }
- }
- }
- }
- }
- # Build new fleet every year
- event = {
- id = crisis_playable.206
- hide_window = yes
- is_triggered_only = yes
- immediate = {
- if = {
- limit = {
- any_country = {
- OR = {
- is_country_type = swarm_playable
- has_ascension_perk = ap_true_swarm
- }
- num_owned_planets > 0
- num_ships < 4711
- num_armies < 100
- any_system_within_border = { exists = starbase }
- }
- }
- random_country = {
- limit = {
- OR = {
- is_country_type = swarm_playable
- has_trait = trait_true_swarm
- }
- NOT = { has_ascension_perk = ap_true_swarm }
- }
- country_event = { id = crisis_playable.207 }
- }
- random_country = {
- limit = {
- OR = {
- is_country_type = swarm_playable
- has_trait = trait_true_swarm
- }
- has_ascension_perk = ap_true_swarm
- }
- country_event = { id = crisis_playable.219 }
- }
- }
- }
- }
- # Build new fleet (based on the Third Fleet)
- # No ascension perk
- country_event = {
- id = crisis_playable.207
- hide_window = yes
- is_triggered_only = yes
- trigger = {
- OR = {
- is_country_type = swarm_playable
- has_trait = trait_true_swarm
- }
- NOT = { has_ascension_perk = ap_true_swarm }
- num_owned_planets > 0
- num_ships < 4711
- num_armies < 100
- }
- immediate = {
- save_event_target_as = prethoryn_playable
- #owner_species = { save_event_target_as = prethoryn_species_playable }
- random_owned_planet = {
- #limit = { has_spaceport = yes }
- limit = { exists = starbase }
- save_event_target_as = spaceport_planet_playable
- #event_target:prethoryn_playable = {
- root = {
- swarm_brood_playable = yes
- #swarm_brood_playable = yes
- #swarm_brood_playable = yes
- # Infestors
- while = {
- count = 3
- create_fleet = {
- name = "Prethoryn Infestor"
- effect = {
- set_owner = root #event_target:prethoryn_playable
- create_ship = {
- name = random
- design = "Swarm Colonizer"
- graphical_culture = "swarm_01"
- }
- set_location = {
- target = event_target:spaceport_planet_playable
- distance = 35
- angle = random
- }
- }
- }
- }
- # Constructor
- create_fleet = {
- name = "Prethoryn Constructor"
- effect = {
- set_owner = root #event_target:prethoryn_playable
- create_ship = {
- name = random
- design = "Swarm Constructor"
- graphical_culture = "swarm_01"
- }
- set_location = {
- target = event_target:spaceport_planet_playable
- distance = 35
- angle = random
- }
- }
- }
- # Army Transports #new
- #create_fleet = {
- # name = "Prethoryn Armies"
- # effect = {
- # set_owner = event_target:prethoryn_playable
- #while = {
- # count = 3
- # create_army_transport = {
- # ship_name = "Prethoryn Transport"
- # graphical_culture = "swarm_01"
- # army_name = "Prethoryn Invaders"
- # army_type = "swarm_army"
- # species = event_target:prethoryn_species_playable
- # }
- #}
- # set_location = {
- # target = event_target:spaceport_planet_playable
- # distance = 35
- # angle = random
- # }
- # }
- #}
- }
- }
- }
- }
- }
- # Build new fleet (based on the Third Fleet)
- # With ascension perk
- country_event = {
- id = crisis_playable.219
- hide_window = yes
- is_triggered_only = yes
- trigger = {
- OR = {
- is_country_type = swarm_playable
- has_trait = trait_true_swarm
- }
- has_ascension_perk = ap_true_swarm
- num_owned_planets > 0
- num_ships < 4711
- num_armies < 100
- }
- immediate = {
- save_event_target_as = prethoryn_playable
- #owner_species = { save_event_target_as = prethoryn_species_playable }
- random_owned_planet = {
- #limit = { has_spaceport = yes }
- limit = { exists = starbase }
- save_event_target_as = spaceport_planet_playable
- #event_target:prethoryn_playable = {
- root = {
- swarm_brood_playable_full = yes
- #swarm_brood_playable = yes
- #swarm_brood_playable = yes
- # Infestors
- while = {
- count = 3
- create_fleet = {
- name = "Prethoryn Infestor"
- effect = {
- set_owner = root #event_target:prethoryn_playable
- create_ship = {
- name = random
- design = "Swarm Colonizer"
- graphical_culture = "swarm_01"
- }
- set_location = {
- target = event_target:spaceport_planet_playable
- distance = 35
- angle = random
- }
- }
- }
- }
- # Constructor
- create_fleet = {
- name = "Prethoryn Constructor"
- effect = {
- set_owner = root #event_target:prethoryn_playable
- create_ship = {
- name = random
- design = "Swarm Constructor"
- graphical_culture = "swarm_01"
- }
- set_location = {
- target = event_target:spaceport_planet_playable
- distance = 35
- angle = random
- }
- }
- }
- }
- }
- }
- }
- }
- # Destroy Swarm if no planets and only 5 or less ships remain
- # On yearly pulse
- event = {
- id = crisis_playable.208
- hide_window = yes
- is_triggered_only = yes
- trigger = {
- any_country = {
- OR = {
- is_country_type = swarm_playable
- has_trait = trait_true_swarm
- }
- }
- }
- immediate = {
- if = {
- limit = {
- any_country = {
- OR = {
- is_country_type = swarm_playable
- has_trait = trait_true_swarm
- }
- num_ships < 2
- NOT = {
- any_system = {
- any_planet = {
- exists = controller
- controller = {
- OR = {
- is_country_type = swarm_playable
- has_trait = trait_true_swarm
- }
- }
- }
- }
- }
- NOT = {
- any_system = {
- any_planet = {
- exists = owner
- owner = {
- OR = {
- is_country_type = swarm_playable
- has_trait = trait_true_swarm
- }
- }
- }
- }
- }
- }
- }
- random_country = {
- limit = {
- OR = {
- is_country_type = swarm_playable
- has_trait = trait_true_swarm
- }
- }
- destroy_country = yes
- }
- }
- }
- }
- # Prethoryn Defeated (HIDDEN)
- country_event = {
- id = crisis_playable.210
- hide_window = yes
- is_triggered_only = yes
- trigger = {
- OR = {
- is_country_type = swarm_playable
- has_trait = trait_true_swarm
- }
- }
- immediate = {
- every_country = {
- limit = {
- OR = {
- is_country_type = default
- is_country_type = fallen_empire
- }
- }
- country_event = { id = crisis_playable.211 }
- }
- }
- }
- # Prethoryn Defeated
- country_event = {
- id = crisis_playable.211
- title = "crisis.211.name"
- desc = "crisis.211.desc"
- picture = GFX_evt_metropolis
- show_sound = event_celebration
- is_triggered_only = yes
- option = { # Spiritualist Response
- name = crisis_playable.211.a
- trigger = {
- has_spiritualist_government = yes
- NOT = {
- has_ethic = "ethic_fanatic_xenophile"
- has_ethic = "ethic_fanatic_xenophobe"
- }
- }
- add_modifier = {
- modifier = "prethoryn_defeated"
- days = 360
- }
- add_monthly_resource_mult = {
- resource = unity
- value = @tier5unityreward
- }
- end_event_chain = "prethoryn_scourge_chain_playable"
- }
- option = { # Militarist Response
- name = crisis_playable.211.b
- trigger = {
- has_militarist_government = yes
- NOT = {
- has_ethic = "ethic_fanatic_xenophile"
- has_ethic = "ethic_fanatic_xenophobe"
- }
- }
- add_modifier = {
- modifier = "prethoryn_defeated"
- days = 360
- }
- add_monthly_resource_mult = {
- resource = unity
- value = @tier5unityreward
- }
- end_event_chain = "prethoryn_scourge_chain_playable"
- }
- option = { # Materialist Response
- name = crisis_playable.211.c
- trigger = {
- has_materialist_government = yes
- NOT = {
- has_ethic = "ethic_fanatic_xenophile"
- has_ethic = "ethic_fanatic_xenophobe"
- }
- }
- add_modifier = {
- modifier = "prethoryn_defeated"
- days = 360
- }
- add_monthly_resource_mult = {
- resource = unity
- value = @tier5unityreward
- }
- end_event_chain = "prethoryn_scourge_chain_playable"
- }
- option = { # Pacifist Response
- name = crisis_playable.211.d
- trigger = {
- has_pacifist_government = yes
- NOT = {
- has_ethic = "ethic_fanatic_xenophile"
- has_ethic = "ethic_fanatic_xenophobe"
- }
- }
- add_modifier = {
- modifier = "prethoryn_defeated"
- days = 360
- }
- add_monthly_resource_mult = {
- resource = unity
- value = @tier5unityreward
- }
- end_event_chain = "prethoryn_scourge_chain_playable"
- }
- option = { # Corporate Response
- name = crisis_playable.211.e
- trigger = {
- has_government = gov_megacorporation
- NOT = {
- has_ethic = "ethic_fanatic_xenophile"
- has_ethic = "ethic_fanatic_xenophobe"
- }
- }
- add_modifier = {
- modifier = "prethoryn_defeated"
- days = 360
- }
- add_monthly_resource_mult = {
- resource = unity
- value = @tier5unityreward
- }
- end_event_chain = "prethoryn_scourge_chain_playable"
- }
- option = { # Default Response
- name = crisis_playable.211.f
- trigger = {
- OR = {
- has_generic_government = yes
- has_government = gov_enlightened_monarchy
- #has_government = gov_enlightened_dictatorship
- has_government = gov_hive_mind
- }
- NOT = {
- has_ethic = "ethic_fanatic_xenophile"
- has_ethic = "ethic_fanatic_xenophobe"
- }
- }
- add_modifier = {
- modifier = "prethoryn_defeated"
- days = 360
- }
- add_monthly_resource_mult = {
- resource = unity
- value = @tier5unityreward
- }
- end_event_chain = "prethoryn_scourge_chain_playable"
- }
- option = { # Xenophobe Response
- name = crisis_playable.211.g
- trigger = {
- has_ethic = "ethic_fanatic_xenophobe"
- }
- add_modifier = {
- modifier = "prethoryn_defeated"
- days = 360
- }
- add_monthly_resource_mult = {
- resource = unity
- value = @tier5unityreward
- }
- end_event_chain = "prethoryn_scourge_chain_playable"
- }
- option = { # Xenophile Response
- name = crisis_playable.211.h
- trigger = {
- has_ethic = "ethic_fanatic_xenophile"
- }
- add_modifier = {
- modifier = "prethoryn_defeated"
- days = 360
- }
- add_monthly_resource_mult = {
- resource = unity
- value = @tier5unityreward
- }
- end_event_chain = "prethoryn_scourge_chain_playable"
- }
- }
- # World Infested (HIDDEN)
- planet_event = {
- id = crisis_playable.215
- hide_window = yes
- is_triggered_only = yes
- immediate = {
- every_country = {
- limit = { has_event_chain = "prethoryn_scourge_chain_playable" }
- add_event_chain_counter = {
- event_chain = "prethoryn_scourge_chain_playable"
- counter = "infested_worlds"
- amount = 1
- }
- }
- }
- }
- # Infested World Cleansed (HIDDEN)
- planet_event = {
- id = crisis_playable.216
- hide_window = yes
- is_triggered_only = yes
- immediate = {
- every_country = {
- limit = { has_event_chain = "prethoryn_scourge_chain_playable" }
- add_event_chain_counter = {
- event_chain = "prethoryn_scourge_chain_playable"
- counter = "infested_worlds"
- amount = -1
- }
- add_event_chain_counter = {
- event_chain = "prethoryn_scourge_chain_playable"
- counter = "infested_worlds_cleansed"
- amount = 1
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement