# See wg_example.txt for an explanation wg_independence = { casus_belli = cb_subject hide_if_no_cb = yes set_defender_wargoal = wg_assert_overlordship potential = { always = yes } possible = { custom_tooltip = { fail_text = cannot_use_against_emperor OR = { from = { is_galactic_emperor = no } is_galactic_community_member = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } on_status_quo = { custom_tooltip = wg_independence_status_quo hidden_effect = { fromfrom = { every_war_participant = { limit = { fromfrom = { is_war_participant = { who = prev side = Root } } has_overlord = Root.from } set_subject_of = { who = none } } } } } on_accept = { custom_tooltip = wg_independence_accept hidden_effect = { fromfrom = { every_war_participant = { limit = { fromfrom = { is_war_participant = { who = prev side = Root } } has_overlord = Root.from } set_subject_of = { who = none } every_system_within_border = { limit = { Root.from = { has_claim = prev } } remove_claims = { who = Root.from } } } } } } on_wargoal_set = { every_system_within_border = { limit = { NOT = { from = { has_claim = prev } } } add_claims = { who = from } } } ai_weight = { weight = 100 } should_ignore_federations = yes } wg_end_threat = { casus_belli = cb_containment hide_if_no_cb = yes total_war = yes set_defender_wargoal = wg_cleansing forbidden_peace_offers = { demand_surrender = "" surrender = "" } surrender_acceptance = -1000 potential = { from = { OR = { has_valid_civic = civic_fanatic_purifiers has_valid_civic = civic_machine_terminator has_valid_civic = civic_scorched_earth } } } possible = { always = yes } ai_weight = { weight = 100 } } wg_end_threat_vs_ae_subjugation = { casus_belli = cb_containment hide_if_no_cb = yes total_war = yes set_defender_wargoal = wg_cleansing forbidden_peace_offers = { demand_surrender = "" } surrender_acceptance = -1000 potential = { always = no } possible = { always = no } ai_weight = { weight = 100 } } wg_end_threat_swarm = { casus_belli = cb_containment hide_if_no_cb = yes total_war = yes set_defender_wargoal = wg_absorption forbidden_peace_offers = { demand_surrender = "" surrender = "" } surrender_acceptance = -1000 potential = { from = { OR = { has_valid_civic = civic_hive_devouring_swarm has_valid_civic = civic_hive_scorched_earth has_menace_perk = menp_behemoth_ever_hungry } } } possible = { always = yes } ai_weight = { weight = 100 } } wg_end_threat_psionics = { casus_belli = cb_psionics_containment hide_if_no_cb = yes total_war = yes set_defender_wargoal = wg_cleansing forbidden_peace_offers = { demand_surrender = "" surrender = "" } surrender_acceptance = -1000 potential = { has_origin = origin_mindwardens from = { is_psionic = yes } } possible = { always = yes } ai_weight = { weight = 100 } } wg_end_threat_assimilators = { casus_belli = cb_containment hide_if_no_cb = yes total_war = yes set_defender_wargoal = wg_absorption forbidden_peace_offers = { demand_surrender = "" surrender = "" } surrender_acceptance = -1000 potential = { from = { has_valid_civic = civic_machine_assimilator } } possible = { always = yes } ai_weight = { weight = 100 } } wg_assimilation = { casus_belli = cb_sublimation hide_if_no_cb = yes total_war = yes set_defender_wargoal = wg_end_threat_assimilators galactic_empire_joins_defender = { from = { is_galactic_emperor = yes } imperial_authority >= 100 } forbidden_peace_offers = { demand_surrender = "" surrender = "" } surrender_acceptance = -1000 potential = { from = { NOT = { is_country_type = fallen_empire } } NAND = { is_galactic_emperor = yes from = { is_galactic_community_member = yes } } } possible = { custom_tooltip = { fail_text = cannot_use_against_emperor OR = { from = { is_galactic_emperor = no } is_galactic_community_member = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } ai_weight = { weight = 100 } } wg_cleansing = { casus_belli = cb_purification hide_if_no_cb = yes total_war = yes set_defender_wargoal = wg_end_threat galactic_empire_joins_defender = { from = { is_galactic_emperor = yes } imperial_authority >= 100 } forbidden_peace_offers = { demand_surrender = "" surrender = "" } surrender_acceptance = -1000 potential = { from = { NOT = { is_country_type = fallen_empire } } NAND = { is_galactic_emperor = yes from = { is_galactic_community_member = yes } } } possible = { custom_tooltip = { fail_text = cannot_use_against_emperor OR = { from = { is_galactic_emperor = no } is_galactic_community_member = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } ai_weight = { weight = 100 } } wg_absorption = { casus_belli = cb_hunger hide_if_no_cb = yes total_war = yes set_defender_wargoal = wg_end_threat_swarm galactic_empire_joins_defender = { from = { is_galactic_emperor = yes } imperial_authority >= 100 } forbidden_peace_offers = { demand_surrender = "" surrender = "" } surrender_acceptance = -1000 potential = { from = { NOT = { is_country_type = fallen_empire } } NAND = { is_galactic_emperor = yes from = { is_galactic_community_member = yes } } } possible = { custom_tooltip = { fail_text = cannot_use_against_emperor OR = { from = { is_galactic_emperor = no } is_galactic_community_member = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } ai_weight = { weight = 100 } } wg_assimilation_vs_fe = { casus_belli = cb_sublimation hide_if_no_cb = yes total_war = yes set_defender_wargoal = wg_end_threat_assimilators forbidden_peace_offers = { demand_surrender = "" surrender = "" } surrender_acceptance = -1000 potential = { from = { is_country_type = fallen_empire } } possible = { custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } ai_weight = { weight = 100 } } wg_cleansing_vs_fe = { casus_belli = cb_purification hide_if_no_cb = yes total_war = yes forbidden_peace_offers = { demand_surrender = "" surrender = "" } surrender_acceptance = -1000 potential = { from = { is_country_type = fallen_empire } } possible = { custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } ai_weight = { weight = 100 } } wg_absorption_vs_fe = { casus_belli = cb_hunger hide_if_no_cb = yes total_war = yes forbidden_peace_offers = { demand_surrender = "" surrender = "" } surrender_acceptance = -1000 potential = { from = { is_country_type = fallen_empire } } possible = { custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } ai_weight = { weight = 100 } } wg_plunder = { casus_belli = cb_despoliation hide_if_no_cb = no total_war = no galactic_empire_joins_defender = { from = { is_galactic_emperor = yes } imperial_authority >= 100 } surrender_acceptance = -25 potential = { has_total_war_cb = no has_valid_civic = civic_barbaric_despoilers NOT = { is_in_federation_with = from } NAND = { is_galactic_emperor = yes from = { is_galactic_community_member = yes } } } possible = { custom_tooltip = { fail_text = has_claimed_all_systems from = { is_country_type = default any_owned_planet = { is_colony = yes root = { NOT = { has_claim = prev.solar_system } } } } } custom_tooltip = { fail_text = cannot_use_against_emperor OR = { from = { is_galactic_emperor = no } is_galactic_community_member = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } on_accept = { custom_tooltip = wg_plunder_accept_them add_resource = { energy = 250 minerals = 250 mult = from.trigger:num_owned_planets } hidden_effect = { from = { add_modifier = { modifier = raided days = 3600 } } } } ai_weight = { weight = 100 } } wg_plunder_raid = { casus_belli = cb_pirate_raid hide_if_no_cb = no total_war = no galactic_empire_joins_defender = { from = { is_galactic_emperor = yes } imperial_authority >= 100 } surrender_acceptance = -25 potential = { has_total_war_cb = no OR = { has_valid_civic = civic_crusader_spirit_corporate has_country_flag = unlocked_pirate_raid_cb } NOT = { is_in_federation_with = from } NAND = { is_galactic_emperor = yes from = { is_galactic_community_member = yes } } } possible = { custom_tooltip = { fail_text = has_claimed_all_systems from = { is_country_type = default any_owned_planet = { is_colony = yes root = { NOT = { has_claim = prev.solar_system } } } } } custom_tooltip = { fail_text = cannot_use_against_emperor OR = { from = { is_galactic_emperor = no } is_galactic_community_member = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } on_accept = { custom_tooltip = wg_plunder_accept_them add_resource = { energy = 500 minerals = 50 mult = from.trigger:num_owned_planets } hidden_effect = { from = { add_modifier = { modifier = raided days = 3600 } } } } ai_weight = { weight = 100 } } wg_colossus = { casus_belli = cb_colossus hide_if_no_cb = yes total_war = yes set_defender_wargoal = wg_end_threat_colossus galactic_empire_joins_defender = { from = { is_galactic_emperor = yes } imperial_authority >= 100 } forbidden_peace_offers = { demand_surrender = "" surrender = "" } surrender_acceptance = -1000 potential = { NAND = { is_galactic_emperor = yes from = { is_galactic_community_member = yes } } } possible = { custom_tooltip = { fail_text = cannot_use_against_emperor OR = { from = { is_galactic_emperor = no } is_galactic_community_member = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } ai_weight = { weight = 100 } } wg_end_threat_colossus = { casus_belli = cb_stop_colossus hide_if_no_cb = yes total_war = yes set_defender_wargoal = wg_colossus galactic_empire_joins_defender = { from = { is_galactic_emperor = yes } imperial_authority >= 100 } forbidden_peace_offers = { demand_surrender = "" surrender = "" } surrender_acceptance = -1000 potential = { NAND = { is_galactic_emperor = yes from = { is_galactic_community_member = yes } } } possible = { custom_tooltip = { fail_text = cannot_use_against_emperor OR = { from = { is_galactic_emperor = no } is_galactic_community_member = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } ai_weight = { weight = 100 } } @protectorate_tech_threshold = 0.4 wg_subjugation = { casus_belli = cb_subjugation hide_if_no_cb = no release_occupied_systems_on_status_quo = yes show_agreement_terms = no surrender_acceptance = -100 potential = { NOR = { has_valid_civic = civic_inwards_perfection FROM = { has_valid_civic = civic_inwards_perfection } is_megacorp = yes has_ascension_perk = ap_become_the_crisis } has_total_war_cb = no } possible = { custom_tooltip = { fail_text = has_claimed_all_systems from = { is_country_type = default any_owned_planet = { is_colony = yes root = { NOT = { has_claim = prev.solar_system } } } } } custom_tooltip = { fail_text = cannot_subjugate_empire_member NAND = { has_galactic_emperor = yes is_galactic_community_member = no from = { is_galactic_community_member = yes } } } custom_tooltip = { fail_text = "cannot_use_against_custodian" from = { is_galactic_custodian = no } } custom_tooltip = { fail_text = "cannot_use_against_emperor" from = { is_galactic_emperor = no } } custom_tooltip = { fail_text = "cannot_use_against_btc" from = { has_been_declared_crisis = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } on_accept = { hidden_effect = { from = { add_threat = { who = root amount = 0.5 } } } if = { limit = { from = { has_been_declared_crisis = no } } from = { if = { limit = { tech_unlocked_ratio = { who = ROOT ratio < @protectorate_tech_threshold } } set_subject_of = { who = ROOT preset = preset_protectorate } } else = { ROOT = { switch = { trigger = has_policy_flag oppressive_terms = { if = { limit = { ROOT = { is_ai = yes } } FROM = { set_subject_of = { who = ROOT preset = preset_vassal_oppressive_ai } } } else = { FROM = { set_subject_of = { who = ROOT preset = preset_vassal_oppressive } } } } balanced_terms = { FROM = { set_subject_of = { who = ROOT preset = preset_vassal_balanced } } } benevolent_terms = { FROM = { set_subject_of = { who = ROOT preset = preset_vassal_benevolent } } } } } } add_modifier = { modifier = newly_subjugated_loyalty years = 5 } } } } on_status_quo = { if = { limit = { exists = last_created_country last_created_country = { has_country_flag = released_empire } } last_created_country = { set_origin_effect = yes if = { limit = { tech_unlocked_ratio = { who = ROOT ratio < @protectorate_tech_threshold } } set_subject_of = { who = ROOT preset = preset_protectorate } } else = { ROOT = { switch = { trigger = has_policy_flag oppressive_terms = { if = { limit = { ROOT = { is_ai = yes } } PREV = { set_subject_of = { who = ROOT preset = preset_vassal_oppressive_ai } } } else = { PREV = { set_subject_of = { who = ROOT preset = preset_vassal_oppressive } } } } balanced_terms = { PREV = { set_subject_of = { who = ROOT preset = preset_vassal_balanced } } } benevolent_terms = { PREV = { set_subject_of = { who = ROOT preset = preset_vassal_benevolent } } } } } } add_modifier = { modifier = newly_subjugated_loyalty years = 5 } } if = { limit = { root = { is_megacorp = yes } last_created_country = { is_megacorp = yes } } last_created_country = { set_merchant_government_effect = yes } } } } ai_weight = { weight = 10 modifier = { factor = 0 has_ai_personality_behaviour = wants_tribute } } } wg_tribute = { casus_belli = cb_subjugation hide_if_no_cb = no release_occupied_systems_on_status_quo = yes surrender_acceptance = -75 potential = { NOR = { is_megacorp = yes has_ascension_perk = ap_become_the_crisis } has_total_war_cb = no } possible = { custom_tooltip = { fail_text = has_claimed_all_systems from = { is_country_type = default any_owned_planet = { is_colony = yes root = { NOT = { has_claim = prev.solar_system } } } } } custom_tooltip = { fail_text = cannot_subjugate_empire_member NAND = { has_galactic_emperor = yes is_galactic_community_member = no from = { is_galactic_community_member = yes } } } custom_tooltip = { fail_text = "cannot_use_against_custodian" from = { is_galactic_custodian = no } } custom_tooltip = { fail_text = "cannot_use_against_emperor" from = { is_galactic_emperor = no } } custom_tooltip = { fail_text = "cannot_use_against_btc" from = { has_been_declared_crisis = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } on_accept = { hidden_effect = { from = { add_threat = { who = root amount = 0.25 } } set_truce = { target = FROM type = war } FROM = { set_truce = { target = ROOT type = war } } } if = { limit = { from = { has_been_declared_crisis = no } } from = { set_subject_of = { who = root preset = preset_tributary } add_modifier = { modifier = newly_subjugated_loyalty years = 5 } } } } on_status_quo = { if = { limit = { exists = last_created_country last_created_country = { has_country_flag = released_empire } } last_created_country = { set_origin_effect = yes set_subject_of = { who = root preset = preset_tributary } add_modifier = { modifier = newly_subjugated_loyalty years = 5 } } if = { limit = { root = { is_megacorp = yes } last_created_country = { is_megacorp = yes } } last_created_country = { set_merchant_government_effect = yes } } } } ai_weight = { weight = 10 modifier = { factor = 0 NOT = { has_ai_personality_behaviour = wants_tribute } } } } wg_megacorp_subjugate = { casus_belli = cb_megacorp_subjugate hide_if_no_cb = no release_occupied_systems_on_status_quo = yes surrender_acceptance = -100 potential = { is_megacorp = yes has_total_war_cb = no NOT = { has_ascension_perk = ap_become_the_crisis } NAND = { is_galactic_emperor = yes from = { is_galactic_community_member = yes } } } possible = { custom_tooltip = { fail_text = has_claimed_all_systems from = { is_country_type = default any_owned_planet = { is_colony = yes root = { NOT = { has_claim = prev.solar_system } } } } } custom_tooltip = { fail_text = cannot_subjugate_empire_member NAND = { has_galactic_emperor = yes is_galactic_community_member = no from = { is_galactic_community_member = yes } } } custom_tooltip = { fail_text = "cannot_use_against_custodian" from = { is_galactic_custodian = no } } custom_tooltip = { fail_text = "cannot_use_against_emperor" from = { is_galactic_emperor = no } } custom_tooltip = { fail_text = "cannot_use_against_btc" from = { has_been_declared_crisis = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } on_accept = { hidden_effect = { from = { add_threat = { who = root amount = 0.5 } } set_truce = { target = FROM type = war } FROM = { set_truce = { target = ROOT type = war } } } FROM = { if = { limit = { has_been_declared_crisis = no } ROOT = { switch = { trigger = has_policy_flag oppressive_terms = { FROM = { set_subject_of = { who = ROOT preset = preset_subsidiary_oppressive } } } balanced_terms = { FROM = { set_subject_of = { who = ROOT preset = preset_subsidiary_balanced } } } benevolent_terms = { FROM = { set_subject_of = { who = ROOT preset = preset_subsidiary_benevolent } } } } } add_modifier = { modifier = newly_subjugated_loyalty years = 5 } } } } on_status_quo = { if = { limit = { exists = last_created_country last_created_country = { has_country_flag = released_empire } } last_created_country = { set_origin_effect = yes ROOT = { switch = { trigger = has_policy_flag oppressive_terms = { PREV = { set_subject_of = { who = ROOT preset = preset_subsidiary_oppressive } } } balanced_terms = { PREV = { set_subject_of = { who = ROOT preset = preset_subsidiary_balanced } } } benevolent_terms = { PREV = { set_subject_of = { who = ROOT preset = preset_subsidiary_benevolent } } } } } add_modifier = { modifier = newly_subjugated_loyalty years = 5 } } if = { limit = { root = { is_megacorp = yes } last_created_country = { is_megacorp = yes } } last_created_country = { set_merchant_government_effect = yes } } } } ai_weight = { weight = 10 } } wg_force_ideology = { casus_belli = cb_ideology hide_if_no_cb = no release_occupied_systems_on_status_quo = yes surrender_acceptance = -100 war_exhaustion = 0.75 potential = { has_policy_flag = liberation_wars has_total_war_cb = no from = { is_country_type = default } NOT = { is_in_federation_with = from } NAND = { is_galactic_emperor = yes from = { is_galactic_community_member = yes } } # Payback empires with the Payback CB should use that version to avoid soft-locking the event chain NAND = { has_origin = origin_payback from = { has_origin = origin_slavers } } } possible = { custom_tooltip = { fail_text = has_claimed_all_systems from = { is_country_type = default any_owned_planet = { is_colony = yes root = { NOT = { has_claim = prev.solar_system } } } } } custom_tooltip = { fail_text = "cannot_use_against_emperor" from = { is_galactic_emperor = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } on_status_quo = { if = { limit = { exists = last_created_country last_created_country = { has_country_flag = released_empire } } last_created_country = { add_modifier = { modifier = recently_liberated days = 7200 } } root = { add_opinion_modifier = { modifier = opinion_we_liberated who = last_created_country } } last_created_country = { add_opinion_modifier = { modifier = opinion_liberated_us who = root } } last_created_country = { set_origin_effect = yes } if = { limit = { root = { is_megacorp = yes } last_created_country = { is_megacorp = yes } } last_created_country = { set_merchant_government_effect = yes } } every_country = { limit = { OR = { is_in_federation_with = root AND = { is_subject = yes exists = overlord overlord = { is_same_value = root } } } } add_opinion_modifier = { modifier = opinion_we_liberated who = last_created_country } last_created_country = { add_opinion_modifier = { modifier = opinion_liberated_us who = prev } } } from = { add_threat = { who = root amount = 0.10 } } if = { limit = { has_valid_civic = civic_crusader_spirit } change_variable = { which = we_bring_peace_achievement_count value = 1 } } } } on_accept = { from = { if = { limit = { is_gestalt = no } custom_tooltip = wg_force_ideology_accept custom_tooltip = wg_force_ideology_accept_2 } every_subject = { limit = { is_gestalt = no any_war = { is_war_participant = { who = prev side = prevprev } } } custom_tooltip = wg_force_ideology_accept_subject } } if = { limit = { from = { has_federation = yes } } custom_tooltip = wg_force_ideology_accept_3 } hidden_effect = { from = { if = { limit = { is_gestalt = no } impose_ideology_effect = yes } every_subject = { limit = { is_gestalt = no } impose_ideology_effect = yes } } end_rivalry = from from = { end_rivalry = root } every_system_within_border = { limit = { from = { has_claim = prev } } remove_claims = { who = from } } every_country = { limit = { OR = { is_in_federation_with = root AND = { is_subject = yes exists = overlord overlord = { is_same_value = root } } } } end_rivalry = from from = { end_rivalry = prev } add_opinion_modifier = { modifier = opinion_we_liberated who = from } from = { add_opinion_modifier = { modifier = opinion_liberated_us who = prev } } every_system_within_border = { limit = { from = { has_claim = prev } } remove_claims = { who = from } } } from = { add_threat = { who = root amount = 0.10 } } from = { leave_alliance = { override_requirements = yes } } if = { limit = { has_valid_civic = civic_crusader_spirit } change_variable = { which = we_bring_peace_achievement_count value = 1 } } } } ai_weight = { weight = 5 } } wg_conquest = { casus_belli = cb_claim hide_if_no_cb = no galactic_empire_joins_defender = { from = { is_galactic_emperor = yes } imperial_authority >= 100 } threat_multiplier = 0.75 potential = { has_total_war_cb = no NAND = { is_galactic_emperor = yes from = { is_galactic_community_member = yes } } } possible = { custom_tooltip = { fail_text = cannot_use_against_emperor OR = { from = { is_galactic_emperor = no } is_galactic_community_member = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } ai_weight = { weight = 2 } } wg_humiliation = { casus_belli = cb_humiliation hide_if_no_cb = no defender_default = yes galactic_empire_joins_defender = { from = { is_galactic_emperor = yes } imperial_authority >= 100 } surrender_acceptance = -25 potential = { has_total_war_cb = no NAND = { is_galactic_emperor = yes from = { is_galactic_community_member = yes } } } possible = { custom_tooltip = { fail_text = has_claimed_all_systems from = { is_country_type = default any_owned_planet = { is_colony = yes root = { NOT = { has_claim = prev.solar_system } } } } } custom_tooltip = { fail_text = cannot_use_against_emperor OR = { from = { is_galactic_emperor = no } is_galactic_community_member = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } on_accept = { if = { limit = { is_country_type = fallen_empire } custom_tooltip = wg_humiliation_fe_accept save_event_target_as = fallen_empire_humiliator from = { fallen_empire_humiliate_effect = yes } } else = { custom_tooltip = wg_humiliation_accept hidden_effect = { add_resource = { influence = 100 } from = { add_modifier = { modifier = humiliated days = 3600 } if = { limit = { has_policy_flag = diplo_stance_supremacist } set_policy = { policy = diplomatic_stance option = diplo_stance_belligerent cooldown = yes } prev = { set_country_flag = humble_pie_achievement } } } if = { limit = { root = { has_tradition = tr_enmity_eclipse } } root = { remove_modifier = reaffirmed_superiority add_modifier = { modifier = reaffirmed_superiority days = 3600 multiplier = value:reaffirmed_superiority_value } } } } } } ai_weight = { weight = 1 } } wg_take_galatron = { casus_belli = cb_galatron hide_if_no_cb = yes release_occupied_systems_on_status_quo = no galactic_empire_joins_defender = { from = { is_galactic_emperor = yes } imperial_authority >= 100 } surrender_acceptance = -40 potential = { has_total_war_cb = no } possible = { custom_tooltip = { fail_text = has_claimed_all_systems from = { is_country_type = default any_owned_planet = { is_colony = yes root = { NOT = { has_claim = prev.solar_system } } } } } custom_tooltip = { fail_text = cannot_use_against_emperor OR = { from = { is_galactic_emperor = no } is_galactic_community_member = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } on_accept = { hidden_effect = { from = { add_threat = { who = root amount = 0.5 } } } from = { add_modifier = { modifier = humiliated days = 3600 } hidden_effect = { country_event = { id = cara.951 } } hidden_effect = { remove_relic = r_galatron } } hidden_effect = { country_event = { id = cara.950 } } add_relic = r_galatron } on_status_quo = { from = { set_closed_borders = { who = prev status = no } } } ai_weight = { weight = 10 modifier = { factor = 0 has_ethic = ethic_gestalt_consciousness } } } wg_expel_corp = { casus_belli = cb_expel_corp hide_if_no_cb = yes release_occupied_systems_on_status_quo = no galactic_empire_joins_defender = { from = { is_galactic_emperor = yes } imperial_authority >= 100 } set_defender_wargoal = wg_megacorp_subjugate surrender_acceptance = -50 potential = { has_total_war_cb = no } possible = { custom_tooltip = { fail_text = has_claimed_all_systems from = { is_country_type = default any_owned_planet = { is_colony = yes root = { NOT = { has_claim = prev.solar_system } } } } } custom_tooltip = { fail_text = cannot_use_against_emperor OR = { from = { is_galactic_emperor = no } is_galactic_community_member = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } on_status_quo = { hidden_effect = { from = { save_event_target_as = defender } } if = { limit = { is_overlord = no } custom_tooltip = wg_expel_corp_status_quo_effects hidden_effect = { every_owned_planet = { limit = { has_branch_office = event_target:defender } branch_office_owner = { add_resource = { trade = 1000 } } close_branch_office = yes } } } else = { custom_tooltip = wg_expel_corp_subject_status_quo_effects hidden_effect = { every_owned_planet = { limit = { has_branch_office = event_target:defender } branch_office_owner = { add_resource = { trade = 1000 } } close_branch_office = yes } every_subject = { every_owned_planet = { limit = { has_branch_office = event_target:defender } branch_office_owner = { add_resource = { trade = 1000 } } close_branch_office = yes } } } } hidden_effect = { fromfrom = { every_war_participant = { limit = { prev = { using_war_goal = { type = wg_expel_corp owner = prev } } } every_owned_planet = { limit = { has_branch_office = event_target:defender } branch_office_owner = { add_resource = { trade = 1000 } } close_branch_office = yes } if = { limit = { is_overlord = yes } every_subject = { every_owned_planet = { limit = { has_branch_office = event_target:defender } branch_office_owner = { add_resource = { trade = 1000 } } close_branch_office = yes } } } } } } } on_accept = { hidden_effect = { from = { save_event_target_as = defender } } if = { limit = { is_overlord = no } custom_tooltip = wg_expel_corp_effects hidden_effect = { every_owned_planet = { limit = { has_branch_office = event_target:defender } close_branch_office = yes owner = { add_resource = { trade = 1000 } } } } } else = { custom_tooltip = wg_expel_corp_subject_effects hidden_effect = { every_owned_planet = { limit = { has_branch_office = event_target:defender } close_branch_office = yes owner = { add_resource = { trade = 1000 } } } every_subject = { every_owned_planet = { limit = { has_branch_office = event_target:defender } close_branch_office = yes owner = { add_resource = { trade = 1000 } } } } } } # ... and their allies, if applicable. hidden_effect = { fromfrom = { every_war_participant = { limit = { prev = { using_war_goal = { type = wg_expel_corp owner = prev } } } every_owned_planet = { limit = { has_branch_office = event_target:defender } close_branch_office = yes owner = { add_resource = { trade = 1000 } } } if = { limit = { is_overlord = yes } every_subject = { every_owned_planet = { limit = { has_branch_office = event_target:defender } close_branch_office = yes owner = { add_resource = { trade = 1000 } } } } } } } } } ai_weight = { weight = 10 } } wg_hostile_takeover = { casus_belli = cb_hostile_takeover hide_if_no_cb = yes release_occupied_systems_on_status_quo = no galactic_empire_joins_defender = { from = { is_galactic_emperor = yes } imperial_authority >= 100 } surrender_acceptance = -75 potential = { has_total_war_cb = no } possible = { custom_tooltip = { fail_text = has_claimed_all_systems from = { is_country_type = default any_owned_planet = { is_colony = yes root = { NOT = { has_claim = prev.solar_system } } } } } custom_tooltip = { fail_text = cannot_use_against_emperor OR = { from = { is_galactic_emperor = no } is_galactic_community_member = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } on_accept = { every_country = { limit = { OR = { has_commercial_pact = root is_in_federation_with = root is_at_war_with = root } } every_owned_planet = { limit = { has_branch_office = from } hidden_effect = { close_branch_office = yes if = { limit = { owner = { NOT = { is_same_value = root } } } establish_branch_office = root } custom_tooltip = wg_seize_branch_office_effects } } } } ai_weight = { weight = 10 } } wg_steal_galatron = { casus_belli = cb_steal_galatron hide_if_no_cb = yes release_occupied_systems_on_status_quo = no galactic_empire_joins_defender = { from = { is_galactic_emperor = yes } imperial_authority >= 100 } surrender_acceptance = -40 potential = { has_total_war_cb = no } possible = { custom_tooltip = { fail_text = has_claimed_all_systems from = { is_country_type = default any_owned_planet = { is_colony = yes root = { NOT = { has_claim = prev.solar_system } } } } } custom_tooltip = { fail_text = cannot_use_against_emperor OR = { from = { is_galactic_emperor = no } is_galactic_community_member = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } on_accept = { hidden_effect = { from = { add_threat = { who = root amount = 0.5 } } } if = { limit = { has_ancrel = yes } from = { add_modifier = { modifier = humiliated days = 3600 } hidden_effect = { country_event = { id = cara.951 } } hidden_effect = { remove_relic = r_galatron } } hidden_effect = { country_event = { id = cara.950 } } add_relic = r_galatron } else = { from = { remove_modifier = galatron_modifier add_modifier = { modifier = humiliated days = 3600 } hidden_effect = { country_event = { id = cara.951 } } } hidden_effect = { country_event = { id = cara.950 } } add_modifier = { modifier = galatron_modifier days = -1 } } } on_status_quo = { hidden_effect = { add_resource = { energy = 1000 } } } ai_weight = { weight = 10 modifier = { factor = 0 has_ethic = ethic_gestalt_consciousness } } } wg_scion = { casus_belli = cb_scion hide_if_no_cb = yes release_occupied_systems_on_status_quo = yes surrender_acceptance = -100 potential = { has_total_war_cb = no } possible = { custom_tooltip = { fail_text = has_claimed_all_systems from = { is_country_type = default any_owned_planet = { is_colony = yes root = { NOT = { has_claim = prev.solar_system } } } } } custom_tooltip = { fail_text = cannot_subjugate_empire_member NAND = { has_galactic_emperor = yes is_galactic_community_member = no from = { is_galactic_community_member = yes } } } custom_tooltip = { fail_text = "cannot_use_against_custodian" from = { is_galactic_custodian = no } } custom_tooltip = { fail_text = "cannot_use_against_emperor" from = { is_galactic_emperor = no } } custom_tooltip = { fail_text = "cannot_use_against_btc" from = { has_been_declared_crisis = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } on_accept = { hidden_effect = { from = { save_event_target_as = scion_victim add_threat = { who = root amount = 0.5 } } root = { overlord = { save_event_target_as = scion_master } country_event = { id = origin.6 days = 1 } # Delay is necessary, or game does not think war was won } } tooltip = { if = { limit = { from = { has_been_declared_crisis = no } } from = { set_subject_of = { who = event_target:scion_master preset = preset_scion } } } } } on_status_quo = { if = { limit = { exists = last_created_country last_created_country = { has_country_flag = released_empire } } overlord = { save_event_target_as = scion_master } last_created_country = { set_origin_effect = yes set_subject_of = { who = event_target:scion_master preset = preset_scion } } if = { limit = { root = { is_megacorp = yes } last_created_country = { is_megacorp = yes } } last_created_country = { set_merchant_government_effect = yes } } } } ai_weight = { weight = 10 } } wg_hegemon = { casus_belli = cb_hegemon hide_if_no_cb = yes release_occupied_systems_on_status_quo = yes surrender_acceptance = -100 potential = { has_total_war_cb = no } possible = { custom_tooltip = { fail_text = has_claimed_all_systems from = { is_country_type = default any_owned_planet = { is_colony = yes root = { NOT = { has_claim = prev.solar_system } } } } } custom_tooltip = { fail_text = cannot_subjugate_empire_member NAND = { has_galactic_emperor = yes is_galactic_community_member = no from = { is_galactic_community_member = yes } } } custom_tooltip = { fail_text = "cannot_use_against_custodian" from = { is_galactic_custodian = no } } custom_tooltip = { fail_text = "cannot_use_against_emperor" from = { is_galactic_emperor = no } } } on_accept = { hidden_effect = { from = { add_threat = { who = root amount = 0.5 } } } from = { join_alliance = { who = root override_requirements = yes } } } on_status_quo = { if = { limit = { exists = last_created_country last_created_country = { has_country_flag = released_empire } } last_created_country = { set_origin_effect = yes join_alliance = { who = root override_requirements = yes } } if = { limit = { root = { is_megacorp = yes } last_created_country = { is_megacorp = yes } } last_created_country = { set_merchant_government_effect = yes } } } } ai_weight = { weight = 10 modifier = { factor = 0 relative_power = { who = from value < superior } } } } wg_leave_hegemony = { casus_belli = cb_secession hide_if_no_cb = yes set_defender_wargoal = wg_assert_hegemony potential = { always = yes } possible = { always = yes } on_status_quo = { custom_tooltip = wg_leave_hegemony_status_quo hidden_effect = { leave_alliance = { override_requirements = yes } if = { limit = { from = { federation = { check_variable = { which = federation_secession_war value > 0 } } } } from = { federation = { change_variable = { which = federation_secession_war value = -1 } } } } } } on_accept = { custom_tooltip = wg_leave_hegemony_accept hidden_effect = { leave_alliance = { override_requirements = yes } every_system_within_border = { limit = { from = { has_claim = prev } } remove_claims = { who = from } } if = { limit = { from = { federation = { check_variable = { which = federation_secession_war value > 0 } } } } from = { federation = { change_variable = { which = federation_secession_war value = -1 } } } } } } on_wargoal_set = { every_system_within_border = { limit = { NOT = { from = { has_claim = prev } } } add_claims = { who = from } } from = { federation = { change_variable = { which = federation_secession_war value = 1 } } } remove_country_flag = asked_to_leave_hegemony leave_alliance = { override_requirements = yes } # Temporary leave federation during war if = { limit = { has_opinion_modifier = { who = from modifier = opinion_denied_to_leave_hegemony } } remove_opinion_modifier = { who = from modifier = opinion_denied_to_leave_hegemony } } if = { limit = { from = { has_opinion_modifier = { who = root modifier = opinion_wanted_to_leave_hegemony } } } from = { remove_opinion_modifier = { who = root modifier = opinion_wanted_to_leave_hegemony } } } } ai_weight = { weight = 10 } } wg_counterattack = { casus_belli = cb_counterattack hide_if_no_cb = no threat_multiplier = 0.67 potential = { has_total_war_cb = no is_galactic_community_member = yes OR = { is_active_resolution = "resolution_mutualdefense_enemy_of_my_enemy" is_active_resolution = "resolution_mutualdefense_castigation_proclamation" is_active_resolution = "resolution_mutualdefense_renegade_containment" } } possible = { always = yes } ai_weight = { weight = 2 } } wg_renegade_containment = { casus_belli = cb_renegade_containment hide_if_no_cb = yes total_war = yes set_defender_wargoal = wg_end_threat_renegade_containment forbidden_peace_offers = { demand_surrender = "" surrender = "" } surrender_acceptance = -1000 potential = { always = yes } possible = { always = yes } ai_weight = { weight = 100 } } wg_end_threat_renegade_containment = { casus_belli = cb_end_threat_renegade_containment hide_if_no_cb = yes total_war = yes set_defender_wargoal = wg_renegade_containment forbidden_peace_offers = { demand_surrender = "" surrender = "" } surrender_acceptance = -1000 potential = { always = yes } possible = { always = yes } ai_weight = { weight = 100 } } wg_revenge_for_eaten_star = { casus_belli = cb_revenge_for_eaten_star hide_if_no_cb = yes total_war = yes set_defender_wargoal = wg_end_threat_revenge_for_eaten_star galactic_empire_joins_defender = { from = { is_galactic_emperor = yes } imperial_authority >= 100 } forbidden_peace_offers = { demand_surrender = "" surrender = "" } surrender_acceptance = -1000 potential = { NAND = { is_galactic_emperor = yes from = { is_galactic_community_member = yes } } } possible = { custom_tooltip = { fail_text = cannot_use_against_emperor OR = { from = { is_galactic_emperor = no } is_galactic_community_member = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } ai_weight = { weight = 100 } } wg_end_threat_revenge_for_eaten_star = { casus_belli = cb_end_threat_revenge_for_eaten_star hide_if_no_cb = yes total_war = yes set_defender_wargoal = wg_revenge_for_eaten_star galactic_empire_joins_defender = { from = { is_galactic_emperor = yes } imperial_authority >= 100 } forbidden_peace_offers = { demand_surrender = "" surrender = "" } surrender_acceptance = -1000 potential = { NAND = { is_galactic_emperor = yes from = { is_galactic_community_member = yes } } } } wg_allegiance = { casus_belli = cb_allegiance hide_if_no_cb = yes secret_fealties_join_attacker = yes set_defender_wargoal = wg_defend_allegiance cede_claims = occupied_only potential = { always = yes } possible = { NOT = { from = { is_at_war_with = ROOT any_subject = { has_secret_fealty_with = ROOT } } } } on_status_quo = { from = { every_subject = { limit = { has_secret_fealty_with = ROOT } add_modifier = { modifier = failed_betrayal_status_quo years = 5 } } } } on_accept = { from = { every_subject = { limit = { has_secret_fealty_with = ROOT } set_subject_of = { who = ROOT } add_modifier = { modifier = pledged_allegiance years = 10 } set_country_flag = meet_the_new_boss_achievement } } } ai_weight = { weight = 15 } } wg_payback_stop_atrocities = { casus_belli = cb_payback_punishment hide_if_no_cb = yes galactic_empire_joins_defender = { from = { is_galactic_emperor = yes } imperial_authority >= 100 } potential = { always = yes } possible = { from = { is_valid_target_fe_stop_atrocities = yes } } on_accept = { custom_tooltip = wg_humiliation_fe_accept custom_tooltip = wg_payback_stop_atrocities_accept save_event_target_as = fallen_empire_humiliator from = { payback_stop_atrocities_effect = yes fallen_empire_humiliate_effect = yes } } ai_weight = { weight = 10 } } wg_blaze = { casus_belli = cb_blaze hide_if_no_cb = yes total_war = yes set_defender_wargoal = wg_end_threat galactic_empire_joins_defender = { from = { is_galactic_emperor = yes } imperial_authority >= 100 } forbidden_peace_offers = { demand_surrender = "" surrender = "" } surrender_acceptance = -500 potential = { from = { NOT = { is_country_type = fallen_empire } } NAND = { is_galactic_emperor = yes from = { is_galactic_community_member = yes } } } possible = { custom_tooltip = { fail_text = cannot_use_against_emperor OR = { from = { is_galactic_emperor = no } is_galactic_community_member = no } } custom_tooltip = { fail_text = pax_galactica_active NAND = { is_active_resolution = resolution_emperor_pax_galactica is_galactic_community_member = yes from = { is_galactic_community_member = yes } } } } ai_weight = { weight = 100 } }