# Author(s): alexmarkel0v, AngriestBird, Crimlutes # Last modified January 2025 form_BLT_category = { ### Integrate ### BLT_integrate_start = { icon = GFX_decision_generic_form_nation ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 1 } } check_variable = { var = formable_committed_size value = 12 compare = greater_than_or_equals } } } visible = { NOT = { has_country_flag = is_BLT } } highlight_states = { highlight_state_targets = { state = 109 state = 110 state = 1043 state = 1044 state = 107 state = 108 state = 1013 state = 1058 state = 105 state = 106 state = 1012 state = 1074 } } available = { custom_trigger_tooltip = { tooltip = BLT_integrate_trigger_tt count_triggers = { amount = 10 109 = { state_owned_or_puppet_owned_by_root = yes } 110 = { state_owned_or_puppet_owned_by_root = yes } 1043 = { state_owned_or_puppet_owned_by_root = yes } 1044 = { state_owned_or_puppet_owned_by_root = yes } 107 = { state_owned_or_puppet_owned_by_root = yes } 108 = { state_owned_or_puppet_owned_by_root = yes } 1013 = { state_owned_or_puppet_owned_by_root = yes } 1058 = { state_owned_or_puppet_owned_by_root = yes } 105 = { state_owned_or_puppet_owned_by_root = yes } 106 = { state_owned_or_puppet_owned_by_root = yes } 1012 = { state_owned_or_puppet_owned_by_root = yes } 1074 = { state_owned_or_puppet_owned_by_root = yes } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision BLT_integrate_start" if = { limit = { NOT = { has_country_flag = is_BLT } } set_country_flag = is_BLT set_global_flag = BLT_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_@ROOT custom_effect_tooltip = BLT_start_integrate_tt custom_effect_tooltip = general_integrate_tt add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 1 } set_variable = { formable_committed_size = 12 } } } } #LIT BLT_integrate_LIT = { icon = GFX_decision_generic_form_nation cost = 250 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 1 } } check_variable = { var = formable_committed_size value = 12 compare = greater_than_or_equals } } } allowed = { NOT = { tag = LIT } } visible = { has_country_flag = is_BLT NOT = { has_country_flag = integrated_LIT } } highlight_states = { highlight_state_targets = { state = 109 state = 110 state = 1043 state = 1044 } } available = { custom_trigger_tooltip = { tooltip = BLT_integrate_LIT_tt 109 = { state_owned_or_puppet_owned_by_root = yes } 110 = { state_owned_or_puppet_owned_by_root = yes } 1043 = { state_owned_or_puppet_owned_by_root = yes } 1044 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision BLT_integrate_LIT" add_state_core = 109 add_state_core = 110 add_state_core = 1043 add_state_core = 1044 if = { limit = { country_exists = LIT LIT = { is_subject_of = ROOT all_owned_state = { OR = { state = 109 state = 110 state = 1043 state = 1044 } } } } LIT = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = LIT transfer_troops = yes } } if = { limit = { NOT = { owns_state = 109 } } transfer_state = 109 } if = { limit = { NOT = { owns_state = 110 } } transfer_state = 110 } if = { limit = { NOT = { owns_state = 1043 } } transfer_state = 1043 } if = { limit = { NOT = { owns_state = 1044 } } transfer_state = 1044 } if = { limit = { NOT = { has_country_flag = is_BLT } } set_country_flag = is_BLT set_global_flag = BLT_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_LIT } } #LAT BLT_integrate_LAT = { icon = GFX_decision_generic_form_nation cost = 250 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 1 } } check_variable = { var = formable_committed_size value = 12 compare = greater_than_or_equals } } } allowed = { NOT = { tag = LAT } } visible = { has_country_flag = is_BLT NOT = { has_country_flag = integrated_LAT } } highlight_states = { highlight_state_targets = { state = 107 state = 108 state = 1013 state = 1058 } } available = { custom_trigger_tooltip = { tooltip = BLT_integrate_LAT_tt 107 = { state_owned_or_puppet_owned_by_root = yes } 108 = { state_owned_or_puppet_owned_by_root = yes } 1013 = { state_owned_or_puppet_owned_by_root = yes } 1058 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision BLT_integrate_LAT" add_state_core = 107 add_state_core = 108 add_state_core = 1013 add_state_core = 1058 if = { limit = { country_exists = LAT LAT = { is_subject_of = ROOT all_owned_state = { OR = { state = 107 state = 108 state = 1013 state = 1058 } } } } LAT = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = LAT transfer_troops = yes } } if = { limit = { NOT = { owns_state = 107 } } transfer_state = 107 } if = { limit = { NOT = { owns_state = 108 } } transfer_state = 108 } if = { limit = { NOT = { owns_state = 1013 } } transfer_state = 1013 } if = { limit = { NOT = { owns_state = 1058 } } transfer_state = 1058 } if = { limit = { NOT = { has_country_flag = is_BLT } } set_country_flag = is_BLT set_global_flag = BLT_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_LAT } } #EST BLT_integrate_EST = { icon = GFX_decision_generic_form_nation cost = 250 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 1 } } check_variable = { var = formable_committed_size value = 12 compare = greater_than_or_equals } } } allowed = { NOT = { tag = EST } } visible = { has_country_flag = is_BLT NOT = { has_country_flag = integrated_EST } } highlight_states = { highlight_state_targets = { state = 105 state = 106 state = 1012 state = 1074 } } available = { custom_trigger_tooltip = { tooltip = BLT_integrate_EST_tt 105 = { state_owned_or_puppet_owned_by_root = yes } 106 = { state_owned_or_puppet_owned_by_root = yes } 1012 = { state_owned_or_puppet_owned_by_root = yes } 1074 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision BLT_integrate_EST" add_state_core = 105 add_state_core = 106 add_state_core = 1012 add_state_core = 1074 if = { limit = { country_exists = EST EST = { is_subject_of = ROOT all_owned_state = { OR = { state = 105 state = 106 state = 1012 state = 1074 } } } } EST = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = EST transfer_troops = yes } } if = { limit = { NOT = { owns_state = 105 } } transfer_state = 105 } if = { limit = { NOT = { owns_state = 106 } } transfer_state = 106 } if = { limit = { NOT = { owns_state = 1012 } } transfer_state = 1012 } if = { limit = { NOT = { owns_state = 1074 } } transfer_state = 1074 } if = { limit = { NOT = { has_country_flag = is_BLT } } set_country_flag = is_BLT set_global_flag = BLT_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_EST } } ### Cosmetic ### BLT_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 1 } } check_variable = { var = formable_committed_size value = 12 compare = greater_than_or_equals } } } visible = { has_country_flag = is_BLT NOT = { has_cosmetic_tag = BLT } NOT = { has_global_flag = european_federation } NOT = { has_idea = EU_member } } highlight_states = { highlight_state_targets = { state = 109 state = 110 state = 1043 state = 1044 state = 107 state = 108 state = 1013 state = 1058 state = 105 state = 106 state = 1012 state = 1074 } } available = { custom_trigger_tooltip = { tooltip = BLT_update_flag_tt count_triggers = { amount = 10 109 = { is_core_of = ROOT } 110 = { is_core_of = ROOT } 1043 = { is_core_of = ROOT } 1044 = { is_core_of = ROOT } 107 = { is_core_of = ROOT } 108 = { is_core_of = ROOT } 1013 = { is_core_of = ROOT } 1058 = { is_core_of = ROOT } 105 = { is_core_of = ROOT } 106 = { is_core_of = ROOT } 1012 = { is_core_of = ROOT } 1074 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision BLT_update_flag" set_cosmetic_tag = BLT remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 1 } set_variable = { formable_committed_size = 12 } } } } # Post-formation purchase of unowned cores BLT_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 1 } } check_variable = { var = formable_committed_size value = 12 compare = greater_than_or_equals } } } visible = { has_country_flag = is_BLT } target_root_trigger = { has_country_flag = is_BLT } target_array = global.BLT_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision BLT_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel BLT_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove BLT_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } } form_FCA_category = { ### Integrate ### FCA_integrate_start = { icon = GFX_decision_generic_form_nation ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 2 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } visible = { NOT = { has_country_flag = is_FCA } } highlight_states = { highlight_states_trigger = { OR = { is_core_of = BLZ is_core_of = GUA is_core_of = ELS is_core_of = HON is_core_of = NIC is_core_of = COS is_core_of = PAN } } } available = { custom_trigger_tooltip = { tooltip = FCA_integrate_trigger_tt count_triggers = { amount = 11 841 = { state_owned_or_puppet_owned_by_root = yes } 842 = { state_owned_or_puppet_owned_by_root = yes } 843 = { state_owned_or_puppet_owned_by_root = yes } 844 = { state_owned_or_puppet_owned_by_root = yes } 845 = { state_owned_or_puppet_owned_by_root = yes } 846 = { state_owned_or_puppet_owned_by_root = yes } 847 = { state_owned_or_puppet_owned_by_root = yes } 848 = { state_owned_or_puppet_owned_by_root = yes } 849 = { state_owned_or_puppet_owned_by_root = yes } 850 = { state_owned_or_puppet_owned_by_root = yes } 851 = { state_owned_or_puppet_owned_by_root = yes } 852 = { state_owned_or_puppet_owned_by_root = yes } 853 = { state_owned_or_puppet_owned_by_root = yes } 1213 = { state_owned_or_puppet_owned_by_root = yes } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision FCA_integrate_start" if = { limit = { NOT = { has_country_flag = is_FCA } } set_country_flag = is_FCA set_global_flag = FCA_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_@ROOT custom_effect_tooltip = FCA_start_integrate_tt custom_effect_tooltip = general_integrate_tt add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 2 } set_variable = { formable_committed_size = 14 } } } } #BLZ FCA_integrate_BLZ = { icon = GFX_decision_generic_form_nation cost = 100 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 2 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } allowed = { NOT = { tag = BLZ } } visible = { has_country_flag = is_FCA NOT = { has_country_flag = integrated_BLZ } } highlight_states = { highlight_state_targets = { state = 845 } } available = { custom_trigger_tooltip = { tooltip = FCA_integrate_BLZ_tt 845 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision FCA_integrate_BLZ" add_state_core = 845 if = { limit = { country_exists = BLZ BLZ = { is_subject_of = ROOT all_owned_state = { state = 845 } } } BLZ = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = BLZ transfer_troops = yes } } if = { limit = { NOT = { owns_state = 845 } } transfer_state = 845 } if = { limit = { NOT = { has_country_flag = is_FCA } } set_country_flag = is_FCA set_global_flag = FCA_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_BLZ } } #GUA FCA_integrate_GUA = { icon = GFX_decision_generic_form_nation cost = 200 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 2 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } allowed = { NOT = { tag = GUA } } visible = { has_country_flag = is_FCA NOT = { has_country_flag = integrated_GUA } } highlight_states = { highlight_state_targets = { state = 841 state = 842 } } available = { custom_trigger_tooltip = { tooltip = FCA_integrate_GUA_tt 841 = { state_owned_or_puppet_owned_by_root = yes } 842 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision FCA_integrate_GUA" add_state_core = 841 add_state_core = 842 if = { limit = { country_exists = GUA GUA = { is_subject_of = ROOT all_owned_state = { OR = { state = 841 state = 842 } } } } GUA = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = GUA transfer_troops = yes } } if = { limit = { NOT = { owns_state = 841 } } transfer_state = 841 } if = { limit = { NOT = { owns_state = 842 } } transfer_state = 842 } if = { limit = { NOT = { has_country_flag = is_FCA } } set_country_flag = is_FCA set_global_flag = FCA_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_GUA } } #ELS FCA_integrate_ELS = { icon = GFX_decision_generic_form_nation cost = 100 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 2 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } allowed = { NOT = { tag = ELS } } visible = { has_country_flag = is_FCA NOT = { has_country_flag = integrated_ELS } } highlight_states = { highlight_state_targets = { state = 843 state = 844 } } available = { custom_trigger_tooltip = { tooltip = FCA_integrate_ELS_tt 843 = { state_owned_or_puppet_owned_by_root = yes } 844 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision FCA_integrate_ELS" add_state_core = 843 add_state_core = 844 if = { limit = { country_exists = ELS ELS = { is_subject_of = ROOT all_owned_state = { OR = { state = 843 state = 844 } } } } ELS = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = ELS transfer_troops = yes } } if = { limit = { NOT = { owns_state = 843 } } transfer_state = 843 } if = { limit = { NOT = { owns_state = 844 } } transfer_state = 844 } if = { limit = { NOT = { has_country_flag = is_FCA } } set_country_flag = is_FCA set_global_flag = FCA_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_ELS } } #HON FCA_integrate_HON = { icon = GFX_decision_generic_form_nation cost = 200 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 2 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } allowed = { NOT = { tag = HON } } visible = { has_country_flag = is_FCA NOT = { has_country_flag = integrated_HON } } highlight_states = { highlight_state_targets = { state = 846 state = 847 } } available = { custom_trigger_tooltip = { tooltip = FCA_integrate_HON_tt 846 = { state_owned_or_puppet_owned_by_root = yes } 847 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision FCA_integrate_HON" add_state_core = 846 add_state_core = 847 if = { limit = { country_exists = HON HON = { is_subject_of = ROOT all_owned_state = { OR = { state = 846 state = 847 } } } } HON = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = HON transfer_troops = yes } } if = { limit = { NOT = { owns_state = 846 } } transfer_state = 846 } if = { limit = { NOT = { owns_state = 847 } } transfer_state = 847 } if = { limit = { NOT = { has_country_flag = is_FCA } } set_country_flag = is_FCA set_global_flag = FCA_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_HON } } #NIC FCA_integrate_NIC = { icon = GFX_decision_generic_form_nation cost = 200 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 2 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } allowed = { NOT = { tag = NIC } } visible = { has_country_flag = is_FCA NOT = { has_country_flag = integrated_NIC } } highlight_states = { highlight_state_targets = { state = 848 state = 849 } } available = { custom_trigger_tooltip = { tooltip = FCA_integrate_NIC_tt 848 = { state_owned_or_puppet_owned_by_root = yes } 849 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision FCA_integrate_NIC" add_state_core = 848 add_state_core = 849 if = { limit = { country_exists = NIC NIC = { is_subject_of = ROOT all_owned_state = { OR = { state = 848 state = 849 } } } } NIC = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = NIC transfer_troops = yes } } if = { limit = { NOT = { owns_state = 848 } } transfer_state = 848 } if = { limit = { NOT = { owns_state = 849 } } transfer_state = 849 } if = { limit = { NOT = { has_country_flag = is_FCA } } set_country_flag = is_FCA set_global_flag = FCA_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_NIC } } #COS FCA_integrate_COS = { icon = GFX_decision_generic_form_nation cost = 100 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 2 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } allowed = { NOT = { tag = COS } } visible = { has_country_flag = is_FCA NOT = { has_country_flag = integrated_COS } } highlight_states = { highlight_state_targets = { state = 850 state = 851 } } available = { custom_trigger_tooltip = { tooltip = FCA_integrate_COS_tt 850 = { state_owned_or_puppet_owned_by_root = yes } 851 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision FCA_integrate_COS" add_state_core = 850 add_state_core = 851 if = { limit = { country_exists = COS COS = { is_subject_of = ROOT all_owned_state = { OR = { state = 850 state = 851 } } } } COS = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = COS transfer_troops = yes } } if = { limit = { NOT = { owns_state = 850 } } transfer_state = 850 } if = { limit = { NOT = { owns_state = 851 } } transfer_state = 851 } if = { limit = { NOT = { has_country_flag = is_FCA } } set_country_flag = is_FCA set_global_flag = FCA_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_COS } } #PAN FCA_integrate_PAN = { icon = GFX_decision_generic_form_nation cost = 200 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 2 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } allowed = { NOT = { tag = PAN } } visible = { has_country_flag = is_FCA NOT = { has_country_flag = integrated_PAN } } highlight_states = { highlight_state_targets = { state = 852 state = 853 state = 1213 } } available = { custom_trigger_tooltip = { tooltip = FCA_integrate_PAN_tt 852 = { state_owned_or_puppet_owned_by_root = yes } 853 = { state_owned_or_puppet_owned_by_root = yes } 1213 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision FCA_integrate_PAN" add_state_core = 852 add_state_core = 853 add_state_core = 1213 if = { limit = { country_exists = PAN PAN = { is_subject_of = ROOT all_owned_state = { OR = { state = 852 state = 853 state = 1213 } } } } PAN = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = PAN transfer_troops = yes } } if = { limit = { NOT = { owns_state = 852 } } transfer_state = 852 } if = { limit = { NOT = { owns_state = 853 } } transfer_state = 853 } if = { limit = { NOT = { owns_state = 1213 } } transfer_state = 1213 } if = { limit = { NOT = { has_country_flag = is_FCA } } set_country_flag = is_FCA set_global_flag = FCA_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_PAN } } ### Cosmetic ### FCA_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 1 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 2 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } visible = { has_country_flag = is_FCA NOT = { has_cosmetic_tag = FCA } } highlight_states = { highlight_state_targets = { state = 841 state = 842 state = 843 state = 844 state = 845 state = 846 state = 847 state = 848 state = 849 state = 850 state = 851 state = 852 state = 853 state = 1213 } } available = { custom_trigger_tooltip = { tooltip = FCA_update_flag_tt count_triggers = { amount = 11 841 = { is_core_of = ROOT } 842 = { is_core_of = ROOT } 843 = { is_core_of = ROOT } 844 = { is_core_of = ROOT } 845 = { is_core_of = ROOT } 846 = { is_core_of = ROOT } 847 = { is_core_of = ROOT } 848 = { is_core_of = ROOT } 849 = { is_core_of = ROOT } 850 = { is_core_of = ROOT } 851 = { is_core_of = ROOT } 852 = { is_core_of = ROOT } 853 = { is_core_of = ROOT } 1213 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision FCA_update_flag" set_cosmetic_tag = FCA remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 2 } set_variable = { formable_committed_size = 14 } } } } # Post-formation purchase of unowned cores FCA_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 2 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } visible = { has_country_flag = is_FCA } target_root_trigger = { has_country_flag = is_FCA } target_array = global.FCA_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision FCA_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel FCA_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove FCA_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } } #Gran Columbia form_GCL_category = { GCL_integrate_start = { icon = GFX_decision_generic_form_nation ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 3 } } check_variable = { var = formable_committed_size value = 18 compare = greater_than_or_equals } } } visible = { NOT = { has_country_flag = is_GCL } } highlight_states = { highlight_states_trigger = { OR = { is_core_of = ECU is_core_of = VEN is_core_of = COL } } } available = { custom_trigger_tooltip = { tooltip = GCL_integrate_trigger_tt count_triggers = { amount = 14 870 = { state_owned_or_puppet_owned_by_root = yes } 871 = { state_owned_or_puppet_owned_by_root = yes } 872 = { state_owned_or_puppet_owned_by_root = yes } 873 = { state_owned_or_puppet_owned_by_root = yes } 874 = { state_owned_or_puppet_owned_by_root = yes } 875 = { state_owned_or_puppet_owned_by_root = yes } 876 = { state_owned_or_puppet_owned_by_root = yes } 905 = { state_owned_or_puppet_owned_by_root = yes } 906 = { state_owned_or_puppet_owned_by_root = yes } 907 = { state_owned_or_puppet_owned_by_root = yes } 908 = { state_owned_or_puppet_owned_by_root = yes } 911 = { state_owned_or_puppet_owned_by_root = yes } 912 = { state_owned_or_puppet_owned_by_root = yes } 913 = { state_owned_or_puppet_owned_by_root = yes } 914 = { state_owned_or_puppet_owned_by_root = yes } 915 = { state_owned_or_puppet_owned_by_root = yes } 916 = { state_owned_or_puppet_owned_by_root = yes } 917 = { state_owned_or_puppet_owned_by_root = yes } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision GCL_integrate_start" if = { limit = { NOT = { has_country_flag = is_GCL } } set_country_flag = is_GCL set_global_flag = GCL_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_@ROOT custom_effect_tooltip = GCL_start_integrate_tt custom_effect_tooltip = is_GCL add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 3 } set_variable = { formable_committed_size = 18 } } } } ### Integrate ### #COL GCL_integrate_COL = { icon = GFX_decision_generic_form_nation cost = 400 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 3 } } check_variable = { var = formable_committed_size value = 18 compare = greater_than_or_equals } } } allowed = { NOT = { tag = COL } } visible = { has_country_flag = is_GCL NOT = { has_country_flag = integrated_COL } } highlight_states = { highlight_state_targets = { state = 870 state = 871 state = 872 state = 873 state = 911 state = 912 state = 913 state = 914 } } available = { custom_trigger_tooltip = { tooltip = GCL_integrate_COL_tt 870 = { state_owned_or_puppet_owned_by_root = yes } 871 = { state_owned_or_puppet_owned_by_root = yes } 872 = { state_owned_or_puppet_owned_by_root = yes } 873 = { state_owned_or_puppet_owned_by_root = yes } 911 = { state_owned_or_puppet_owned_by_root = yes } 912 = { state_owned_or_puppet_owned_by_root = yes } 913 = { state_owned_or_puppet_owned_by_root = yes } 914 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision GCL_integrate_COL" add_state_core = 870 add_state_core = 871 add_state_core = 872 add_state_core = 873 add_state_core = 911 add_state_core = 912 add_state_core = 913 add_state_core = 914 if = { limit = { country_exists = COL COL = { is_subject_of = ROOT all_owned_state = { OR = { state = 870 state = 871 state = 872 state = 873 state = 911 state = 912 state = 913 state = 914 } } } } COL = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = COL transfer_troops = yes } } if = { limit = { NOT = { owns_state = 870 } } transfer_state = 870 } if = { limit = { NOT = { owns_state = 871 } } transfer_state = 871 } if = { limit = { NOT = { owns_state = 872 } } transfer_state = 872 } if = { limit = { NOT = { owns_state = 873 } } transfer_state = 873 } if = { limit = { NOT = { owns_state = 911 } } transfer_state = 911 } if = { limit = { NOT = { owns_state = 912 } } transfer_state = 912 } if = { limit = { NOT = { owns_state = 913 } } transfer_state = 913 } if = { limit = { NOT = { owns_state = 914 } } transfer_state = 914 } if = { limit = { NOT = { has_country_flag = is_GCL } } set_country_flag = is_GCL set_global_flag = GCL_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_COL } } #VEN GCL_integrate_VEN = { icon = GFX_decision_generic_form_nation cost = 400 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 3 } } check_variable = { var = formable_committed_size value = 18 compare = greater_than_or_equals } } } allowed = { NOT = { tag = VEN } } visible = { has_country_flag = is_GCL NOT = { has_country_flag = integrated_VEN } } highlight_states = { highlight_state_targets = { state = 874 state = 875 state = 876 state = 915 state = 916 state = 917 } } available = { custom_trigger_tooltip = { tooltip = GCL_integrate_VEN_tt 874 = { state_owned_or_puppet_owned_by_root = yes } 875 = { state_owned_or_puppet_owned_by_root = yes } 876 = { state_owned_or_puppet_owned_by_root = yes } 915 = { state_owned_or_puppet_owned_by_root = yes } 916 = { state_owned_or_puppet_owned_by_root = yes } 917 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision GCL_integrate_VEN" add_state_core = 874 add_state_core = 875 add_state_core = 876 add_state_core = 915 add_state_core = 916 add_state_core = 917 if = { limit = { country_exists = VEN VEN = { is_subject_of = ROOT all_owned_state = { OR = { state = 874 state = 875 state = 876 state = 915 state = 916 state = 917 } } } } VEN = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = VEN transfer_troops = yes } } if = { limit = { NOT = { owns_state = 874 } } transfer_state = 874 } if = { limit = { NOT = { owns_state = 875 } } transfer_state = 875 } if = { limit = { NOT = { owns_state = 876 } } transfer_state = 876 } if = { limit = { NOT = { owns_state = 915 } } transfer_state = 915 } if = { limit = { NOT = { owns_state = 916 } } transfer_state = 916 } if = { limit = { NOT = { owns_state = 917 } } transfer_state = 917 } if = { limit = { NOT = { has_country_flag = is_GCL } } set_country_flag = is_GCL set_global_flag = GCL_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_VEN } } #ECU GCL_integrate_ECU = { icon = GFX_decision_generic_form_nation cost = 200 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 3 } } check_variable = { var = formable_committed_size value = 18 compare = greater_than_or_equals } } } allowed = { NOT = { tag = ECU } } visible = { has_country_flag = is_GCL NOT = { has_country_flag = integrated_ECU } } highlight_states = { highlight_state_targets = { state = 905 state = 906 state = 907 state = 908 } } available = { custom_trigger_tooltip = { tooltip = GCL_integrate_ECU_tt 905 = { state_owned_or_puppet_owned_by_root = yes } 906 = { state_owned_or_puppet_owned_by_root = yes } 907 = { state_owned_or_puppet_owned_by_root = yes } 908 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision GCL_integrate_ECU" add_state_core = 905 add_state_core = 906 add_state_core = 907 add_state_core = 908 if = { limit = { country_exists = ECU ECU = { is_subject_of = ROOT all_owned_state = { OR = { state = 905 state = 906 state = 907 state = 908 } } } } ECU = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = ECU transfer_troops = yes } } if = { limit = { NOT = { owns_state = 905 } } transfer_state = 905 } if = { limit = { NOT = { owns_state = 906 } } transfer_state = 906 } if = { limit = { NOT = { owns_state = 907 } } transfer_state = 907 } if = { limit = { NOT = { owns_state = 908 } } transfer_state = 908 } if = { limit = { NOT = { has_country_flag = is_GCL } } set_country_flag = is_GCL set_global_flag = GCL_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_ECU } } ### Cosmetic ### GCL_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 3 } } check_variable = { var = formable_committed_size value = 18 compare = greater_than_or_equals } } } visible = { has_country_flag = is_GCL NOT = { has_cosmetic_tag = GCL } } highlight_states = { highlight_state_targets = { state = 870 state = 871 state = 872 state = 873 state = 874 state = 875 state = 876 state = 905 state = 906 state = 907 state = 908 state = 911 state = 912 state = 913 state = 914 state = 915 state = 916 state = 917 } } available = { custom_trigger_tooltip = { tooltip = GCL_update_flag_tt count_triggers = { amount = 14 870 = { is_core_of = ROOT } 871 = { is_core_of = ROOT } 872 = { is_core_of = ROOT } 873 = { is_core_of = ROOT } 874 = { is_core_of = ROOT } 875 = { is_core_of = ROOT } 876 = { is_core_of = ROOT } 905 = { is_core_of = ROOT } 906 = { is_core_of = ROOT } 907 = { is_core_of = ROOT } 908 = { is_core_of = ROOT } 911 = { is_core_of = ROOT } 912 = { is_core_of = ROOT } 913 = { is_core_of = ROOT } 914 = { is_core_of = ROOT } 915 = { is_core_of = ROOT } 916 = { is_core_of = ROOT } 917 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision GCL_update_flag" set_cosmetic_tag = GCL remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 3 } set_variable = { formable_committed_size = 18 } } } } # Post-formation purchase of unowned cores GCL_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 3 } } check_variable = { var = formable_committed_size value = 18 compare = greater_than_or_equals } } } visible = { has_country_flag = is_GCL } target_root_trigger = { has_country_flag = is_GCL } target_array = global.GCL_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision GCL_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel GCL_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove GCL_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } } #Scandinavia form_SCA_category = { ### Integrate ### # Start integrate SCA_integrate_start = { icon = GFX_decision_generic_form_nation ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 4 } } check_variable = { var = formable_committed_size value = 27 compare = greater_than_or_equals } } } visible = { NOT = { has_country_flag = is_SCA } } highlight_states = { highlight_states_trigger = { OR = { is_core_of = SWE is_core_of = NRY is_core_of = DEN is_core_of = FIN is_core_of = ICE is_core_of = GRN } } } available = { custom_trigger_tooltip = { tooltip = SCA_integrate_trigger_tt count_triggers = { amount = 22 1 = { state_owned_or_puppet_owned_by_root = yes } 2 = { state_owned_or_puppet_owned_by_root = yes } 3 = { state_owned_or_puppet_owned_by_root = yes } 4 = { state_owned_or_puppet_owned_by_root = yes } 5 = { state_owned_or_puppet_owned_by_root = yes } 6 = { state_owned_or_puppet_owned_by_root = yes } 7 = { state_owned_or_puppet_owned_by_root = yes } 30 = { state_owned_or_puppet_owned_by_root = yes } 31 = { state_owned_or_puppet_owned_by_root = yes } 32 = { state_owned_or_puppet_owned_by_root = yes } 33 = { state_owned_or_puppet_owned_by_root = yes } 34 = { state_owned_or_puppet_owned_by_root = yes } 35 = { state_owned_or_puppet_owned_by_root = yes } 36 = { state_owned_or_puppet_owned_by_root = yes } 100 = { state_owned_or_puppet_owned_by_root = yes } 101 = { state_owned_or_puppet_owned_by_root = yes } 102 = { state_owned_or_puppet_owned_by_root = yes } 103 = { state_owned_or_puppet_owned_by_root = yes } 104 = { state_owned_or_puppet_owned_by_root = yes } 439 = { state_owned_or_puppet_owned_by_root = yes } 442 = { state_owned_or_puppet_owned_by_root = yes } 542 = { state_owned_or_puppet_owned_by_root = yes } 550 = { state_owned_or_puppet_owned_by_root = yes } 881 = { state_owned_or_puppet_owned_by_root = yes } 1161 = { state_owned_or_puppet_owned_by_root = yes } 1162 = { state_owned_or_puppet_owned_by_root = yes } 1240 = { state_owned_or_puppet_owned_by_root = yes } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision SCA_integrate_start" if = { limit = { NOT = { has_country_flag = is_SCA } } set_country_flag = is_SCA set_global_flag = SCA_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_@ROOT custom_effect_tooltip = SCA_start_integrate_tt custom_effect_tooltip = general_integrate_tt add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 4 } set_variable = { formable_committed_size = 27 } } } } #SWE SCA_integrate_SWE = { icon = GFX_decision_generic_form_nation cost = 500 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 4 } } check_variable = { var = formable_committed_size value = 27 compare = greater_than_or_equals } } } allowed = { NOT = { tag = SWE } } visible = { has_country_flag = is_SCA NOT = { has_country_flag = integrated_SWE } } highlight_states = { highlight_state_targets = { state = 33 state = 34 state = 35 state = 36 state = 439 state = 442 state = 550 state = 881 } } available = { custom_trigger_tooltip = { tooltip = SCA_integrate_SWE_tt 33 = { state_owned_or_puppet_owned_by_root = yes } 34 = { state_owned_or_puppet_owned_by_root = yes } 35 = { state_owned_or_puppet_owned_by_root = yes } 36 = { state_owned_or_puppet_owned_by_root = yes } 439 = { state_owned_or_puppet_owned_by_root = yes } 442 = { state_owned_or_puppet_owned_by_root = yes } 550 = { state_owned_or_puppet_owned_by_root = yes } 881 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SCA_integrate_SWE" add_state_core = 33 add_state_core = 34 add_state_core = 35 add_state_core = 36 add_state_core = 439 add_state_core = 442 add_state_core = 550 add_state_core = 881 if = { limit = { country_exists = SWE SWE = { is_subject_of = ROOT all_owned_state = { OR = { state = 33 state = 34 state = 35 state = 36 state = 439 state = 442 state = 550 state = 881 } } } } SWE = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = SWE transfer_troops = yes } } if = { limit = { NOT = { owns_state = 33 } } transfer_state = 33 } if = { limit = { NOT = { owns_state = 34 } } transfer_state = 34 } if = { limit = { NOT = { owns_state = 35 } } transfer_state = 35 } if = { limit = { NOT = { owns_state = 36 } } transfer_state = 36 } if = { limit = { NOT = { owns_state = 439 } } transfer_state = 439 } if = { limit = { NOT = { owns_state = 442 } } transfer_state = 442 } if = { limit = { NOT = { owns_state = 550 } } transfer_state = 550 } if = { limit = { NOT = { owns_state = 881 } } transfer_state = 881 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_SWE } } #NRY SCA_integrate_NOR = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 4 } } check_variable = { var = formable_committed_size value = 27 compare = greater_than_or_equals } } } allowed = { NOT = { tag = NRY } } visible = { has_country_flag = is_SCA NOT = { has_country_flag = integrated_NOR } } highlight_states = { highlight_state_targets = { state = 30 state = 31 state = 32 state = 542 } } available = { custom_trigger_tooltip = { tooltip = SCA_integrate_NRY_tt 30 = { state_owned_or_puppet_owned_by_root = yes } 31 = { state_owned_or_puppet_owned_by_root = yes } 32 = { state_owned_or_puppet_owned_by_root = yes } 542 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SCA_integrate_NOR" add_state_core = 30 add_state_core = 31 add_state_core = 32 add_state_core = 542 if = { limit = { country_exists = NRY NRY = { is_subject_of = ROOT all_owned_state = { OR = { state = 30 state = 31 state = 32 state = 542 } } } } NRY = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = NRY transfer_troops = yes } } if = { limit = { NOT = { owns_state = 30 } } transfer_state = 30 } if = { limit = { NOT = { owns_state = 31 } } transfer_state = 31 } if = { limit = { NOT = { owns_state = 32 } } transfer_state = 32 } if = { limit = { NOT = { owns_state = 542 } } transfer_state = 542 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_NOR } } #DEN SCA_integrate_DEN = { icon = GFX_decision_generic_form_nation cost = 400 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 4 } } check_variable = { var = formable_committed_size value = 27 compare = greater_than_or_equals } } } allowed = { NOT = { tag = DEN } } visible = { has_country_flag = is_SCA NOT = { has_country_flag = integrated_DEN } } highlight_states = { highlight_state_targets = { state = 1 state = 2 state = 3 state = 4 state = 5 state = 6 state = 1161 state = 1162 state = 1240 } } available = { custom_trigger_tooltip = { tooltip = SCA_integrate_DEN_tt 1 = { state_owned_or_puppet_owned_by_root = yes } 2 = { state_owned_or_puppet_owned_by_root = yes } 3 = { state_owned_or_puppet_owned_by_root = yes } 4 = { state_owned_or_puppet_owned_by_root = yes } 5 = { state_owned_or_puppet_owned_by_root = yes } 6 = { state_owned_or_puppet_owned_by_root = yes } 1161 = { state_owned_or_puppet_owned_by_root = yes } 1162 = { state_owned_or_puppet_owned_by_root = yes } 1240 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SCA_integrate_DEN" add_state_core = 1 add_state_core = 2 add_state_core = 3 add_state_core = 4 add_state_core = 5 add_state_core = 6 add_state_core = 1161 add_state_core = 1162 add_state_core = 1240 if = { limit = { country_exists = DEN DEN = { is_subject_of = ROOT all_owned_state = { OR = { state = 1 state = 2 state = 3 state = 4 state = 5 state = 6 state = 1161 state = 1162 state = 1240 } } } } DEN = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = DEN transfer_troops = yes } } if = { limit = { NOT = { owns_state = 1 } } transfer_state = 1 } if = { limit = { NOT = { owns_state = 2 } } transfer_state = 2 } if = { limit = { NOT = { owns_state = 3 } } transfer_state = 3 } if = { limit = { NOT = { owns_state = 4 } } transfer_state = 4 } if = { limit = { NOT = { owns_state = 5 } } transfer_state = 5 } if = { limit = { NOT = { owns_state = 6 } } transfer_state = 6 } if = { limit = { NOT = { owns_state = 1161 } } transfer_state = 1161 } if = { limit = { NOT = { owns_state = 1162 } } transfer_state = 1162 } if = { limit = { NOT = { owns_state = 1240 } } transfer_state = 1240 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_DEN } } #FIN SCA_integrate_FIN = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 4 } } check_variable = { var = formable_committed_size value = 27 compare = greater_than_or_equals } } } allowed = { NOT = { tag = FIN } } visible = { has_country_flag = is_SCA NOT = { has_country_flag = integrated_FIN } } highlight_states = { highlight_state_targets = { state = 100 state = 101 state = 102 state = 103 state = 104 } } available = { custom_trigger_tooltip = { tooltip = SCA_integrate_FIN_tt 100 = { state_owned_or_puppet_owned_by_root = yes } 101 = { state_owned_or_puppet_owned_by_root = yes } 102 = { state_owned_or_puppet_owned_by_root = yes } 103 = { state_owned_or_puppet_owned_by_root = yes } 104 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SCA_integrate_FIN" add_state_core = 100 add_state_core = 101 add_state_core = 102 add_state_core = 103 add_state_core = 104 if = { limit = { country_exists = FIN FIN = { is_subject_of = ROOT all_owned_state = { OR = { state = 100 state = 101 state = 102 state = 103 state = 104 } } } } FIN = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = FIN transfer_troops = yes } } if = { limit = { NOT = { owns_state = 100 } } transfer_state = 100 } if = { limit = { NOT = { owns_state = 101 } } transfer_state = 101 } if = { limit = { NOT = { owns_state = 102 } } transfer_state = 102 } if = { limit = { NOT = { owns_state = 103 } } transfer_state = 103 } if = { limit = { NOT = { owns_state = 104 } } transfer_state = 104 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_FIN } } #ICE SCA_integrate_ICE = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 4 } } check_variable = { var = formable_committed_size value = 27 compare = greater_than_or_equals } } } allowed = { NOT = { tag = ICE } } visible = { has_country_flag = is_SCA NOT = { has_country_flag = integrated_ICE } } highlight_states = { highlight_state_targets = { state = 7 } } available = { custom_trigger_tooltip = { tooltip = SCA_integrate_ICE_tt 7 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SCA_integrate_ICE" add_state_core = 7 if = { limit = { country_exists = ICE ICE = { is_subject_of = ROOT all_owned_state = { state = 7 } } } ICE = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = ICE transfer_troops = yes } } if = { limit = { NOT = { owns_state = 7 } } transfer_state = 7 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_ICE } } #GRN SCA_integrate_GRN = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 4 } } check_variable = { var = formable_committed_size value = 27 compare = greater_than_or_equals } } } allowed = { NOT = { tag = GRN } } visible = { has_country_flag = is_SCA NOT = { has_country_flag = integrated_GRN } } highlight_states = { highlight_state_targets = { state = 1 state = 1161 state = 1162 state = 1240 } } available = { custom_trigger_tooltip = { tooltip = SCA_integrate_GRN_tt 1 = { state_owned_or_puppet_owned_by_root = yes } 1161 = { state_owned_or_puppet_owned_by_root = yes } 1162 = { state_owned_or_puppet_owned_by_root = yes } 1240 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SCA_integrate_GRN" add_state_core = 1 add_state_core = 1161 add_state_core = 1162 add_state_core = 1240 if = { limit = { country_exists = GRN GRN = { is_subject_of = ROOT all_owned_state = { OR = { state = 1 state = 1161 state = 1162 state = 1240 } } } } GRN = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = GRN transfer_troops = yes } } if = { limit = { NOT = { owns_state = 1 } } transfer_state = 1 } if = { limit = { NOT = { owns_state = 1161 } } transfer_state = 1161 } if = { limit = { NOT = { owns_state = 1162 } } transfer_state = 1162 } if = { limit = { NOT = { owns_state = 1240 } } transfer_state = 1240 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_GRN } } ### Cosmetic ### SCA_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 4 } } check_variable = { var = formable_committed_size value = 27 compare = greater_than_or_equals } } } visible = { has_country_flag = is_SCA NOT = { has_cosmetic_tag = SCA } } highlight_states = { highlight_state_targets = { state = 1 state = 2 state = 3 state = 4 state = 5 state = 6 state = 7 state = 30 state = 31 state = 32 state = 33 state = 34 state = 35 state = 36 state = 100 state = 101 state = 102 state = 103 state = 104 state = 439 state = 442 state = 542 state = 550 state = 881 state = 1161 state = 1162 state = 1240 } } available = { custom_trigger_tooltip = { tooltip = SCA_update_flag_tt count_triggers = { amount = 22 1 = { is_core_of = ROOT } 2 = { is_core_of = ROOT } 3 = { is_core_of = ROOT } 4 = { is_core_of = ROOT } 5 = { is_core_of = ROOT } 6 = { is_core_of = ROOT } 7 = { is_core_of = ROOT } 30 = { is_core_of = ROOT } 31 = { is_core_of = ROOT } 32 = { is_core_of = ROOT } 33 = { is_core_of = ROOT } 34 = { is_core_of = ROOT } 35 = { is_core_of = ROOT } 36 = { is_core_of = ROOT } 100 = { is_core_of = ROOT } 101 = { is_core_of = ROOT } 102 = { is_core_of = ROOT } 103 = { is_core_of = ROOT } 104 = { is_core_of = ROOT } 439 = { is_core_of = ROOT } 442 = { is_core_of = ROOT } 542 = { is_core_of = ROOT } 550 = { is_core_of = ROOT } 881 = { is_core_of = ROOT } 1161 = { is_core_of = ROOT } 1162 = { is_core_of = ROOT } 1240 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision SCA_update_flag" set_cosmetic_tag = SCA remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 4 } set_variable = { formable_committed_size = 27 } } } } # Post-formation purchase of unowned cores SCA_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 4 } } check_variable = { var = formable_committed_size value = 27 compare = greater_than_or_equals } } } visible = { has_country_flag = is_SCA } target_root_trigger = { has_country_flag = is_SCA } target_array = global.SCA_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision SCA_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel SCA_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove SCA_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } } #Iberia form_IBR_category = { ### Integrate ### # SPR IBR_integrate_SPR = { icon = GFX_decision_generic_form_nation cost = 550 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 5 } } check_variable = { var = formable_committed_size value = 24 compare = greater_than_or_equals } } } allowed = { NOT = { tag = SPR } } visible = { NOT = { has_country_flag = integrated_SPR } } highlight_states = { highlight_state_targets = { state = 86 state = 87 state = 88 state = 89 state = 90 state = 91 state = 92 state = 93 state = 94 state = 95 state = 968 state = 969 state = 970 state = 971 state = 1040 state = 1041 state = 1042 } } available = { custom_trigger_tooltip = { tooltip = IBR_integrate_SPR_tt 86 = { state_owned_or_puppet_owned_by_root = yes } 87 = { state_owned_or_puppet_owned_by_root = yes } 88 = { state_owned_or_puppet_owned_by_root = yes } 89 = { state_owned_or_puppet_owned_by_root = yes } 90 = { state_owned_or_puppet_owned_by_root = yes } 91 = { state_owned_or_puppet_owned_by_root = yes } 92 = { state_owned_or_puppet_owned_by_root = yes } 93 = { state_owned_or_puppet_owned_by_root = yes } 94 = { state_owned_or_puppet_owned_by_root = yes } 95 = { state_owned_or_puppet_owned_by_root = yes } 968 = { state_owned_or_puppet_owned_by_root = yes } 969 = { state_owned_or_puppet_owned_by_root = yes } 970 = { state_owned_or_puppet_owned_by_root = yes } 971 = { state_owned_or_puppet_owned_by_root = yes } 1040 = { state_owned_or_puppet_owned_by_root = yes } 1041 = { state_owned_or_puppet_owned_by_root = yes } 1042 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision IBR_integrate_SPR" add_state_core = 86 add_state_core = 87 add_state_core = 88 add_state_core = 89 add_state_core = 90 add_state_core = 91 add_state_core = 92 add_state_core = 93 add_state_core = 94 add_state_core = 95 add_state_core = 968 add_state_core = 969 add_state_core = 970 add_state_core = 971 add_state_core = 1040 add_state_core = 1041 add_state_core = 1042 if = { limit = { country_exists = SPR SPR = { is_subject_of = ROOT all_owned_state = { OR = { state = 86 state = 87 state = 88 state = 89 state = 90 state = 91 state = 92 state = 93 state = 94 state = 95 state = 968 state = 969 state = 970 state = 971 state = 1040 state = 1041 state = 1042 } } } } SPR = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = SPR transfer_troops = yes } } if = { limit = { NOT = { owns_state = 86 } } transfer_state = 86 } if = { limit = { NOT = { owns_state = 87 } } transfer_state = 87 } if = { limit = { NOT = { owns_state = 88 } } transfer_state = 88 } if = { limit = { NOT = { owns_state = 89 } } transfer_state = 89 } if = { limit = { NOT = { owns_state = 90 } } transfer_state = 90 } if = { limit = { NOT = { owns_state = 91 } } transfer_state = 91 } if = { limit = { NOT = { owns_state = 92 } } transfer_state = 92 } if = { limit = { NOT = { owns_state = 93 } } transfer_state = 93 } if = { limit = { NOT = { owns_state = 94 } } transfer_state = 94 } if = { limit = { NOT = { owns_state = 95 } } transfer_state = 95 } if = { limit = { NOT = { owns_state = 968 } } transfer_state = 968 } if = { limit = { NOT = { owns_state = 969 } } transfer_state = 969 } if = { limit = { NOT = { owns_state = 970 } } transfer_state = 970 } if = { limit = { NOT = { owns_state = 971 } } transfer_state = 971 } if = { limit = { NOT = { owns_state = 1040 } } transfer_state = 1040 } if = { limit = { NOT = { owns_state = 1041 } } transfer_state = 1041 } if = { limit = { NOT = { owns_state = 1042 } } transfer_state = 1042 } if = { limit = { NOT = { has_country_flag = is_IBR } } set_country_flag = is_IBR set_global_flag = IBR_exists add_ideas = reshaping_national_identity clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_SPR # Delayed remove_effect must not downgrade a commitment made during the timer hidden_effect = { if = { limit = { check_variable = { var = formable_committed_size value = 24 compare = less_than } } set_variable = { formable_committed_id = 5 } set_variable = { formable_committed_size = 24 } } } } } # POR IBR_integrate_POR = { icon = GFX_decision_generic_form_nation cost = 400 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 5 } } check_variable = { var = formable_committed_size value = 24 compare = greater_than_or_equals } } } allowed = { NOT = { tag = POR } } visible = { NOT = { has_country_flag = integrated_POR } } highlight_states = { highlight_state_targets = { state = 96 state = 97 state = 98 state = 99 state = 1055 state = 1056 state = 1057 } } available = { custom_trigger_tooltip = { tooltip = IBR_integrate_POR_tt 96 = { state_owned_or_puppet_owned_by_root = yes } 97 = { state_owned_or_puppet_owned_by_root = yes } 98 = { state_owned_or_puppet_owned_by_root = yes } 99 = { state_owned_or_puppet_owned_by_root = yes } 1055 = { state_owned_or_puppet_owned_by_root = yes } 1056 = { state_owned_or_puppet_owned_by_root = yes } 1057 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision IBR_integrate_POR" add_state_core = 96 add_state_core = 97 add_state_core = 98 add_state_core = 99 add_state_core = 1055 add_state_core = 1056 add_state_core = 1057 if = { limit = { country_exists = POR POR = { is_subject_of = ROOT all_owned_state = { OR = { state = 96 state = 97 state = 98 state = 99 state = 1055 state = 1056 state = 1057 } } } } POR = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = POR transfer_troops = yes } } if = { limit = { NOT = { owns_state = 96 } } transfer_state = 96 } if = { limit = { NOT = { owns_state = 97 } } transfer_state = 97 } if = { limit = { NOT = { owns_state = 98 } } transfer_state = 98 } if = { limit = { NOT = { owns_state = 99 } } transfer_state = 99 } if = { limit = { NOT = { owns_state = 1055 } } transfer_state = 1055 } if = { limit = { NOT = { owns_state = 1056 } } transfer_state = 1056 } if = { limit = { NOT = { owns_state = 1057 } } transfer_state = 1057 } if = { limit = { NOT = { has_country_flag = is_IBR } } set_country_flag = is_IBR set_global_flag = IBR_exists add_ideas = reshaping_national_identity clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_POR # Delayed remove_effect must not downgrade a commitment made during the timer hidden_effect = { if = { limit = { check_variable = { var = formable_committed_size value = 24 compare = less_than } } set_variable = { formable_committed_id = 5 } set_variable = { formable_committed_size = 24 } } } } } ### Cosmetic ### IBR_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 5 } } check_variable = { var = formable_committed_size value = 24 compare = greater_than_or_equals } } } visible = { has_country_flag = is_IBR NOT = { has_cosmetic_tag = IBR } } highlight_states = { highlight_state_targets = { state = 86 state = 87 state = 88 state = 89 state = 90 state = 91 state = 92 state = 93 state = 94 state = 95 state = 968 state = 969 state = 970 state = 971 state = 1040 state = 1041 state = 1042 state = 96 state = 97 state = 98 state = 99 state = 1055 state = 1056 state = 1057 } } available = { custom_trigger_tooltip = { tooltip = IBR_update_flag_tt count_triggers = { amount = 19 86 = { is_core_of = ROOT } 87 = { is_core_of = ROOT } 88 = { is_core_of = ROOT } 89 = { is_core_of = ROOT } 90 = { is_core_of = ROOT } 91 = { is_core_of = ROOT } 92 = { is_core_of = ROOT } 93 = { is_core_of = ROOT } 94 = { is_core_of = ROOT } 95 = { is_core_of = ROOT } 968 = { is_core_of = ROOT } 969 = { is_core_of = ROOT } 970 = { is_core_of = ROOT } 971 = { is_core_of = ROOT } 1040 = { is_core_of = ROOT } 1041 = { is_core_of = ROOT } 1042 = { is_core_of = ROOT } 96 = { is_core_of = ROOT } 97 = { is_core_of = ROOT } 98 = { is_core_of = ROOT } 99 = { is_core_of = ROOT } 1055 = { is_core_of = ROOT } 1056 = { is_core_of = ROOT } 1057 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision IBR_update_flag" set_cosmetic_tag = IBR remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 5 } set_variable = { formable_committed_size = 24 } } } } } form_ANZ_category = { ### Integrate (ANZ) ### #AST ANZ_integrate_AST = { icon = GFX_decision_generic_form_nation cost = 500 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 6 } } check_variable = { var = formable_committed_size value = 16 compare = greater_than_or_equals } # A CANZUK commitment stranded by the EU guard must not also block its fallback formables NOT = { AND = { check_variable = { formable_committed_id = 15 } OR = { has_global_flag = european_federation has_idea = EU_member } } } } } allowed = { NOT = { tag = AST } } visible = { NOT = { has_country_flag = integrated_AST } } highlight_states = { highlight_state_targets = { state = 741 state = 742 state = 743 state = 744 state = 745 state = 746 state = 747 state = 748 state = 749 state = 1219 state = 1221 } } available = { custom_trigger_tooltip = { tooltip = ANZ_integrate_AST_tt 741 = { state_owned_or_puppet_owned_by_root = yes } 742 = { state_owned_or_puppet_owned_by_root = yes } 743 = { state_owned_or_puppet_owned_by_root = yes } 744 = { state_owned_or_puppet_owned_by_root = yes } 745 = { state_owned_or_puppet_owned_by_root = yes } 746 = { state_owned_or_puppet_owned_by_root = yes } 747 = { state_owned_or_puppet_owned_by_root = yes } 748 = { state_owned_or_puppet_owned_by_root = yes } 749 = { state_owned_or_puppet_owned_by_root = yes } 1219 = { state_owned_or_puppet_owned_by_root = yes } 1221 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision ANZ_integrate_AST" add_state_core = 741 add_state_core = 742 add_state_core = 743 add_state_core = 744 add_state_core = 745 add_state_core = 746 add_state_core = 747 add_state_core = 748 add_state_core = 749 add_state_core = 1219 add_state_core = 1221 if = { limit = { country_exists = AST AST = { is_subject_of = ROOT all_owned_state = { OR = { state = 741 state = 742 state = 743 state = 744 state = 745 state = 746 state = 747 state = 748 state = 749 state = 1219 state = 1221 } } } } AST = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = AST transfer_troops = yes } } if = { limit = { NOT = { owns_state = 741 } } transfer_state = 741 } if = { limit = { NOT = { owns_state = 742 } } transfer_state = 742 } if = { limit = { NOT = { owns_state = 743 } } transfer_state = 743 } if = { limit = { NOT = { owns_state = 744 } } transfer_state = 744 } if = { limit = { NOT = { owns_state = 745 } } transfer_state = 745 } if = { limit = { NOT = { owns_state = 746 } } transfer_state = 746 } if = { limit = { NOT = { owns_state = 747 } } transfer_state = 747 } if = { limit = { NOT = { owns_state = 748 } } transfer_state = 748 } if = { limit = { NOT = { owns_state = 749 } } transfer_state = 749 } if = { limit = { NOT = { owns_state = 1219 } } transfer_state = 1219 } if = { limit = { NOT = { owns_state = 1221 } } transfer_state = 1221 } if = { limit = { NOT = { has_country_flag = integrated_@ROOT } } set_country_flag = integrated_@ROOT } if = { limit = { NOT = { has_country_flag = is_ANZ } } set_country_flag = is_ANZ set_global_flag = ANZ_exists add_ideas = reshaping_national_identity } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_AST # Delayed remove_effect must not downgrade a commitment made during the timer hidden_effect = { if = { limit = { check_variable = { var = formable_committed_size value = 16 compare = less_than } } set_variable = { formable_committed_id = 6 } set_variable = { formable_committed_size = 16 } } } } } #NZL ANZ_integrate_NZL = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 6 } } check_variable = { var = formable_committed_size value = 16 compare = greater_than_or_equals } # A CANZUK commitment stranded by the EU guard must not also block its fallback formables NOT = { AND = { check_variable = { formable_committed_id = 15 } OR = { has_global_flag = european_federation has_idea = EU_member } } } } } allowed = { NOT = { tag = NZL } } visible = { NOT = { has_country_flag = integrated_NZL } } highlight_states = { highlight_state_targets = { state = 750 state = 751 state = 1217 state = 1218 state = 1220 } } available = { custom_trigger_tooltip = { tooltip = ANZ_integrate_NZL_tt 750 = { state_owned_or_puppet_owned_by_root = yes } 751 = { state_owned_or_puppet_owned_by_root = yes } 1217 = { state_owned_or_puppet_owned_by_root = yes } 1218 = { state_owned_or_puppet_owned_by_root = yes } 1220 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision ANZ_integrate_NZL" add_state_core = 750 add_state_core = 751 add_state_core = 1217 add_state_core = 1218 add_state_core = 1220 if = { limit = { country_exists = NZL NZL = { is_subject_of = ROOT all_owned_state = { OR = { state = 750 state = 751 state = 1217 state = 1218 state = 1220 } } } } NZL = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = NZL transfer_troops = yes } } if = { limit = { NOT = { owns_state = 750 } } transfer_state = 750 } if = { limit = { NOT = { owns_state = 751 } } transfer_state = 751 } if = { limit = { NOT = { owns_state = 1217 } } transfer_state = 1217 } if = { limit = { NOT = { owns_state = 1218 } } transfer_state = 1218 } if = { limit = { NOT = { owns_state = 1220 } } transfer_state = 1220 } if = { limit = { NOT = { has_country_flag = integrated_@ROOT } } set_country_flag = integrated_@ROOT } if = { limit = { NOT = { has_country_flag = is_ANZ } } set_country_flag = is_ANZ set_global_flag = ANZ_exists add_ideas = reshaping_national_identity } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_NZL # Delayed remove_effect must not downgrade a commitment made during the timer hidden_effect = { if = { limit = { check_variable = { var = formable_committed_size value = 16 compare = less_than } } set_variable = { formable_committed_id = 6 } set_variable = { formable_committed_size = 16 } } } } } ### Cosmetic ### ANZ_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 6 } } check_variable = { var = formable_committed_size value = 16 compare = greater_than_or_equals } # A CANZUK commitment stranded by the EU guard must not also block its fallback formables NOT = { AND = { check_variable = { formable_committed_id = 15 } OR = { has_global_flag = european_federation has_idea = EU_member } } } } } visible = { has_country_flag = is_ANZ NOT = { has_cosmetic_tag = ANZ } } highlight_states = { highlight_state_targets = { state = 741 state = 742 state = 743 state = 744 state = 745 state = 746 state = 747 state = 748 state = 749 state = 1219 state = 1221 state = 750 state = 751 state = 1217 state = 1218 state = 1220 } } available = { custom_trigger_tooltip = { tooltip = ANZ_update_flag_tt count_triggers = { amount = 13 741 = { is_core_of = ROOT } 742 = { is_core_of = ROOT } 743 = { is_core_of = ROOT } 744 = { is_core_of = ROOT } 745 = { is_core_of = ROOT } 746 = { is_core_of = ROOT } 747 = { is_core_of = ROOT } 748 = { is_core_of = ROOT } 749 = { is_core_of = ROOT } 1219 = { is_core_of = ROOT } 1221 = { is_core_of = ROOT } 750 = { is_core_of = ROOT } 751 = { is_core_of = ROOT } 1217 = { is_core_of = ROOT } 1218 = { is_core_of = ROOT } 1220 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision ANZ_update_flag" set_cosmetic_tag = ANZ remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 6 } set_variable = { formable_committed_size = 16 } } } } } form_SOU_category = { ### Integrate (SOU) ### # Start integrate SOU_integrate_start = { icon = GFX_decision_generic_form_nation visible = { NOT = { has_country_flag = is_SOU } } available = { custom_trigger_tooltip = { tooltip = SOU_integrate_trigger_tt count_triggers = { amount = 59 443 = { state_owned_or_puppet_owned_by_root = yes } 446 = { state_owned_or_puppet_owned_by_root = yes } 448 = { state_owned_or_puppet_owned_by_root = yes } 449 = { state_owned_or_puppet_owned_by_root = yes } 450 = { state_owned_or_puppet_owned_by_root = yes } 453 = { state_owned_or_puppet_owned_by_root = yes } 454 = { state_owned_or_puppet_owned_by_root = yes } 457 = { state_owned_or_puppet_owned_by_root = yes } 463 = { state_owned_or_puppet_owned_by_root = yes } 468 = { state_owned_or_puppet_owned_by_root = yes } 472 = { state_owned_or_puppet_owned_by_root = yes } 869 = { state_owned_or_puppet_owned_by_root = yes } 870 = { state_owned_or_puppet_owned_by_root = yes } 871 = { state_owned_or_puppet_owned_by_root = yes } 872 = { state_owned_or_puppet_owned_by_root = yes } 873 = { state_owned_or_puppet_owned_by_root = yes } 874 = { state_owned_or_puppet_owned_by_root = yes } 875 = { state_owned_or_puppet_owned_by_root = yes } 876 = { state_owned_or_puppet_owned_by_root = yes } 877 = { state_owned_or_puppet_owned_by_root = yes } 878 = { state_owned_or_puppet_owned_by_root = yes } 879 = { state_owned_or_puppet_owned_by_root = yes } 880 = { state_owned_or_puppet_owned_by_root = yes } 882 = { state_owned_or_puppet_owned_by_root = yes } 883 = { state_owned_or_puppet_owned_by_root = yes } 884 = { state_owned_or_puppet_owned_by_root = yes } 885 = { state_owned_or_puppet_owned_by_root = yes } 886 = { state_owned_or_puppet_owned_by_root = yes } 887 = { state_owned_or_puppet_owned_by_root = yes } 888 = { state_owned_or_puppet_owned_by_root = yes } 889 = { state_owned_or_puppet_owned_by_root = yes } 890 = { state_owned_or_puppet_owned_by_root = yes } 891 = { state_owned_or_puppet_owned_by_root = yes } 892 = { state_owned_or_puppet_owned_by_root = yes } 893 = { state_owned_or_puppet_owned_by_root = yes } 894 = { state_owned_or_puppet_owned_by_root = yes } 895 = { state_owned_or_puppet_owned_by_root = yes } 896 = { state_owned_or_puppet_owned_by_root = yes } 897 = { state_owned_or_puppet_owned_by_root = yes } 898 = { state_owned_or_puppet_owned_by_root = yes } 899 = { state_owned_or_puppet_owned_by_root = yes } 900 = { state_owned_or_puppet_owned_by_root = yes } 901 = { state_owned_or_puppet_owned_by_root = yes } 902 = { state_owned_or_puppet_owned_by_root = yes } 903 = { state_owned_or_puppet_owned_by_root = yes } 904 = { state_owned_or_puppet_owned_by_root = yes } 905 = { state_owned_or_puppet_owned_by_root = yes } 906 = { state_owned_or_puppet_owned_by_root = yes } 907 = { state_owned_or_puppet_owned_by_root = yes } 908 = { state_owned_or_puppet_owned_by_root = yes } 911 = { state_owned_or_puppet_owned_by_root = yes } 912 = { state_owned_or_puppet_owned_by_root = yes } 913 = { state_owned_or_puppet_owned_by_root = yes } 914 = { state_owned_or_puppet_owned_by_root = yes } 915 = { state_owned_or_puppet_owned_by_root = yes } 916 = { state_owned_or_puppet_owned_by_root = yes } 917 = { state_owned_or_puppet_owned_by_root = yes } 942 = { state_owned_or_puppet_owned_by_root = yes } 949 = { state_owned_or_puppet_owned_by_root = yes } 950 = { state_owned_or_puppet_owned_by_root = yes } 953 = { state_owned_or_puppet_owned_by_root = yes } 954 = { state_owned_or_puppet_owned_by_root = yes } 1005 = { state_owned_or_puppet_owned_by_root = yes } 1006 = { state_owned_or_puppet_owned_by_root = yes } 1021 = { state_owned_or_puppet_owned_by_root = yes } 1022 = { state_owned_or_puppet_owned_by_root = yes } 1023 = { state_owned_or_puppet_owned_by_root = yes } 1024 = { state_owned_or_puppet_owned_by_root = yes } 1025 = { state_owned_or_puppet_owned_by_root = yes } 1026 = { state_owned_or_puppet_owned_by_root = yes } 1027 = { state_owned_or_puppet_owned_by_root = yes } 1028 = { state_owned_or_puppet_owned_by_root = yes } 1029 = { state_owned_or_puppet_owned_by_root = yes } 1031 = { state_owned_or_puppet_owned_by_root = yes } } } } highlight_states = { highlight_states_trigger = { OR = { is_core_of = BRA is_core_of = PAR is_core_of = BOL is_core_of = PRU is_core_of = ECU is_core_of = SUR is_core_of = GUY is_core_of = VEN is_core_of = COL is_core_of = CHL is_core_of = URG is_core_of = ARG is_core_of = TRI } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision SOU_integrate_start" if = { limit = { NOT = { has_country_flag = is_SOU } } set_country_flag = is_SOU set_global_flag = SOU_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_@ROOT custom_effect_tooltip = SOU_start_integrate_tt custom_effect_tooltip = general_integrate_tt add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 7 } set_variable = { formable_committed_size = 74 } } } ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 7 } } check_variable = { var = formable_committed_size value = 74 compare = greater_than_or_equals } } } } #BRA SOU_integrate_BRA = { icon = GFX_decision_generic_form_nation cost = 500 days_remove = 500 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 7 } } check_variable = { var = formable_committed_size value = 74 compare = greater_than_or_equals } } } allowed = { NOT = { tag = BRA } } visible = { has_country_flag = is_SOU NOT = { has_country_flag = integrated_BRA } } highlight_states = { highlight_state_targets = { state = 879 state = 880 state = 882 state = 883 state = 884 state = 885 state = 886 state = 887 state = 888 state = 889 state = 890 state = 891 state = 892 state = 953 state = 954 state = 1021 state = 1022 state = 1023 state = 1024 state = 1025 state = 1026 state = 1027 state = 1028 state = 1029 state = 1031 } } available = { custom_trigger_tooltip = { tooltip = SOU_integrate_BRA_tt 879 = { state_owned_or_puppet_owned_by_root = yes } 880 = { state_owned_or_puppet_owned_by_root = yes } 882 = { state_owned_or_puppet_owned_by_root = yes } 883 = { state_owned_or_puppet_owned_by_root = yes } 884 = { state_owned_or_puppet_owned_by_root = yes } 885 = { state_owned_or_puppet_owned_by_root = yes } 886 = { state_owned_or_puppet_owned_by_root = yes } 887 = { state_owned_or_puppet_owned_by_root = yes } 888 = { state_owned_or_puppet_owned_by_root = yes } 889 = { state_owned_or_puppet_owned_by_root = yes } 890 = { state_owned_or_puppet_owned_by_root = yes } 891 = { state_owned_or_puppet_owned_by_root = yes } 892 = { state_owned_or_puppet_owned_by_root = yes } 953 = { state_owned_or_puppet_owned_by_root = yes } 954 = { state_owned_or_puppet_owned_by_root = yes } 1021 = { state_owned_or_puppet_owned_by_root = yes } 1022 = { state_owned_or_puppet_owned_by_root = yes } 1023 = { state_owned_or_puppet_owned_by_root = yes } 1024 = { state_owned_or_puppet_owned_by_root = yes } 1025 = { state_owned_or_puppet_owned_by_root = yes } 1026 = { state_owned_or_puppet_owned_by_root = yes } 1027 = { state_owned_or_puppet_owned_by_root = yes } 1028 = { state_owned_or_puppet_owned_by_root = yes } 1029 = { state_owned_or_puppet_owned_by_root = yes } 1031 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SOU_integrate_BRA" add_state_core = 879 add_state_core = 880 add_state_core = 882 add_state_core = 883 add_state_core = 884 add_state_core = 885 add_state_core = 886 add_state_core = 887 add_state_core = 888 add_state_core = 889 add_state_core = 890 add_state_core = 891 add_state_core = 892 add_state_core = 953 add_state_core = 954 add_state_core = 1021 add_state_core = 1022 add_state_core = 1023 add_state_core = 1024 add_state_core = 1025 add_state_core = 1026 add_state_core = 1027 add_state_core = 1028 add_state_core = 1029 add_state_core = 1031 hidden_effect = { if = { limit = { country_exists = BRA BRA = { is_subject_of = ROOT all_owned_state = { OR = { state = 879 state = 880 state = 882 state = 883 state = 884 state = 885 state = 886 state = 887 state = 888 state = 889 state = 890 state = 891 state = 892 state = 953 state = 954 state = 1021 state = 1022 state = 1023 state = 1024 state = 1025 state = 1026 state = 1027 state = 1028 state = 1029 state = 1031 } } } } BRA = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = BRA transfer_troops = yes } } if = { limit = { NOT = { owns_state = 879 } } transfer_state = 879 } if = { limit = { NOT = { owns_state = 880 } } transfer_state = 880 } if = { limit = { NOT = { owns_state = 882 } } transfer_state = 882 } if = { limit = { NOT = { owns_state = 883 } } transfer_state = 883 } if = { limit = { NOT = { owns_state = 884 } } transfer_state = 884 } if = { limit = { NOT = { owns_state = 885 } } transfer_state = 885 } if = { limit = { NOT = { owns_state = 886 } } transfer_state = 886 } if = { limit = { NOT = { owns_state = 887 } } transfer_state = 887 } if = { limit = { NOT = { owns_state = 888 } } transfer_state = 888 } if = { limit = { NOT = { owns_state = 889 } } transfer_state = 889 } if = { limit = { NOT = { owns_state = 890 } } transfer_state = 890 } if = { limit = { NOT = { owns_state = 891 } } transfer_state = 891 } if = { limit = { NOT = { owns_state = 892 } } transfer_state = 892 } if = { limit = { NOT = { owns_state = 953 } } transfer_state = 953 } if = { limit = { NOT = { owns_state = 954 } } transfer_state = 954 } if = { limit = { NOT = { owns_state = 1021 } } transfer_state = 1021 } if = { limit = { NOT = { owns_state = 1022 } } transfer_state = 1022 } if = { limit = { NOT = { owns_state = 1023 } } transfer_state = 1023 } if = { limit = { NOT = { owns_state = 1024 } } transfer_state = 1024 } if = { limit = { NOT = { owns_state = 1025 } } transfer_state = 1025 } if = { limit = { NOT = { owns_state = 1026 } } transfer_state = 1026 } if = { limit = { NOT = { owns_state = 1027 } } transfer_state = 1027 } if = { limit = { NOT = { owns_state = 1028 } } transfer_state = 1028 } if = { limit = { NOT = { owns_state = 1029 } } transfer_state = 1029 } if = { limit = { NOT = { owns_state = 1031 } } transfer_state = 1031 } } custom_effect_tooltip = BRA_integrate_tt clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_BRA } } #PAR SOU_integrate_PAR = { icon = GFX_decision_generic_form_nation cost = 200 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 7 } } check_variable = { var = formable_committed_size value = 74 compare = greater_than_or_equals } } } allowed = { NOT = { tag = PAR } } visible = { has_country_flag = is_SOU NOT = { has_country_flag = integrated_PAR } } highlight_states = { highlight_state_targets = { state = 895 state = 896 } } available = { custom_trigger_tooltip = { tooltip = SOU_integrate_PAR_tt 895 = { state_owned_or_puppet_owned_by_root = yes } 896 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SOU_integrate_PAR" add_state_core = 895 add_state_core = 896 if = { limit = { country_exists = PAR PAR = { is_subject_of = ROOT all_owned_state = { OR = { state = 895 state = 896 } } } } PAR = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = PAR transfer_troops = yes } } if = { limit = { NOT = { owns_state = 895 } } transfer_state = 895 } if = { limit = { NOT = { owns_state = 896 } } transfer_state = 896 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_PAR } } #BOL SOU_integrate_BOL = { icon = GFX_decision_generic_form_nation cost = 250 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 7 } } check_variable = { var = formable_committed_size value = 74 compare = greater_than_or_equals } } } allowed = { NOT = { tag = BOL } } visible = { has_country_flag = is_SOU NOT = { has_country_flag = integrated_BOL } } highlight_states = { highlight_state_targets = { state = 897 state = 898 state = 899 } } available = { custom_trigger_tooltip = { tooltip = SOU_integrate_BOL_tt 897 = { state_owned_or_puppet_owned_by_root = yes } 898 = { state_owned_or_puppet_owned_by_root = yes } 899 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SOU_integrate_BOL" add_state_core = 897 add_state_core = 898 add_state_core = 899 if = { limit = { country_exists = BOL BOL = { is_subject_of = ROOT all_owned_state = { OR = { state = 897 state = 898 state = 899 } } } } BOL = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = BOL transfer_troops = yes } } if = { limit = { NOT = { owns_state = 897 } } transfer_state = 897 } if = { limit = { NOT = { owns_state = 898 } } transfer_state = 898 } if = { limit = { NOT = { owns_state = 899 } } transfer_state = 899 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_BOL } } #PRU SOU_integrate_PRU = { icon = GFX_decision_generic_form_nation cost = 400 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 7 } } check_variable = { var = formable_committed_size value = 74 compare = greater_than_or_equals } } } allowed = { NOT = { tag = PRU } } visible = { has_country_flag = is_SOU NOT = { has_country_flag = integrated_PRU } } highlight_states = { highlight_state_targets = { state = 900 state = 901 state = 902 state = 903 state = 904 } } available = { custom_trigger_tooltip = { tooltip = SOU_integrate_PRU_tt 900 = { state_owned_or_puppet_owned_by_root = yes } 901 = { state_owned_or_puppet_owned_by_root = yes } 902 = { state_owned_or_puppet_owned_by_root = yes } 903 = { state_owned_or_puppet_owned_by_root = yes } 904 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SOU_integrate_PRU" add_state_core = 900 add_state_core = 901 add_state_core = 902 add_state_core = 903 add_state_core = 904 if = { limit = { country_exists = PRU PRU = { is_subject_of = ROOT all_owned_state = { OR = { state = 900 state = 901 state = 902 state = 903 state = 904 } } } } PRU = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = PRU transfer_troops = yes } } if = { limit = { NOT = { owns_state = 900 } } transfer_state = 900 } if = { limit = { NOT = { owns_state = 901 } } transfer_state = 901 } if = { limit = { NOT = { owns_state = 902 } } transfer_state = 902 } if = { limit = { NOT = { owns_state = 903 } } transfer_state = 903 } if = { limit = { NOT = { owns_state = 904 } } transfer_state = 904 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_PRU } } #ECU SOU_integrate_ECU = { icon = GFX_decision_generic_form_nation cost = 200 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 7 } } check_variable = { var = formable_committed_size value = 74 compare = greater_than_or_equals } } } allowed = { NOT = { tag = ECU } } visible = { has_country_flag = is_SOU NOT = { has_country_flag = integrated_ECU } } highlight_states = { highlight_state_targets = { state = 905 state = 906 state = 907 state = 908 } } available = { custom_trigger_tooltip = { tooltip = SOU_integrate_ECU_tt 905 = { state_owned_or_puppet_owned_by_root = yes } 906 = { state_owned_or_puppet_owned_by_root = yes } 907 = { state_owned_or_puppet_owned_by_root = yes } 908 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SOU_integrate_ECU" add_state_core = 905 add_state_core = 906 add_state_core = 907 add_state_core = 908 if = { limit = { country_exists = ECU ECU = { is_subject_of = ROOT all_owned_state = { OR = { state = 905 state = 906 state = 907 state = 908 } } } } ECU = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = ECU transfer_troops = yes } } if = { limit = { NOT = { owns_state = 905 } } transfer_state = 905 } if = { limit = { NOT = { owns_state = 906 } } transfer_state = 906 } if = { limit = { NOT = { owns_state = 907 } } transfer_state = 907 } if = { limit = { NOT = { owns_state = 908 } } transfer_state = 908 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_ECU } } #SUR SOU_integrate_SUR = { icon = GFX_decision_generic_form_nation cost = 200 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 7 } } check_variable = { var = formable_committed_size value = 74 compare = greater_than_or_equals } } } allowed = { NOT = { tag = SUR } } visible = { has_country_flag = is_SOU NOT = { has_country_flag = integrated_SUR } } highlight_states = { highlight_state_targets = { state = 878 state = 1006 } } available = { custom_trigger_tooltip = { tooltip = SOU_integrate_SUR_tt 878 = { state_owned_or_puppet_owned_by_root = yes } 1006 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SOU_integrate_SUR" add_state_core = 878 add_state_core = 1006 if = { limit = { country_exists = SUR SUR = { is_subject_of = ROOT all_owned_state = { OR = { state = 878 state = 1006 } } } } SUR = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = SUR transfer_troops = yes } } if = { limit = { NOT = { owns_state = 878 } } transfer_state = 878 } if = { limit = { NOT = { owns_state = 1006 } } transfer_state = 1006 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_SUR } } #GUY SOU_integrate_GUY = { icon = GFX_decision_generic_form_nation cost = 200 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 7 } } check_variable = { var = formable_committed_size value = 74 compare = greater_than_or_equals } } } allowed = { NOT = { tag = GUY } } visible = { has_country_flag = is_SOU NOT = { has_country_flag = integrated_GUY } } highlight_states = { highlight_state_targets = { state = 877 state = 1005 } } available = { custom_trigger_tooltip = { tooltip = SOU_integrate_GUY_tt 877 = { state_owned_or_puppet_owned_by_root = yes } 1005 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SOU_integrate_GUY" add_state_core = 877 add_state_core = 1005 if = { limit = { country_exists = GUY GUY = { is_subject_of = ROOT all_owned_state = { OR = { state = 877 state = 1005 } } } } GUY = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = GUY transfer_troops = yes } } if = { limit = { NOT = { owns_state = 877 } } transfer_state = 877 } if = { limit = { NOT = { owns_state = 1005 } } transfer_state = 1005 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_GUY } } #VEN SOU_integrate_VEN = { icon = GFX_decision_generic_form_nation cost = 250 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 7 } } check_variable = { var = formable_committed_size value = 74 compare = greater_than_or_equals } } } allowed = { NOT = { tag = VEN } } visible = { has_country_flag = is_SOU NOT = { has_country_flag = integrated_VEN } } highlight_states = { highlight_state_targets = { state = 874 state = 875 state = 876 state = 915 state = 916 state = 917 } } available = { custom_trigger_tooltip = { tooltip = SOU_integrate_VEN_tt 874 = { state_owned_or_puppet_owned_by_root = yes } 875 = { state_owned_or_puppet_owned_by_root = yes } 876 = { state_owned_or_puppet_owned_by_root = yes } 915 = { state_owned_or_puppet_owned_by_root = yes } 916 = { state_owned_or_puppet_owned_by_root = yes } 917 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SOU_integrate_VEN" add_state_core = 874 add_state_core = 875 add_state_core = 876 add_state_core = 915 add_state_core = 916 add_state_core = 917 if = { limit = { country_exists = VEN VEN = { is_subject_of = ROOT all_owned_state = { OR = { state = 874 state = 875 state = 876 state = 915 state = 916 state = 917 } } } } VEN = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = VEN transfer_troops = yes } } if = { limit = { NOT = { owns_state = 874 } } transfer_state = 874 } if = { limit = { NOT = { owns_state = 875 } } transfer_state = 875 } if = { limit = { NOT = { owns_state = 876 } } transfer_state = 876 } if = { limit = { NOT = { owns_state = 915 } } transfer_state = 915 } if = { limit = { NOT = { owns_state = 916 } } transfer_state = 916 } if = { limit = { NOT = { owns_state = 917 } } transfer_state = 917 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_VEN } } #COL SOU_integrate_COL = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 7 } } check_variable = { var = formable_committed_size value = 74 compare = greater_than_or_equals } } } allowed = { NOT = { tag = COL } } visible = { has_country_flag = is_SOU NOT = { has_country_flag = integrated_COL } } highlight_states = { highlight_state_targets = { state = 870 state = 871 state = 872 state = 873 state = 911 state = 912 state = 913 state = 914 } } available = { custom_trigger_tooltip = { tooltip = SOU_integrate_COL_tt 870 = { state_owned_or_puppet_owned_by_root = yes } 871 = { state_owned_or_puppet_owned_by_root = yes } 872 = { state_owned_or_puppet_owned_by_root = yes } 873 = { state_owned_or_puppet_owned_by_root = yes } 911 = { state_owned_or_puppet_owned_by_root = yes } 912 = { state_owned_or_puppet_owned_by_root = yes } 913 = { state_owned_or_puppet_owned_by_root = yes } 914 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SOU_integrate_COL" add_state_core = 870 add_state_core = 871 add_state_core = 872 add_state_core = 873 add_state_core = 911 add_state_core = 912 add_state_core = 913 add_state_core = 914 if = { limit = { country_exists = COL COL = { is_subject_of = ROOT all_owned_state = { OR = { state = 870 state = 871 state = 872 state = 873 state = 911 state = 912 state = 913 state = 914 } } } } COL = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = COL transfer_troops = yes } } if = { limit = { NOT = { owns_state = 870 } } transfer_state = 870 } if = { limit = { NOT = { owns_state = 871 } } transfer_state = 871 } if = { limit = { NOT = { owns_state = 872 } } transfer_state = 872 } if = { limit = { NOT = { owns_state = 873 } } transfer_state = 873 } if = { limit = { NOT = { owns_state = 911 } } transfer_state = 911 } if = { limit = { NOT = { owns_state = 912 } } transfer_state = 912 } if = { limit = { NOT = { owns_state = 913 } } transfer_state = 913 } if = { limit = { NOT = { owns_state = 914 } } transfer_state = 914 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_COL } } #CHL SOU_integrate_CHL = { icon = GFX_decision_generic_form_nation cost = 350 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 7 } } check_variable = { var = formable_committed_size value = 74 compare = greater_than_or_equals } } } allowed = { NOT = { tag = CHL } } visible = { has_country_flag = is_SOU NOT = { has_country_flag = integrated_CHL } } highlight_states = { highlight_state_targets = { state = 463 state = 468 state = 472 state = 942 state = 949 state = 950 } } available = { custom_trigger_tooltip = { tooltip = SOU_integrate_CHL_tt 463 = { state_owned_or_puppet_owned_by_root = yes } 468 = { state_owned_or_puppet_owned_by_root = yes } 472 = { state_owned_or_puppet_owned_by_root = yes } 942 = { state_owned_or_puppet_owned_by_root = yes } 949 = { state_owned_or_puppet_owned_by_root = yes } 950 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SOU_integrate_CHL" add_state_core = 463 add_state_core = 468 add_state_core = 472 add_state_core = 942 add_state_core = 949 add_state_core = 950 if = { limit = { country_exists = CHL CHL = { is_subject_of = ROOT all_owned_state = { OR = { state = 463 state = 468 state = 472 state = 942 state = 949 state = 950 } } } } CHL = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = CHL transfer_troops = yes } } if = { limit = { NOT = { owns_state = 463 } } transfer_state = 463 } if = { limit = { NOT = { owns_state = 468 } } transfer_state = 468 } if = { limit = { NOT = { owns_state = 472 } } transfer_state = 472 } if = { limit = { NOT = { owns_state = 942 } } transfer_state = 942 } if = { limit = { NOT = { owns_state = 949 } } transfer_state = 949 } if = { limit = { NOT = { owns_state = 950 } } transfer_state = 950 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_CHL } } #URG SOU_integrate_URG = { icon = GFX_decision_generic_form_nation cost = 200 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 7 } } check_variable = { var = formable_committed_size value = 74 compare = greater_than_or_equals } } } allowed = { NOT = { tag = URG } } visible = { has_country_flag = is_SOU NOT = { has_country_flag = integrated_URG } } highlight_states = { highlight_state_targets = { state = 893 state = 894 } } available = { custom_trigger_tooltip = { tooltip = SOU_integrate_URG_tt 893 = { state_owned_or_puppet_owned_by_root = yes } 894 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SOU_integrate_URG" add_state_core = 893 add_state_core = 894 if = { limit = { country_exists = URG URG = { is_subject_of = ROOT all_owned_state = { OR = { state = 893 state = 894 } } } } URG = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = URG transfer_troops = yes } } if = { limit = { NOT = { owns_state = 893 } } transfer_state = 893 } if = { limit = { NOT = { owns_state = 894 } } transfer_state = 894 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_URG } } #ARG SOU_integrate_ARG = { icon = GFX_decision_generic_form_nation cost = 500 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 7 } } check_variable = { var = formable_committed_size value = 74 compare = greater_than_or_equals } } } allowed = { NOT = { tag = ARG } } visible = { has_country_flag = is_SOU NOT = { has_country_flag = integrated_ARG } } highlight_states = { highlight_state_targets = { state = 443 state = 446 state = 448 state = 449 state = 450 state = 453 state = 454 state = 457 } } available = { custom_trigger_tooltip = { tooltip = SOU_integrate_ARG_tt 443 = { state_owned_or_puppet_owned_by_root = yes } 446 = { state_owned_or_puppet_owned_by_root = yes } 448 = { state_owned_or_puppet_owned_by_root = yes } 449 = { state_owned_or_puppet_owned_by_root = yes } 450 = { state_owned_or_puppet_owned_by_root = yes } 453 = { state_owned_or_puppet_owned_by_root = yes } 454 = { state_owned_or_puppet_owned_by_root = yes } 457 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SOU_integrate_ARG" add_state_core = 443 add_state_core = 446 add_state_core = 448 add_state_core = 449 add_state_core = 450 add_state_core = 453 add_state_core = 454 add_state_core = 457 if = { limit = { country_exists = ARG ARG = { is_subject_of = ROOT all_owned_state = { OR = { state = 443 state = 446 state = 448 state = 449 state = 450 state = 453 state = 454 state = 457 } } } } ARG = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = ARG transfer_troops = yes } } if = { limit = { NOT = { owns_state = 443 } } transfer_state = 443 } if = { limit = { NOT = { owns_state = 446 } } transfer_state = 446 } if = { limit = { NOT = { owns_state = 448 } } transfer_state = 448 } if = { limit = { NOT = { owns_state = 449 } } transfer_state = 449 } if = { limit = { NOT = { owns_state = 450 } } transfer_state = 450 } if = { limit = { NOT = { owns_state = 453 } } transfer_state = 453 } if = { limit = { NOT = { owns_state = 454 } } transfer_state = 454 } if = { limit = { NOT = { owns_state = 457 } } transfer_state = 457 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_ARG } } #TRI SOU_integrate_TRI = { icon = GFX_decision_generic_form_nation cost = 150 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 7 } } check_variable = { var = formable_committed_size value = 74 compare = greater_than_or_equals } } } allowed = { NOT = { tag = TRI } } visible = { has_country_flag = is_SOU NOT = { has_country_flag = integrated_TRI } } highlight_states = { highlight_state_targets = { state = 869 } } available = { custom_trigger_tooltip = { tooltip = SOU_integrate_TRI_tt 869 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SOU_integrate_TRI" add_state_core = 869 if = { limit = { country_exists = TRI TRI = { is_subject_of = ROOT all_owned_state = { state = 869 } } } TRI = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = TRI transfer_troops = yes } } if = { limit = { NOT = { owns_state = 869 } } transfer_state = 869 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_TRI } } #FGU SOU_integrate_FGU = { icon = GFX_decision_generic_form_nation cost = 150 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 7 } } check_variable = { var = formable_committed_size value = 74 compare = greater_than_or_equals } } } allowed = { NOT = { OR = { tag = FRA tag = FGU } } } visible = { has_country_flag = is_SOU NOT = { has_country_flag = integrated_FGU } } highlight_states = { highlight_state_targets = { state = 67 } } available = { OR = { if = { limit = { country_exists = FGU } FGU = { is_subject_of = ROOT has_war = no owns_state = 67 } } owns_state = 67 } if = { limit = { NOT = { any_subject_country = { owns_state = 67 } } } 67 = { compliance > 50 resistance < 30 } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SOU_integrate_FGU" add_state_core = 67 if = { limit = { country_exists = FRA FRA = { is_subject_of = ROOT all_owned_state = { state = 67 } } } FRA = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = FRA transfer_troops = yes } } if = { limit = { country_exists = FGU FGU = { is_subject_of = ROOT all_owned_state = { state = 67 } } } FGU = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = FGU transfer_troops = yes } } if = { limit = { NOT = { owns_state = 67 } } transfer_state = 67 } if = { limit = { FRA = { is_subject_of = ROOT has_war = no owns_state = 67 } } ROOT = { transfer_state = 67 } } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_FGU } } #Curacao SOU_integrate_Curacao = { icon = GFX_decision_generic_form_nation cost = 150 days_remove = 365 highlight_states = { highlight_state_targets = { state = 49 } } visible = { has_country_flag = is_SOU NOT = { has_country_flag = integrated_Curacao } } available = { OR = { HOL = { is_subject_of = ROOT has_war = no owns_state = 49 } owns_state = 49 } if = { limit = { NOT = { any_subject_country = { owns_state = 49 } } } 49 = { compliance > 50 resistance < 30 } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision SOU_integrate_Curacao" add_state_core = 49 if = { limit = { HOL = { is_subject_of = ROOT has_war = no owns_state = 49 } } ROOT = { transfer_state = 49 } } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_Curacao } ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 7 } } check_variable = { var = formable_committed_size value = 74 compare = greater_than_or_equals } } } } ### Cosmetic ### SOU_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 7 } } check_variable = { var = formable_committed_size value = 74 compare = greater_than_or_equals } } } visible = { has_country_flag = is_SOU NOT = { has_cosmetic_tag = SOU } } highlight_states = { highlight_state_targets = { state = 443 state = 446 state = 448 state = 449 state = 450 state = 453 state = 454 state = 457 state = 463 state = 468 state = 472 state = 869 state = 870 state = 871 state = 872 state = 873 state = 874 state = 875 state = 876 state = 877 state = 878 state = 879 state = 880 state = 882 state = 883 state = 884 state = 885 state = 886 state = 887 state = 888 state = 889 state = 890 state = 891 state = 892 state = 893 state = 894 state = 895 state = 896 state = 897 state = 898 state = 899 state = 900 state = 901 state = 902 state = 903 state = 904 state = 905 state = 906 state = 907 state = 908 state = 911 state = 912 state = 913 state = 914 state = 915 state = 916 state = 917 state = 942 state = 949 state = 950 state = 953 state = 954 state = 1005 state = 1006 state = 1021 state = 1022 state = 1023 state = 1024 state = 1025 state = 1026 state = 1027 state = 1028 state = 1029 state = 1031 } } available = { custom_trigger_tooltip = { tooltip = SOU_update_flag_tt count_triggers = { amount = 59 443 = { is_core_of = ROOT } 446 = { is_core_of = ROOT } 448 = { is_core_of = ROOT } 449 = { is_core_of = ROOT } 450 = { is_core_of = ROOT } 453 = { is_core_of = ROOT } 454 = { is_core_of = ROOT } 457 = { is_core_of = ROOT } 463 = { is_core_of = ROOT } 468 = { is_core_of = ROOT } 472 = { is_core_of = ROOT } 869 = { is_core_of = ROOT } 870 = { is_core_of = ROOT } 871 = { is_core_of = ROOT } 872 = { is_core_of = ROOT } 873 = { is_core_of = ROOT } 874 = { is_core_of = ROOT } 875 = { is_core_of = ROOT } 876 = { is_core_of = ROOT } 877 = { is_core_of = ROOT } 878 = { is_core_of = ROOT } 879 = { is_core_of = ROOT } 880 = { is_core_of = ROOT } 882 = { is_core_of = ROOT } 883 = { is_core_of = ROOT } 884 = { is_core_of = ROOT } 885 = { is_core_of = ROOT } 886 = { is_core_of = ROOT } 887 = { is_core_of = ROOT } 888 = { is_core_of = ROOT } 889 = { is_core_of = ROOT } 890 = { is_core_of = ROOT } 891 = { is_core_of = ROOT } 892 = { is_core_of = ROOT } 893 = { is_core_of = ROOT } 894 = { is_core_of = ROOT } 895 = { is_core_of = ROOT } 896 = { is_core_of = ROOT } 897 = { is_core_of = ROOT } 898 = { is_core_of = ROOT } 899 = { is_core_of = ROOT } 900 = { is_core_of = ROOT } 901 = { is_core_of = ROOT } 902 = { is_core_of = ROOT } 903 = { is_core_of = ROOT } 904 = { is_core_of = ROOT } 905 = { is_core_of = ROOT } 906 = { is_core_of = ROOT } 907 = { is_core_of = ROOT } 908 = { is_core_of = ROOT } 911 = { is_core_of = ROOT } 912 = { is_core_of = ROOT } 913 = { is_core_of = ROOT } 914 = { is_core_of = ROOT } 915 = { is_core_of = ROOT } 916 = { is_core_of = ROOT } 917 = { is_core_of = ROOT } 942 = { is_core_of = ROOT } 949 = { is_core_of = ROOT } 950 = { is_core_of = ROOT } 953 = { is_core_of = ROOT } 954 = { is_core_of = ROOT } 1005 = { is_core_of = ROOT } 1006 = { is_core_of = ROOT } 1021 = { is_core_of = ROOT } 1022 = { is_core_of = ROOT } 1023 = { is_core_of = ROOT } 1024 = { is_core_of = ROOT } 1025 = { is_core_of = ROOT } 1026 = { is_core_of = ROOT } 1027 = { is_core_of = ROOT } 1028 = { is_core_of = ROOT } 1029 = { is_core_of = ROOT } 1031 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision SOU_update_flag" set_cosmetic_tag = SOU remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 7 } set_variable = { formable_committed_size = 74 } } } } # Post-formation purchase of unowned cores SOU_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 7 } } check_variable = { var = formable_committed_size value = 74 compare = greater_than_or_equals } } } visible = { has_country_flag = is_SOU } target_root_trigger = { has_country_flag = is_SOU } target_array = global.SOU_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision SOU_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel SOU_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove SOU_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } } form_HBL_category = { ### Integrate (HBL) ### # Start integrate HBL_integrate_start = { icon = GFX_decision_generic_form_nation ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 8 } } check_variable = { var = formable_committed_size value = 10 compare = greater_than_or_equals } } } visible = { NOT = { has_country_flag = is_HBL } } highlight_states = { highlight_states_trigger = { OR = { is_core_of = BEL is_core_of = LUX is_core_of = HOL } } } available = { custom_trigger_tooltip = { tooltip = HBL_integrate_trigger_tt count_triggers = { amount = 8 46 = { state_owned_or_puppet_owned_by_root = yes } 47 = { state_owned_or_puppet_owned_by_root = yes } 48 = { state_owned_or_puppet_owned_by_root = yes } 49 = { state_owned_or_puppet_owned_by_root = yes } 50 = { state_owned_or_puppet_owned_by_root = yes } 51 = { state_owned_or_puppet_owned_by_root = yes } 52 = { state_owned_or_puppet_owned_by_root = yes } 53 = { state_owned_or_puppet_owned_by_root = yes } 965 = { state_owned_or_puppet_owned_by_root = yes } 1169 = { state_owned_or_puppet_owned_by_root = yes } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision HBL_integrate_start" if = { limit = { NOT = { has_country_flag = is_HBL } } set_country_flag = is_HBL set_global_flag = HBL_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_@ROOT custom_effect_tooltip = HBL_start_integrate_tt custom_effect_tooltip = general_integrate_tt add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 8 } set_variable = { formable_committed_size = 10 } } } } #BEL HBL_integrate_BEL = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 8 } } check_variable = { var = formable_committed_size value = 10 compare = greater_than_or_equals } } } allowed = { NOT = { tag = BEL } } visible = { has_country_flag = is_HBL NOT = { has_country_flag = integrated_BEL } } highlight_states = { highlight_state_targets = { state = 50 state = 51 state = 52 state = 965 } } available = { custom_trigger_tooltip = { tooltip = HBL_integrate_BEL_tt 50 = { state_owned_or_puppet_owned_by_root = yes } 51 = { state_owned_or_puppet_owned_by_root = yes } 52 = { state_owned_or_puppet_owned_by_root = yes } 965 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision HBL_integrate_BEL" add_state_core = 50 add_state_core = 51 add_state_core = 52 add_state_core = 965 if = { limit = { country_exists = BEL BEL = { is_subject_of = ROOT all_owned_state = { OR = { state = 50 state = 51 state = 52 state = 965 } } } } BEL = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = BEL transfer_troops = yes } } if = { limit = { NOT = { owns_state = 50 } } transfer_state = 50 } if = { limit = { NOT = { owns_state = 51 } } transfer_state = 51 } if = { limit = { NOT = { owns_state = 52 } } transfer_state = 52 } if = { limit = { NOT = { owns_state = 965 } } transfer_state = 965 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_BEL } } #LUX HBL_integrate_LUX = { icon = GFX_decision_generic_form_nation cost = 150 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 8 } } check_variable = { var = formable_committed_size value = 10 compare = greater_than_or_equals } } } allowed = { NOT = { tag = LUX } } visible = { has_country_flag = is_HBL NOT = { has_country_flag = integrated_LUX } } highlight_states = { highlight_state_targets = { state = 53 } } available = { custom_trigger_tooltip = { tooltip = HBL_integrate_LUX_tt 53 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision HBL_integrate_LUX" add_state_core = 53 if = { limit = { country_exists = LUX LUX = { is_subject_of = ROOT all_owned_state = { state = 53 } } } LUX = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = LUX transfer_troops = yes } } if = { limit = { NOT = { owns_state = 53 } } transfer_state = 53 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_LUX } } #HOL HBL_integrate_HOL = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 8 } } check_variable = { var = formable_committed_size value = 10 compare = greater_than_or_equals } } } allowed = { NOT = { tag = HOL } } visible = { has_country_flag = is_HBL NOT = { has_country_flag = integrated_HOL } } highlight_states = { highlight_state_targets = { state = 46 state = 47 state = 48 state = 49 state = 1169 } } available = { custom_trigger_tooltip = { tooltip = HBL_integrate_HOL_tt 46 = { state_owned_or_puppet_owned_by_root = yes } 47 = { state_owned_or_puppet_owned_by_root = yes } 48 = { state_owned_or_puppet_owned_by_root = yes } 49 = { state_owned_or_puppet_owned_by_root = yes } 1169 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision HBL_integrate_HOL" add_state_core = 46 add_state_core = 47 add_state_core = 48 add_state_core = 49 add_state_core = 1169 if = { limit = { country_exists = HOL HOL = { is_subject_of = ROOT all_owned_state = { OR = { state = 46 state = 47 state = 48 state = 49 state = 1169 } } } } HOL = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = HOL transfer_troops = yes } } if = { limit = { NOT = { owns_state = 46 } } transfer_state = 46 } if = { limit = { NOT = { owns_state = 47 } } transfer_state = 47 } if = { limit = { NOT = { owns_state = 48 } } transfer_state = 48 } if = { limit = { NOT = { owns_state = 49 } } transfer_state = 49 } if = { limit = { NOT = { owns_state = 1169 } } transfer_state = 1169 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_HOL } } ### Cosmetic ### HBL_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 8 } } check_variable = { var = formable_committed_size value = 10 compare = greater_than_or_equals } } } visible = { has_country_flag = is_HBL NOT = { has_cosmetic_tag = HBL } NOT = { has_cosmetic_tag = HBL_REB } } highlight_states = { highlight_state_targets = { state = 46 state = 47 state = 48 state = 49 state = 50 state = 51 state = 52 state = 53 state = 965 state = 1169 } } available = { custom_trigger_tooltip = { tooltip = HBL_update_flag_tt count_triggers = { amount = 8 46 = { is_core_of = ROOT } 47 = { is_core_of = ROOT } 48 = { is_core_of = ROOT } 49 = { is_core_of = ROOT } 50 = { is_core_of = ROOT } 51 = { is_core_of = ROOT } 52 = { is_core_of = ROOT } 53 = { is_core_of = ROOT } 965 = { is_core_of = ROOT } 1169 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision HBL_update_flag" if = { limit = { original_tag = HOL OR = { western_autocrats_are_in_power = yes nationalist_monarchists_are_in_power = yes } } set_cosmetic_tag = HBL_REB set_variable = { dynamic_flag_variant = 8 } } else = { set_cosmetic_tag = HBL set_variable = { dynamic_flag_variant = 8 } } remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 8 } set_variable = { formable_committed_size = 10 } } } } # Post-formation purchase of unowned cores HBL_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 8 } } check_variable = { var = formable_committed_size value = 10 compare = greater_than_or_equals } } } visible = { has_country_flag = is_HBL } target_root_trigger = { has_country_flag = is_HBL } target_array = global.HBL_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision HBL_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel HBL_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove HBL_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } } form_USNA_category = { ### Integrate (USNA) ### # Start integrate USNA_integrate_start = { icon = GFX_decision_generic_form_nation ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 9 } } check_variable = { var = formable_committed_size value = 83 compare = greater_than_or_equals } } } visible = { NOT = { has_country_flag = is_USNA } } highlight_states = { highlight_state_targets = { # CAN cores state = 753 state = 754 state = 755 state = 756 state = 757 state = 758 state = 759 state = 760 state = 761 state = 762 state = 763 state = 1159 state = 1160 # USA contiguous states state = 764 state = 765 state = 766 state = 767 state = 768 state = 769 state = 770 state = 771 state = 772 state = 773 state = 774 state = 775 state = 776 state = 777 state = 778 state = 779 state = 780 state = 781 state = 782 state = 783 state = 784 state = 785 state = 786 state = 787 state = 788 state = 789 state = 790 state = 791 state = 792 state = 793 state = 794 state = 795 state = 796 state = 797 state = 798 state = 799 state = 800 state = 803 state = 804 state = 805 state = 806 state = 807 state = 808 state = 809 state = 810 state = 811 # MEX cores state = 828 state = 829 state = 830 state = 831 state = 832 state = 833 state = 834 state = 835 state = 836 state = 837 state = 838 state = 839 state = 840 } } available = { custom_trigger_tooltip = { tooltip = USNA_integrate_trigger_tt count_triggers = { amount = 66 753 = { state_owned_or_puppet_owned_by_root = yes } 754 = { state_owned_or_puppet_owned_by_root = yes } 755 = { state_owned_or_puppet_owned_by_root = yes } 756 = { state_owned_or_puppet_owned_by_root = yes } 757 = { state_owned_or_puppet_owned_by_root = yes } 758 = { state_owned_or_puppet_owned_by_root = yes } 759 = { state_owned_or_puppet_owned_by_root = yes } 760 = { state_owned_or_puppet_owned_by_root = yes } 761 = { state_owned_or_puppet_owned_by_root = yes } 762 = { state_owned_or_puppet_owned_by_root = yes } 763 = { state_owned_or_puppet_owned_by_root = yes } 764 = { state_owned_or_puppet_owned_by_root = yes } 765 = { state_owned_or_puppet_owned_by_root = yes } 766 = { state_owned_or_puppet_owned_by_root = yes } 767 = { state_owned_or_puppet_owned_by_root = yes } 768 = { state_owned_or_puppet_owned_by_root = yes } 769 = { state_owned_or_puppet_owned_by_root = yes } 770 = { state_owned_or_puppet_owned_by_root = yes } 771 = { state_owned_or_puppet_owned_by_root = yes } 772 = { state_owned_or_puppet_owned_by_root = yes } 773 = { state_owned_or_puppet_owned_by_root = yes } 774 = { state_owned_or_puppet_owned_by_root = yes } 775 = { state_owned_or_puppet_owned_by_root = yes } 776 = { state_owned_or_puppet_owned_by_root = yes } 777 = { state_owned_or_puppet_owned_by_root = yes } 778 = { state_owned_or_puppet_owned_by_root = yes } 779 = { state_owned_or_puppet_owned_by_root = yes } 780 = { state_owned_or_puppet_owned_by_root = yes } 781 = { state_owned_or_puppet_owned_by_root = yes } 782 = { state_owned_or_puppet_owned_by_root = yes } 783 = { state_owned_or_puppet_owned_by_root = yes } 784 = { state_owned_or_puppet_owned_by_root = yes } 785 = { state_owned_or_puppet_owned_by_root = yes } 786 = { state_owned_or_puppet_owned_by_root = yes } 787 = { state_owned_or_puppet_owned_by_root = yes } 788 = { state_owned_or_puppet_owned_by_root = yes } 789 = { state_owned_or_puppet_owned_by_root = yes } 790 = { state_owned_or_puppet_owned_by_root = yes } 791 = { state_owned_or_puppet_owned_by_root = yes } 792 = { state_owned_or_puppet_owned_by_root = yes } 793 = { state_owned_or_puppet_owned_by_root = yes } 794 = { state_owned_or_puppet_owned_by_root = yes } 795 = { state_owned_or_puppet_owned_by_root = yes } 796 = { state_owned_or_puppet_owned_by_root = yes } 797 = { state_owned_or_puppet_owned_by_root = yes } 798 = { state_owned_or_puppet_owned_by_root = yes } 799 = { state_owned_or_puppet_owned_by_root = yes } 800 = { state_owned_or_puppet_owned_by_root = yes } 803 = { state_owned_or_puppet_owned_by_root = yes } 804 = { state_owned_or_puppet_owned_by_root = yes } 805 = { state_owned_or_puppet_owned_by_root = yes } 806 = { state_owned_or_puppet_owned_by_root = yes } 807 = { state_owned_or_puppet_owned_by_root = yes } 808 = { state_owned_or_puppet_owned_by_root = yes } 809 = { state_owned_or_puppet_owned_by_root = yes } 810 = { state_owned_or_puppet_owned_by_root = yes } 811 = { state_owned_or_puppet_owned_by_root = yes } 814 = { state_owned_or_puppet_owned_by_root = yes } 817 = { state_owned_or_puppet_owned_by_root = yes } 822 = { state_owned_or_puppet_owned_by_root = yes } 823 = { state_owned_or_puppet_owned_by_root = yes } 825 = { state_owned_or_puppet_owned_by_root = yes } 826 = { state_owned_or_puppet_owned_by_root = yes } 827 = { state_owned_or_puppet_owned_by_root = yes } 828 = { state_owned_or_puppet_owned_by_root = yes } 829 = { state_owned_or_puppet_owned_by_root = yes } 830 = { state_owned_or_puppet_owned_by_root = yes } 831 = { state_owned_or_puppet_owned_by_root = yes } 832 = { state_owned_or_puppet_owned_by_root = yes } 833 = { state_owned_or_puppet_owned_by_root = yes } 834 = { state_owned_or_puppet_owned_by_root = yes } 835 = { state_owned_or_puppet_owned_by_root = yes } 836 = { state_owned_or_puppet_owned_by_root = yes } 837 = { state_owned_or_puppet_owned_by_root = yes } 838 = { state_owned_or_puppet_owned_by_root = yes } 839 = { state_owned_or_puppet_owned_by_root = yes } 840 = { state_owned_or_puppet_owned_by_root = yes } 1010 = { state_owned_or_puppet_owned_by_root = yes } 1083 = { state_owned_or_puppet_owned_by_root = yes } 1084 = { state_owned_or_puppet_owned_by_root = yes } 1159 = { state_owned_or_puppet_owned_by_root = yes } 1160 = { state_owned_or_puppet_owned_by_root = yes } 1182 = { state_owned_or_puppet_owned_by_root = yes } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision USNA_integrate_start" if = { limit = { NOT = { has_country_flag = is_USNA } } set_country_flag = is_USNA set_global_flag = USNA_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_@ROOT custom_effect_tooltip = USNA_start_integrate_tt custom_effect_tooltip = general_integrate_tt add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 9 } set_variable = { formable_committed_size = 83 } } } } #CAN USNA_integrate_CAN = { icon = GFX_decision_generic_form_nation cost = 500 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 9 } } check_variable = { var = formable_committed_size value = 83 compare = greater_than_or_equals } } } allowed = { NOT = { tag = CAN } } visible = { has_country_flag = is_USNA NOT = { has_country_flag = integrated_CAN } } highlight_states = { highlight_state_targets = { state = 753 state = 754 state = 755 state = 756 state = 757 state = 758 state = 759 state = 760 state = 761 state = 762 state = 763 state = 1159 state = 1160 } } available = { custom_trigger_tooltip = { tooltip = USNA_integrate_CAN_tt 753 = { state_owned_or_puppet_owned_by_root = yes } 754 = { state_owned_or_puppet_owned_by_root = yes } 755 = { state_owned_or_puppet_owned_by_root = yes } 756 = { state_owned_or_puppet_owned_by_root = yes } 757 = { state_owned_or_puppet_owned_by_root = yes } 758 = { state_owned_or_puppet_owned_by_root = yes } 759 = { state_owned_or_puppet_owned_by_root = yes } 760 = { state_owned_or_puppet_owned_by_root = yes } 761 = { state_owned_or_puppet_owned_by_root = yes } 762 = { state_owned_or_puppet_owned_by_root = yes } 763 = { state_owned_or_puppet_owned_by_root = yes } 1159 = { state_owned_or_puppet_owned_by_root = yes } 1160 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision USNA_integrate_CAN" add_state_core = 753 add_state_core = 754 add_state_core = 755 add_state_core = 756 add_state_core = 757 add_state_core = 758 add_state_core = 759 add_state_core = 760 add_state_core = 761 add_state_core = 762 add_state_core = 763 add_state_core = 1159 add_state_core = 1160 if = { limit = { country_exists = CAN CAN = { is_subject_of = ROOT all_owned_state = { OR = { state = 753 state = 754 state = 755 state = 756 state = 757 state = 758 state = 759 state = 760 state = 761 state = 762 state = 763 state = 1159 state = 1160 } } } } CAN = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = CAN transfer_troops = yes } } if = { limit = { NOT = { owns_state = 753 } } transfer_state = 753 } if = { limit = { NOT = { owns_state = 754 } } transfer_state = 754 } if = { limit = { NOT = { owns_state = 755 } } transfer_state = 755 } if = { limit = { NOT = { owns_state = 756 } } transfer_state = 756 } if = { limit = { NOT = { owns_state = 757 } } transfer_state = 757 } if = { limit = { NOT = { owns_state = 758 } } transfer_state = 758 } if = { limit = { NOT = { owns_state = 759 } } transfer_state = 759 } if = { limit = { NOT = { owns_state = 760 } } transfer_state = 760 } if = { limit = { NOT = { owns_state = 761 } } transfer_state = 761 } if = { limit = { NOT = { owns_state = 762 } } transfer_state = 762 } if = { limit = { NOT = { owns_state = 763 } } transfer_state = 763 } if = { limit = { NOT = { owns_state = 1159 } } transfer_state = 1159 } if = { limit = { NOT = { owns_state = 1160 } } transfer_state = 1160 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_CAN } } #USA USNA_integrate_USA = { icon = GFX_decision_generic_form_nation cost = 500 days_remove = 730 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 9 } } check_variable = { var = formable_committed_size value = 83 compare = greater_than_or_equals } } } allowed = { NOT = { tag = USA } } visible = { has_country_flag = is_USNA NOT = { has_country_flag = integrated_USA } } highlight_states = { highlight_state_targets = { state = 764 state = 765 state = 766 state = 767 state = 768 state = 769 state = 770 state = 771 state = 772 state = 773 state = 774 state = 775 state = 776 state = 777 state = 778 state = 779 state = 780 state = 781 state = 782 state = 783 state = 784 state = 785 state = 786 state = 787 state = 788 state = 789 state = 790 state = 791 state = 792 state = 793 state = 794 state = 795 state = 796 state = 797 state = 798 state = 799 state = 800 state = 803 state = 804 state = 805 state = 806 state = 807 state = 808 state = 809 state = 810 state = 811 state = 814 state = 817 state = 822 state = 823 state = 825 state = 826 state = 827 state = 1010 state = 1083 state = 1084 state = 1182 } } available = { custom_trigger_tooltip = { tooltip = USNA_integrate_USA_tt 764 = { state_owned_or_puppet_owned_by_root = yes } 765 = { state_owned_or_puppet_owned_by_root = yes } 766 = { state_owned_or_puppet_owned_by_root = yes } 767 = { state_owned_or_puppet_owned_by_root = yes } 768 = { state_owned_or_puppet_owned_by_root = yes } 769 = { state_owned_or_puppet_owned_by_root = yes } 770 = { state_owned_or_puppet_owned_by_root = yes } 771 = { state_owned_or_puppet_owned_by_root = yes } 772 = { state_owned_or_puppet_owned_by_root = yes } 773 = { state_owned_or_puppet_owned_by_root = yes } 774 = { state_owned_or_puppet_owned_by_root = yes } 775 = { state_owned_or_puppet_owned_by_root = yes } 776 = { state_owned_or_puppet_owned_by_root = yes } 777 = { state_owned_or_puppet_owned_by_root = yes } 778 = { state_owned_or_puppet_owned_by_root = yes } 779 = { state_owned_or_puppet_owned_by_root = yes } 780 = { state_owned_or_puppet_owned_by_root = yes } 781 = { state_owned_or_puppet_owned_by_root = yes } 782 = { state_owned_or_puppet_owned_by_root = yes } 783 = { state_owned_or_puppet_owned_by_root = yes } 784 = { state_owned_or_puppet_owned_by_root = yes } 785 = { state_owned_or_puppet_owned_by_root = yes } 786 = { state_owned_or_puppet_owned_by_root = yes } 787 = { state_owned_or_puppet_owned_by_root = yes } 788 = { state_owned_or_puppet_owned_by_root = yes } 789 = { state_owned_or_puppet_owned_by_root = yes } 790 = { state_owned_or_puppet_owned_by_root = yes } 791 = { state_owned_or_puppet_owned_by_root = yes } 792 = { state_owned_or_puppet_owned_by_root = yes } 793 = { state_owned_or_puppet_owned_by_root = yes } 794 = { state_owned_or_puppet_owned_by_root = yes } 795 = { state_owned_or_puppet_owned_by_root = yes } 796 = { state_owned_or_puppet_owned_by_root = yes } 797 = { state_owned_or_puppet_owned_by_root = yes } 798 = { state_owned_or_puppet_owned_by_root = yes } 799 = { state_owned_or_puppet_owned_by_root = yes } 800 = { state_owned_or_puppet_owned_by_root = yes } 803 = { state_owned_or_puppet_owned_by_root = yes } 804 = { state_owned_or_puppet_owned_by_root = yes } 805 = { state_owned_or_puppet_owned_by_root = yes } 806 = { state_owned_or_puppet_owned_by_root = yes } 807 = { state_owned_or_puppet_owned_by_root = yes } 808 = { state_owned_or_puppet_owned_by_root = yes } 809 = { state_owned_or_puppet_owned_by_root = yes } 810 = { state_owned_or_puppet_owned_by_root = yes } 811 = { state_owned_or_puppet_owned_by_root = yes } 814 = { state_owned_or_puppet_owned_by_root = yes } 817 = { state_owned_or_puppet_owned_by_root = yes } 822 = { state_owned_or_puppet_owned_by_root = yes } 823 = { state_owned_or_puppet_owned_by_root = yes } 825 = { state_owned_or_puppet_owned_by_root = yes } 826 = { state_owned_or_puppet_owned_by_root = yes } 827 = { state_owned_or_puppet_owned_by_root = yes } 1010 = { state_owned_or_puppet_owned_by_root = yes } 1083 = { state_owned_or_puppet_owned_by_root = yes } 1084 = { state_owned_or_puppet_owned_by_root = yes } 1182 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision USNA_integrate_USA" add_state_core = 764 add_state_core = 765 add_state_core = 766 add_state_core = 767 add_state_core = 768 add_state_core = 769 add_state_core = 770 add_state_core = 771 add_state_core = 772 add_state_core = 773 add_state_core = 774 add_state_core = 775 add_state_core = 776 add_state_core = 777 add_state_core = 778 add_state_core = 779 add_state_core = 780 add_state_core = 781 add_state_core = 782 add_state_core = 783 add_state_core = 784 add_state_core = 785 add_state_core = 786 add_state_core = 787 add_state_core = 788 add_state_core = 789 add_state_core = 790 add_state_core = 791 add_state_core = 792 add_state_core = 793 add_state_core = 794 add_state_core = 795 add_state_core = 796 add_state_core = 797 add_state_core = 798 add_state_core = 799 add_state_core = 800 add_state_core = 803 add_state_core = 804 add_state_core = 805 add_state_core = 806 add_state_core = 807 add_state_core = 808 add_state_core = 809 add_state_core = 810 add_state_core = 811 add_state_core = 814 add_state_core = 817 add_state_core = 822 add_state_core = 823 add_state_core = 825 add_state_core = 826 add_state_core = 827 add_state_core = 1010 add_state_core = 1083 add_state_core = 1084 add_state_core = 1182 hidden_effect = { if = { limit = { country_exists = USA USA = { is_subject_of = ROOT all_owned_state = { OR = { state = 764 state = 765 state = 766 state = 767 state = 768 state = 769 state = 770 state = 771 state = 772 state = 773 state = 774 state = 775 state = 776 state = 777 state = 778 state = 779 state = 780 state = 781 state = 782 state = 783 state = 784 state = 785 state = 786 state = 787 state = 788 state = 789 state = 790 state = 791 state = 792 state = 793 state = 794 state = 795 state = 796 state = 797 state = 798 state = 799 state = 800 state = 803 state = 804 state = 805 state = 806 state = 807 state = 808 state = 809 state = 810 state = 811 state = 814 state = 817 state = 822 state = 823 state = 825 state = 826 state = 827 state = 1010 state = 1083 state = 1084 state = 1182 } } } } USA = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = USA transfer_troops = yes } } if = { limit = { NOT = { owns_state = 764 } } transfer_state = 764 } if = { limit = { NOT = { owns_state = 765 } } transfer_state = 765 } if = { limit = { NOT = { owns_state = 766 } } transfer_state = 766 } if = { limit = { NOT = { owns_state = 767 } } transfer_state = 767 } if = { limit = { NOT = { owns_state = 768 } } transfer_state = 768 } if = { limit = { NOT = { owns_state = 769 } } transfer_state = 769 } if = { limit = { NOT = { owns_state = 770 } } transfer_state = 770 } if = { limit = { NOT = { owns_state = 771 } } transfer_state = 771 } if = { limit = { NOT = { owns_state = 772 } } transfer_state = 772 } if = { limit = { NOT = { owns_state = 773 } } transfer_state = 773 } if = { limit = { NOT = { owns_state = 774 } } transfer_state = 774 } if = { limit = { NOT = { owns_state = 775 } } transfer_state = 775 } if = { limit = { NOT = { owns_state = 776 } } transfer_state = 776 } if = { limit = { NOT = { owns_state = 777 } } transfer_state = 777 } if = { limit = { NOT = { owns_state = 778 } } transfer_state = 778 } if = { limit = { NOT = { owns_state = 779 } } transfer_state = 779 } if = { limit = { NOT = { owns_state = 780 } } transfer_state = 780 } if = { limit = { NOT = { owns_state = 781 } } transfer_state = 781 } if = { limit = { NOT = { owns_state = 782 } } transfer_state = 782 } if = { limit = { NOT = { owns_state = 783 } } transfer_state = 783 } if = { limit = { NOT = { owns_state = 784 } } transfer_state = 784 } if = { limit = { NOT = { owns_state = 785 } } transfer_state = 785 } if = { limit = { NOT = { owns_state = 786 } } transfer_state = 786 } if = { limit = { NOT = { owns_state = 787 } } transfer_state = 787 } if = { limit = { NOT = { owns_state = 788 } } transfer_state = 788 } if = { limit = { NOT = { owns_state = 789 } } transfer_state = 789 } if = { limit = { NOT = { owns_state = 790 } } transfer_state = 790 } if = { limit = { NOT = { owns_state = 791 } } transfer_state = 791 } if = { limit = { NOT = { owns_state = 792 } } transfer_state = 792 } if = { limit = { NOT = { owns_state = 793 } } transfer_state = 793 } if = { limit = { NOT = { owns_state = 794 } } transfer_state = 794 } if = { limit = { NOT = { owns_state = 795 } } transfer_state = 795 } if = { limit = { NOT = { owns_state = 796 } } transfer_state = 796 } if = { limit = { NOT = { owns_state = 797 } } transfer_state = 797 } if = { limit = { NOT = { owns_state = 798 } } transfer_state = 798 } if = { limit = { NOT = { owns_state = 799 } } transfer_state = 799 } if = { limit = { NOT = { owns_state = 800 } } transfer_state = 800 } if = { limit = { NOT = { owns_state = 803 } } transfer_state = 803 } if = { limit = { NOT = { owns_state = 804 } } transfer_state = 804 } if = { limit = { NOT = { owns_state = 805 } } transfer_state = 805 } if = { limit = { NOT = { owns_state = 806 } } transfer_state = 806 } if = { limit = { NOT = { owns_state = 807 } } transfer_state = 807 } if = { limit = { NOT = { owns_state = 808 } } transfer_state = 808 } if = { limit = { NOT = { owns_state = 809 } } transfer_state = 809 } if = { limit = { NOT = { owns_state = 810 } } transfer_state = 810 } if = { limit = { NOT = { owns_state = 811 } } transfer_state = 811 } if = { limit = { NOT = { owns_state = 814 } } transfer_state = 814 } if = { limit = { NOT = { owns_state = 817 } } transfer_state = 817 } if = { limit = { NOT = { owns_state = 822 } } transfer_state = 822 } if = { limit = { NOT = { owns_state = 823 } } transfer_state = 823 } if = { limit = { NOT = { owns_state = 825 } } transfer_state = 825 } if = { limit = { NOT = { owns_state = 826 } } transfer_state = 826 } if = { limit = { NOT = { owns_state = 827 } } transfer_state = 827 } if = { limit = { NOT = { owns_state = 1010 } } transfer_state = 1010 } if = { limit = { NOT = { owns_state = 1083 } } transfer_state = 1083 } if = { limit = { NOT = { owns_state = 1084 } } transfer_state = 1084 } if = { limit = { NOT = { owns_state = 1182 } } transfer_state = 1182 } } custom_effect_tooltip = USA_integrate_tt clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_USA } } #MEX USNA_integrate_MEX = { icon = GFX_decision_generic_form_nation cost = 500 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 9 } } check_variable = { var = formable_committed_size value = 83 compare = greater_than_or_equals } } } allowed = { NOT = { tag = MEX } } visible = { has_country_flag = is_USNA NOT = { has_country_flag = integrated_MEX } } highlight_states = { highlight_state_targets = { state = 828 state = 829 state = 830 state = 831 state = 832 state = 833 state = 834 state = 835 state = 836 state = 837 state = 838 state = 839 state = 840 } } available = { custom_trigger_tooltip = { tooltip = USNA_integrate_MEX_tt 828 = { state_owned_or_puppet_owned_by_root = yes } 829 = { state_owned_or_puppet_owned_by_root = yes } 830 = { state_owned_or_puppet_owned_by_root = yes } 831 = { state_owned_or_puppet_owned_by_root = yes } 832 = { state_owned_or_puppet_owned_by_root = yes } 833 = { state_owned_or_puppet_owned_by_root = yes } 834 = { state_owned_or_puppet_owned_by_root = yes } 835 = { state_owned_or_puppet_owned_by_root = yes } 836 = { state_owned_or_puppet_owned_by_root = yes } 837 = { state_owned_or_puppet_owned_by_root = yes } 838 = { state_owned_or_puppet_owned_by_root = yes } 839 = { state_owned_or_puppet_owned_by_root = yes } 840 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision USNA_integrate_MEX" add_state_core = 828 add_state_core = 829 add_state_core = 830 add_state_core = 831 add_state_core = 832 add_state_core = 833 add_state_core = 834 add_state_core = 835 add_state_core = 836 add_state_core = 837 add_state_core = 838 add_state_core = 839 add_state_core = 840 if = { limit = { country_exists = MEX MEX = { is_subject_of = ROOT all_owned_state = { OR = { state = 828 state = 829 state = 830 state = 831 state = 832 state = 833 state = 834 state = 835 state = 836 state = 837 state = 838 state = 839 state = 840 } } } } MEX = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = MEX transfer_troops = yes } } if = { limit = { NOT = { owns_state = 828 } } transfer_state = 828 } if = { limit = { NOT = { owns_state = 829 } } transfer_state = 829 } if = { limit = { NOT = { owns_state = 830 } } transfer_state = 830 } if = { limit = { NOT = { owns_state = 831 } } transfer_state = 831 } if = { limit = { NOT = { owns_state = 832 } } transfer_state = 832 } if = { limit = { NOT = { owns_state = 833 } } transfer_state = 833 } if = { limit = { NOT = { owns_state = 834 } } transfer_state = 834 } if = { limit = { NOT = { owns_state = 835 } } transfer_state = 835 } if = { limit = { NOT = { owns_state = 836 } } transfer_state = 836 } if = { limit = { NOT = { owns_state = 837 } } transfer_state = 837 } if = { limit = { NOT = { owns_state = 838 } } transfer_state = 838 } if = { limit = { NOT = { owns_state = 839 } } transfer_state = 839 } if = { limit = { NOT = { owns_state = 840 } } transfer_state = 840 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_MEX } } ### Cosmetic ### USNA_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 1 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 9 } } check_variable = { var = formable_committed_size value = 83 compare = greater_than_or_equals } } } visible = { has_country_flag = is_USNA NOT = { has_cosmetic_tag = USNA } } highlight_states = { highlight_state_targets = { state = 753 state = 754 state = 755 state = 756 state = 757 state = 758 state = 759 state = 760 state = 761 state = 762 state = 763 state = 764 state = 765 state = 766 state = 767 state = 768 state = 769 state = 770 state = 771 state = 772 state = 773 state = 774 state = 775 state = 776 state = 777 state = 778 state = 779 state = 780 state = 781 state = 782 state = 783 state = 784 state = 785 state = 786 state = 787 state = 788 state = 789 state = 790 state = 791 state = 792 state = 793 state = 794 state = 795 state = 796 state = 797 state = 798 state = 799 state = 800 state = 803 state = 804 state = 805 state = 806 state = 807 state = 808 state = 809 state = 810 state = 811 state = 814 state = 817 state = 822 state = 823 state = 825 state = 826 state = 827 state = 828 state = 829 state = 830 state = 831 state = 832 state = 833 state = 834 state = 835 state = 836 state = 837 state = 838 state = 839 state = 840 state = 1010 state = 1083 state = 1084 state = 1159 state = 1160 state = 1182 } } available = { custom_trigger_tooltip = { tooltip = USNA_update_flag_tt count_triggers = { amount = 66 753 = { is_core_of = ROOT } 754 = { is_core_of = ROOT } 755 = { is_core_of = ROOT } 756 = { is_core_of = ROOT } 757 = { is_core_of = ROOT } 758 = { is_core_of = ROOT } 759 = { is_core_of = ROOT } 760 = { is_core_of = ROOT } 761 = { is_core_of = ROOT } 762 = { is_core_of = ROOT } 763 = { is_core_of = ROOT } 764 = { is_core_of = ROOT } 765 = { is_core_of = ROOT } 766 = { is_core_of = ROOT } 767 = { is_core_of = ROOT } 768 = { is_core_of = ROOT } 769 = { is_core_of = ROOT } 770 = { is_core_of = ROOT } 771 = { is_core_of = ROOT } 772 = { is_core_of = ROOT } 773 = { is_core_of = ROOT } 774 = { is_core_of = ROOT } 775 = { is_core_of = ROOT } 776 = { is_core_of = ROOT } 777 = { is_core_of = ROOT } 778 = { is_core_of = ROOT } 779 = { is_core_of = ROOT } 780 = { is_core_of = ROOT } 781 = { is_core_of = ROOT } 782 = { is_core_of = ROOT } 783 = { is_core_of = ROOT } 784 = { is_core_of = ROOT } 785 = { is_core_of = ROOT } 786 = { is_core_of = ROOT } 787 = { is_core_of = ROOT } 788 = { is_core_of = ROOT } 789 = { is_core_of = ROOT } 790 = { is_core_of = ROOT } 791 = { is_core_of = ROOT } 792 = { is_core_of = ROOT } 793 = { is_core_of = ROOT } 794 = { is_core_of = ROOT } 795 = { is_core_of = ROOT } 796 = { is_core_of = ROOT } 797 = { is_core_of = ROOT } 798 = { is_core_of = ROOT } 799 = { is_core_of = ROOT } 800 = { is_core_of = ROOT } 803 = { is_core_of = ROOT } 804 = { is_core_of = ROOT } 805 = { is_core_of = ROOT } 806 = { is_core_of = ROOT } 807 = { is_core_of = ROOT } 808 = { is_core_of = ROOT } 809 = { is_core_of = ROOT } 810 = { is_core_of = ROOT } 811 = { is_core_of = ROOT } 814 = { is_core_of = ROOT } 817 = { is_core_of = ROOT } 822 = { is_core_of = ROOT } 823 = { is_core_of = ROOT } 825 = { is_core_of = ROOT } 826 = { is_core_of = ROOT } 827 = { is_core_of = ROOT } 828 = { is_core_of = ROOT } 829 = { is_core_of = ROOT } 830 = { is_core_of = ROOT } 831 = { is_core_of = ROOT } 832 = { is_core_of = ROOT } 833 = { is_core_of = ROOT } 834 = { is_core_of = ROOT } 835 = { is_core_of = ROOT } 836 = { is_core_of = ROOT } 837 = { is_core_of = ROOT } 838 = { is_core_of = ROOT } 839 = { is_core_of = ROOT } 840 = { is_core_of = ROOT } 1010 = { is_core_of = ROOT } 1083 = { is_core_of = ROOT } 1084 = { is_core_of = ROOT } 1159 = { is_core_of = ROOT } 1160 = { is_core_of = ROOT } 1182 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision USNA_update_flag" set_cosmetic_tag = USNA remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 9 } set_variable = { formable_committed_size = 83 } } } } # Post-formation purchase of unowned cores USNA_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 9 } } check_variable = { var = formable_committed_size value = 83 compare = greater_than_or_equals } } } visible = { has_country_flag = is_USNA } target_root_trigger = { has_country_flag = is_USNA } target_array = global.USNA_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision USNA_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel USNA_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove USNA_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } } form_UTS_category = { ### Integrate (UTS) ### # Start integrate UTS_integrate_start = { icon = GFX_decision_generic_form_nation ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 10 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } visible = { NOT = { has_country_flag = is_UTS } } highlight_states = { highlight_states_trigger = { OR = { is_core_of = KAZ is_core_of = UZB is_core_of = TRK is_core_of = KYR } } } available = { has_completed_focus = CES_ca_union_sov custom_trigger_tooltip = { tooltip = UTS_integrate_trigger_tt count_triggers = { amount = 11 714 = { state_owned_or_puppet_owned_by_root = yes } 715 = { state_owned_or_puppet_owned_by_root = yes } 716 = { state_owned_or_puppet_owned_by_root = yes } 717 = { state_owned_or_puppet_owned_by_root = yes } 718 = { state_owned_or_puppet_owned_by_root = yes } 719 = { state_owned_or_puppet_owned_by_root = yes } 720 = { state_owned_or_puppet_owned_by_root = yes } 721 = { state_owned_or_puppet_owned_by_root = yes } 725 = { state_owned_or_puppet_owned_by_root = yes } 726 = { state_owned_or_puppet_owned_by_root = yes } 727 = { state_owned_or_puppet_owned_by_root = yes } 728 = { state_owned_or_puppet_owned_by_root = yes } 729 = { state_owned_or_puppet_owned_by_root = yes } 1170 = { state_owned_or_puppet_owned_by_root = yes } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision UTS_integrate_start" if = { limit = { NOT = { has_country_flag = is_UTS } } set_country_flag = is_UTS set_global_flag = UTS_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_@ROOT custom_effect_tooltip = UTS_start_integrate_tt custom_effect_tooltip = general_integrate_tt add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 10 } set_variable = { formable_committed_size = 14 } } } } #KAZ UTS_integrate_KAZ = { icon = GFX_decision_generic_form_nation cost = 400 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 10 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } allowed = { NOT = { tag = KAZ } } visible = { has_country_flag = is_UTS NOT = { has_country_flag = integrated_KAZ } } highlight_states = { highlight_state_targets = { state = 714 state = 715 state = 716 state = 717 state = 718 state = 719 } } available = { custom_trigger_tooltip = { tooltip = UTS_integrate_KAZ_tt 714 = { state_owned_or_puppet_owned_by_root = yes } 715 = { state_owned_or_puppet_owned_by_root = yes } 716 = { state_owned_or_puppet_owned_by_root = yes } 717 = { state_owned_or_puppet_owned_by_root = yes } 718 = { state_owned_or_puppet_owned_by_root = yes } 719 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision UTS_integrate_KAZ" add_state_core = 714 add_state_core = 715 add_state_core = 716 add_state_core = 717 add_state_core = 718 add_state_core = 719 if = { limit = { country_exists = KAZ KAZ = { is_subject_of = ROOT all_owned_state = { OR = { state = 714 state = 715 state = 716 state = 717 state = 718 state = 719 } } } } KAZ = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = KAZ transfer_troops = yes } } if = { limit = { NOT = { owns_state = 714 } } transfer_state = 714 } if = { limit = { NOT = { owns_state = 715 } } transfer_state = 715 } if = { limit = { NOT = { owns_state = 716 } } transfer_state = 716 } if = { limit = { NOT = { owns_state = 717 } } transfer_state = 717 } if = { limit = { NOT = { owns_state = 718 } } transfer_state = 718 } if = { limit = { NOT = { owns_state = 719 } } transfer_state = 719 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_KAZ } } #UZB UTS_integrate_UZB = { icon = GFX_decision_generic_form_nation cost = 400 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 10 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } allowed = { NOT = { tag = UZB } } visible = { has_country_flag = is_UTS NOT = { has_country_flag = integrated_UZB } } highlight_states = { highlight_state_targets = { state = 725 state = 726 state = 727 } } available = { custom_trigger_tooltip = { tooltip = UTS_integrate_UZB_tt 725 = { state_owned_or_puppet_owned_by_root = yes } 726 = { state_owned_or_puppet_owned_by_root = yes } 727 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision UTS_integrate_UZB" add_state_core = 725 add_state_core = 726 add_state_core = 727 if = { limit = { country_exists = UZB UZB = { is_subject_of = ROOT all_owned_state = { OR = { state = 725 state = 726 state = 727 } } } } UZB = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = UZB transfer_troops = yes } } if = { limit = { NOT = { owns_state = 725 } } transfer_state = 725 } if = { limit = { NOT = { owns_state = 726 } } transfer_state = 726 } if = { limit = { NOT = { owns_state = 727 } } transfer_state = 727 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_UZB } } #TRK UTS_integrate_TRK = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 10 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } allowed = { NOT = { tag = TRK } } visible = { has_country_flag = is_UTS NOT = { has_country_flag = integrated_TRK } } highlight_states = { highlight_state_targets = { state = 728 state = 729 } } available = { custom_trigger_tooltip = { tooltip = UTS_integrate_TRK_tt 728 = { state_owned_or_puppet_owned_by_root = yes } 729 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision UTS_integrate_TRK" add_state_core = 728 add_state_core = 729 if = { limit = { country_exists = TRK TRK = { is_subject_of = ROOT all_owned_state = { OR = { state = 728 state = 729 } } } } TRK = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = TRK transfer_troops = yes } } if = { limit = { NOT = { owns_state = 728 } } transfer_state = 728 } if = { limit = { NOT = { owns_state = 729 } } transfer_state = 729 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_TRK } } #KYR UTS_integrate_KYR = { icon = GFX_decision_generic_form_nation cost = 200 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 10 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } allowed = { NOT = { tag = KYR } } visible = { has_country_flag = is_UTS NOT = { has_country_flag = integrated_KYR } } highlight_states = { highlight_state_targets = { state = 720 state = 721 state = 1170 } } available = { custom_trigger_tooltip = { tooltip = UTS_integrate_KYR_tt 720 = { state_owned_or_puppet_owned_by_root = yes } 721 = { state_owned_or_puppet_owned_by_root = yes } 1170 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision UTS_integrate_KYR" add_state_core = 720 add_state_core = 721 add_state_core = 1170 if = { limit = { country_exists = KYR KYR = { is_subject_of = ROOT all_owned_state = { OR = { state = 720 state = 721 state = 1170 } } } } KYR = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = KYR transfer_troops = yes } } if = { limit = { NOT = { owns_state = 720 } } transfer_state = 720 } if = { limit = { NOT = { owns_state = 721 } } transfer_state = 721 } if = { limit = { NOT = { owns_state = 1170 } } transfer_state = 1170 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_KYR } } UTS_integrate_TUR = { icon = GFX_decision_generic_form_nation cost = 600 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 10 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } allowed = { NOT = { tag = TUR } } visible = { has_country_flag = is_UTS NOT = { has_country_flag = integrated_TUR } } highlight_states = { highlight_state_targets = { state = 158 state = 934 state = 155 state = 156 state = 157 state = 159 state = 160 state = 161 state = 1032 state = 992 state = 162 state = 163 state = 935 } } available = { TUR = { OR = { AND = { is_subject_of = ROOT has_war = no } all_core_state = { is_owned_and_controlled_by = ROOT } } } if = { limit = { NOT = { any_subject_country = { TUR = { all_core_state = { is_owned_and_controlled_by = PREV.PREV } } } } } custom_trigger_tooltip = { tooltip = general_integrate_tt check_variable = { core_compliance@TUR > 50 } check_variable = { core_resistance@TUR < 30 } } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision UTS_integrate_TUR" add_state_core = 158 add_state_core = 934 add_state_core = 155 add_state_core = 156 add_state_core = 157 add_state_core = 159 add_state_core = 160 add_state_core = 161 add_state_core = 1032 add_state_core = 992 add_state_core = 162 add_state_core = 163 add_state_core = 935 if = { limit = { country_exists = TUR TUR = { is_subject_of = ROOT all_owned_state = { OR = { state = 158 state = 934 state = 155 state = 156 state = 157 state = 159 state = 160 state = 161 state = 1032 state = 992 state = 162 state = 163 state = 935 } } } } TUR = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = TUR transfer_troops = yes } } if = { limit = { NOT = { owns_state = 158 } } transfer_state = 158 } if = { limit = { NOT = { owns_state = 934 } } transfer_state = 934 } if = { limit = { NOT = { owns_state = 155 } } transfer_state = 155 } if = { limit = { NOT = { owns_state = 156 } } transfer_state = 156 } if = { limit = { NOT = { owns_state = 157 } } transfer_state = 157 } if = { limit = { NOT = { owns_state = 159 } } transfer_state = 159 } if = { limit = { NOT = { owns_state = 160 } } transfer_state = 160 } if = { limit = { NOT = { owns_state = 161 } } transfer_state = 161 } if = { limit = { NOT = { owns_state = 1032 } } transfer_state = 1032 } if = { limit = { NOT = { owns_state = 992 } } transfer_state = 992 } if = { limit = { NOT = { owns_state = 162 } } transfer_state = 162 } if = { limit = { NOT = { owns_state = 163 } } transfer_state = 163 } if = { limit = { NOT = { owns_state = 935 } } transfer_state = 935 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_TUR } } ### Cosmetic ### UTS_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 10 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } visible = { has_country_flag = is_UTS NOT = { has_cosmetic_tag = UTS } } highlight_states = { highlight_state_targets = { state = 714 state = 715 state = 716 state = 717 state = 718 state = 719 state = 720 state = 721 state = 725 state = 726 state = 727 state = 728 state = 729 state = 1170 } } available = { custom_trigger_tooltip = { tooltip = UTS_update_flag_tt count_triggers = { amount = 11 714 = { is_core_of = ROOT } 715 = { is_core_of = ROOT } 716 = { is_core_of = ROOT } 717 = { is_core_of = ROOT } 718 = { is_core_of = ROOT } 719 = { is_core_of = ROOT } 720 = { is_core_of = ROOT } 721 = { is_core_of = ROOT } 725 = { is_core_of = ROOT } 726 = { is_core_of = ROOT } 727 = { is_core_of = ROOT } 728 = { is_core_of = ROOT } 729 = { is_core_of = ROOT } 1170 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision UTS_update_flag" set_cosmetic_tag = UTS remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 10 } set_variable = { formable_committed_size = 14 } } } } # Post-formation purchase of unowned cores UTS_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 10 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } visible = { has_country_flag = is_UTS } target_root_trigger = { has_country_flag = is_UTS } target_array = global.UTS_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision UTS_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel UTS_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove UTS_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } } # Form Maphilindo form_MAPHI_category = { ### Integrate (MAPHI) ### # Start integrate MAPHI_integrate_start = { icon = GFX_decision_generic_form_nation ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 11 } } check_variable = { var = formable_committed_size value = 42 compare = greater_than_or_equals } } } visible = { NOT = { has_country_flag = is_MAPHI } } highlight_states = { highlight_states_trigger = { OR = { is_core_of = IND is_core_of = ACE is_core_of = MAY is_core_of = BRU is_core_of = SIN is_core_of = PHI } } } available = { custom_trigger_tooltip = { tooltip = MAPHI_integrate_trigger_tt count_triggers = { amount = 34 525 = { state_owned_or_puppet_owned_by_root = yes } 527 = { state_owned_or_puppet_owned_by_root = yes } 528 = { state_owned_or_puppet_owned_by_root = yes } 529 = { state_owned_or_puppet_owned_by_root = yes } 530 = { state_owned_or_puppet_owned_by_root = yes } 622 = { state_owned_or_puppet_owned_by_root = yes } 623 = { state_owned_or_puppet_owned_by_root = yes } 627 = { state_owned_or_puppet_owned_by_root = yes } 629 = { state_owned_or_puppet_owned_by_root = yes } 631 = { state_owned_or_puppet_owned_by_root = yes } 634 = { state_owned_or_puppet_owned_by_root = yes } 635 = { state_owned_or_puppet_owned_by_root = yes } 636 = { state_owned_or_puppet_owned_by_root = yes } 637 = { state_owned_or_puppet_owned_by_root = yes } 638 = { state_owned_or_puppet_owned_by_root = yes } 639 = { state_owned_or_puppet_owned_by_root = yes } 640 = { state_owned_or_puppet_owned_by_root = yes } 735 = { state_owned_or_puppet_owned_by_root = yes } 736 = { state_owned_or_puppet_owned_by_root = yes } 737 = { state_owned_or_puppet_owned_by_root = yes } 738 = { state_owned_or_puppet_owned_by_root = yes } 739 = { state_owned_or_puppet_owned_by_root = yes } 740 = { state_owned_or_puppet_owned_by_root = yes } 752 = { state_owned_or_puppet_owned_by_root = yes } 936 = { state_owned_or_puppet_owned_by_root = yes } 1016 = { state_owned_or_puppet_owned_by_root = yes } 1113 = { state_owned_or_puppet_owned_by_root = yes } 1114 = { state_owned_or_puppet_owned_by_root = yes } 1185 = { state_owned_or_puppet_owned_by_root = yes } 1227 = { state_owned_or_puppet_owned_by_root = yes } 1228 = { state_owned_or_puppet_owned_by_root = yes } 1229 = { state_owned_or_puppet_owned_by_root = yes } 1230 = { state_owned_or_puppet_owned_by_root = yes } 1231 = { state_owned_or_puppet_owned_by_root = yes } 1232 = { state_owned_or_puppet_owned_by_root = yes } 1233 = { state_owned_or_puppet_owned_by_root = yes } 1234 = { state_owned_or_puppet_owned_by_root = yes } 1235 = { state_owned_or_puppet_owned_by_root = yes } 1236 = { state_owned_or_puppet_owned_by_root = yes } 1237 = { state_owned_or_puppet_owned_by_root = yes } 1238 = { state_owned_or_puppet_owned_by_root = yes } 1239 = { state_owned_or_puppet_owned_by_root = yes } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision MAPHI_integrate_start" if = { limit = { NOT = { has_country_flag = is_MAPHI } } set_country_flag = is_MAPHI set_global_flag = MAPHI_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } custom_effect_tooltip = MAPHI_start_integrate_tt custom_effect_tooltip = general_integrate_tt add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 11 } set_variable = { formable_committed_size = 42 } } } } #IND MAPHI_integrate_IND = { icon = GFX_decision_generic_form_nation cost = 750 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 11 } } check_variable = { var = formable_committed_size value = 42 compare = greater_than_or_equals } } } allowed = { NOT = { tag = IND } } visible = { has_country_flag = is_MAPHI NOT = { has_country_flag = integrated_IND } } highlight_states = { highlight_state_targets = { state = 623 state = 627 state = 629 state = 631 state = 634 state = 635 state = 636 state = 637 state = 638 state = 639 state = 640 state = 936 state = 1113 state = 1114 state = 1185 } } available = { custom_trigger_tooltip = { tooltip = MAPHI_integrate_IND_tt 623 = { state_owned_or_puppet_owned_by_root = yes } 627 = { state_owned_or_puppet_owned_by_root = yes } 629 = { state_owned_or_puppet_owned_by_root = yes } 631 = { state_owned_or_puppet_owned_by_root = yes } 634 = { state_owned_or_puppet_owned_by_root = yes } 635 = { state_owned_or_puppet_owned_by_root = yes } 636 = { state_owned_or_puppet_owned_by_root = yes } 637 = { state_owned_or_puppet_owned_by_root = yes } 638 = { state_owned_or_puppet_owned_by_root = yes } 639 = { state_owned_or_puppet_owned_by_root = yes } 640 = { state_owned_or_puppet_owned_by_root = yes } 936 = { state_owned_or_puppet_owned_by_root = yes } 1113 = { state_owned_or_puppet_owned_by_root = yes } 1114 = { state_owned_or_puppet_owned_by_root = yes } 1185 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision MAPHI_integrate_IND" add_state_core = 623 add_state_core = 627 add_state_core = 629 add_state_core = 631 add_state_core = 634 add_state_core = 635 add_state_core = 636 add_state_core = 637 add_state_core = 638 add_state_core = 639 add_state_core = 640 add_state_core = 936 add_state_core = 1113 add_state_core = 1114 add_state_core = 1185 if = { limit = { country_exists = IND IND = { is_subject_of = ROOT all_owned_state = { OR = { state = 623 state = 627 state = 629 state = 631 state = 634 state = 635 state = 636 state = 637 state = 638 state = 639 state = 640 state = 936 state = 1113 state = 1114 state = 1185 } } } } IND = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = IND transfer_troops = yes } } if = { limit = { NOT = { owns_state = 623 } } transfer_state = 623 } if = { limit = { NOT = { owns_state = 627 } } transfer_state = 627 } if = { limit = { NOT = { owns_state = 629 } } transfer_state = 629 } if = { limit = { NOT = { owns_state = 631 } } transfer_state = 631 } if = { limit = { NOT = { owns_state = 634 } } transfer_state = 634 } if = { limit = { NOT = { owns_state = 635 } } transfer_state = 635 } if = { limit = { NOT = { owns_state = 636 } } transfer_state = 636 } if = { limit = { NOT = { owns_state = 637 } } transfer_state = 637 } if = { limit = { NOT = { owns_state = 638 } } transfer_state = 638 } if = { limit = { NOT = { owns_state = 639 } } transfer_state = 639 } if = { limit = { NOT = { owns_state = 640 } } transfer_state = 640 } if = { limit = { NOT = { owns_state = 936 } } transfer_state = 936 } if = { limit = { NOT = { owns_state = 1113 } } transfer_state = 1113 } if = { limit = { NOT = { owns_state = 1114 } } transfer_state = 1114 } if = { limit = { NOT = { owns_state = 1185 } } transfer_state = 1185 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_IND } } #PHI MAPHI_integrate_PHI = { icon = GFX_decision_generic_form_nation cost = 500 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 11 } } check_variable = { var = formable_committed_size value = 42 compare = greater_than_or_equals } } } allowed = { NOT = { tag = PHI } } visible = { has_country_flag = is_MAPHI NOT = { has_country_flag = integrated_PHI } } highlight_states = { highlight_state_targets = { state = 735 state = 736 state = 737 state = 738 state = 739 state = 740 state = 1227 state = 1228 state = 1229 state = 1230 state = 1231 state = 1232 state = 1233 state = 1234 state = 1235 state = 1236 state = 1237 state = 1238 state = 1239 } } available = { custom_trigger_tooltip = { tooltip = MAPHI_integrate_PHI_tt 735 = { state_owned_or_puppet_owned_by_root = yes } 736 = { state_owned_or_puppet_owned_by_root = yes } 737 = { state_owned_or_puppet_owned_by_root = yes } 738 = { state_owned_or_puppet_owned_by_root = yes } 739 = { state_owned_or_puppet_owned_by_root = yes } 740 = { state_owned_or_puppet_owned_by_root = yes } 1227 = { state_owned_or_puppet_owned_by_root = yes } 1228 = { state_owned_or_puppet_owned_by_root = yes } 1229 = { state_owned_or_puppet_owned_by_root = yes } 1230 = { state_owned_or_puppet_owned_by_root = yes } 1231 = { state_owned_or_puppet_owned_by_root = yes } 1232 = { state_owned_or_puppet_owned_by_root = yes } 1233 = { state_owned_or_puppet_owned_by_root = yes } 1234 = { state_owned_or_puppet_owned_by_root = yes } 1235 = { state_owned_or_puppet_owned_by_root = yes } 1236 = { state_owned_or_puppet_owned_by_root = yes } 1237 = { state_owned_or_puppet_owned_by_root = yes } 1238 = { state_owned_or_puppet_owned_by_root = yes } 1239 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision MAPHI_integrate_PHI" add_state_core = 735 add_state_core = 736 add_state_core = 737 add_state_core = 738 add_state_core = 739 add_state_core = 740 add_state_core = 1227 add_state_core = 1228 add_state_core = 1229 add_state_core = 1230 add_state_core = 1231 add_state_core = 1232 add_state_core = 1233 add_state_core = 1234 add_state_core = 1235 add_state_core = 1236 add_state_core = 1237 add_state_core = 1238 add_state_core = 1239 if = { limit = { country_exists = PHI PHI = { is_subject_of = ROOT all_owned_state = { OR = { state = 735 state = 736 state = 737 state = 738 state = 739 state = 740 state = 1227 state = 1228 state = 1229 state = 1230 state = 1231 state = 1232 state = 1233 state = 1234 state = 1235 state = 1236 state = 1237 state = 1238 state = 1239 } } } } PHI = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = PHI transfer_troops = yes } } if = { limit = { NOT = { owns_state = 735 } } transfer_state = 735 } if = { limit = { NOT = { owns_state = 736 } } transfer_state = 736 } if = { limit = { NOT = { owns_state = 737 } } transfer_state = 737 } if = { limit = { NOT = { owns_state = 738 } } transfer_state = 738 } if = { limit = { NOT = { owns_state = 739 } } transfer_state = 739 } if = { limit = { NOT = { owns_state = 740 } } transfer_state = 740 } if = { limit = { NOT = { owns_state = 1227 } } transfer_state = 1227 } if = { limit = { NOT = { owns_state = 1228 } } transfer_state = 1228 } if = { limit = { NOT = { owns_state = 1229 } } transfer_state = 1229 } if = { limit = { NOT = { owns_state = 1230 } } transfer_state = 1230 } if = { limit = { NOT = { owns_state = 1231 } } transfer_state = 1231 } if = { limit = { NOT = { owns_state = 1232 } } transfer_state = 1232 } if = { limit = { NOT = { owns_state = 1233 } } transfer_state = 1233 } if = { limit = { NOT = { owns_state = 1234 } } transfer_state = 1234 } if = { limit = { NOT = { owns_state = 1235 } } transfer_state = 1235 } if = { limit = { NOT = { owns_state = 1236 } } transfer_state = 1236 } if = { limit = { NOT = { owns_state = 1237 } } transfer_state = 1237 } if = { limit = { NOT = { owns_state = 1238 } } transfer_state = 1238 } if = { limit = { NOT = { owns_state = 1239 } } transfer_state = 1239 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_PHI } } #SIN MAPHI_integrate_SIN = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 11 } } check_variable = { var = formable_committed_size value = 42 compare = greater_than_or_equals } } } allowed = { NOT = { tag = SIN } } visible = { has_country_flag = is_MAPHI NOT = { has_country_flag = integrated_SIN } } highlight_states = { highlight_state_targets = { state = 530 } } available = { custom_trigger_tooltip = { tooltip = MAPHI_integrate_SIN_tt 530 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision MAPHI_integrate_SIN" add_state_core = 530 if = { limit = { country_exists = SIN SIN = { is_subject_of = ROOT all_owned_state = { state = 530 } } } SIN = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = SIN transfer_troops = yes } } if = { limit = { NOT = { owns_state = 530 } } transfer_state = 530 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_SIN } } #MAY MAPHI_integrate_MAY = { icon = GFX_decision_generic_form_nation cost = 450 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 11 } } check_variable = { var = formable_committed_size value = 42 compare = greater_than_or_equals } } } allowed = { NOT = { tag = MAY } } visible = { has_country_flag = is_MAPHI NOT = { has_country_flag = integrated_MAY } } highlight_states = { highlight_state_targets = { state = 525 state = 527 state = 528 state = 529 state = 627 state = 1016 } } available = { custom_trigger_tooltip = { tooltip = MAPHI_integrate_MAY_tt 525 = { state_owned_or_puppet_owned_by_root = yes } 527 = { state_owned_or_puppet_owned_by_root = yes } 528 = { state_owned_or_puppet_owned_by_root = yes } 529 = { state_owned_or_puppet_owned_by_root = yes } 627 = { state_owned_or_puppet_owned_by_root = yes } 1016 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision MAPHI_integrate_MAY" add_state_core = 525 add_state_core = 527 add_state_core = 528 add_state_core = 529 add_state_core = 627 add_state_core = 1016 if = { limit = { country_exists = MAY MAY = { is_subject_of = ROOT all_owned_state = { OR = { state = 525 state = 527 state = 528 state = 529 state = 627 state = 1016 } } } } MAY = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = MAY transfer_troops = yes } } if = { limit = { NOT = { owns_state = 525 } } transfer_state = 525 } if = { limit = { NOT = { owns_state = 527 } } transfer_state = 527 } if = { limit = { NOT = { owns_state = 528 } } transfer_state = 528 } if = { limit = { NOT = { owns_state = 529 } } transfer_state = 529 } if = { limit = { NOT = { owns_state = 627 } } transfer_state = 627 } if = { limit = { NOT = { owns_state = 1016 } } transfer_state = 1016 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_MAY } } #BRU MAPHI_integrate_BRU = { icon = GFX_decision_generic_form_nation cost = 200 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 11 } } check_variable = { var = formable_committed_size value = 42 compare = greater_than_or_equals } } } allowed = { NOT = { tag = BRU } } visible = { has_country_flag = is_MAPHI NOT = { has_country_flag = integrated_BRU } } highlight_states = { highlight_state_targets = { state = 752 } } available = { custom_trigger_tooltip = { tooltip = MAPHI_integrate_BRU_tt 752 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision MAPHI_integrate_BRU" add_state_core = 752 if = { limit = { country_exists = BRU BRU = { is_subject_of = ROOT all_owned_state = { state = 752 } } } BRU = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = BRU transfer_troops = yes } } if = { limit = { NOT = { owns_state = 752 } } transfer_state = 752 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_BRU } } ### Cosmetic ### MAPHI_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 11 } } check_variable = { var = formable_committed_size value = 42 compare = greater_than_or_equals } } } visible = { has_country_flag = is_MAPHI NOT = { has_cosmetic_tag = MAPHI } } highlight_states = { highlight_state_targets = { state = 525 state = 527 state = 528 state = 529 state = 530 state = 622 state = 623 state = 627 state = 629 state = 631 state = 634 state = 635 state = 636 state = 637 state = 638 state = 639 state = 640 state = 735 state = 736 state = 737 state = 738 state = 739 state = 740 state = 752 state = 936 state = 1016 state = 1113 state = 1114 state = 1185 state = 1227 state = 1228 state = 1229 state = 1230 state = 1231 state = 1232 state = 1233 state = 1234 state = 1235 state = 1236 state = 1237 state = 1238 state = 1239 } } available = { custom_trigger_tooltip = { tooltip = MAPHI_update_flag_tt count_triggers = { amount = 34 525 = { is_core_of = ROOT } 527 = { is_core_of = ROOT } 528 = { is_core_of = ROOT } 529 = { is_core_of = ROOT } 530 = { is_core_of = ROOT } 622 = { is_core_of = ROOT } 623 = { is_core_of = ROOT } 627 = { is_core_of = ROOT } 629 = { is_core_of = ROOT } 631 = { is_core_of = ROOT } 634 = { is_core_of = ROOT } 635 = { is_core_of = ROOT } 636 = { is_core_of = ROOT } 637 = { is_core_of = ROOT } 638 = { is_core_of = ROOT } 639 = { is_core_of = ROOT } 640 = { is_core_of = ROOT } 735 = { is_core_of = ROOT } 736 = { is_core_of = ROOT } 737 = { is_core_of = ROOT } 738 = { is_core_of = ROOT } 739 = { is_core_of = ROOT } 740 = { is_core_of = ROOT } 752 = { is_core_of = ROOT } 936 = { is_core_of = ROOT } 1016 = { is_core_of = ROOT } 1113 = { is_core_of = ROOT } 1114 = { is_core_of = ROOT } 1185 = { is_core_of = ROOT } 1227 = { is_core_of = ROOT } 1228 = { is_core_of = ROOT } 1229 = { is_core_of = ROOT } 1230 = { is_core_of = ROOT } 1231 = { is_core_of = ROOT } 1232 = { is_core_of = ROOT } 1233 = { is_core_of = ROOT } 1234 = { is_core_of = ROOT } 1235 = { is_core_of = ROOT } 1236 = { is_core_of = ROOT } 1237 = { is_core_of = ROOT } 1238 = { is_core_of = ROOT } 1239 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision MAPHI_update_flag" set_cosmetic_tag = MAPHI remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 11 } set_variable = { formable_committed_size = 42 } } } } # Post-formation purchase of unowned cores MAPHI_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 11 } } check_variable = { var = formable_committed_size value = 42 compare = greater_than_or_equals } } } visible = { has_country_flag = is_MAPHI } target_root_trigger = { has_country_flag = is_MAPHI } target_array = global.MAPHI_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision MAPHI_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel MAPHI_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove MAPHI_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } } form_INDOCHI_category = { ### Integrate (INDOCHI) ### # Start integrate INDOCHI_integrate_start = { icon = GFX_decision_generic_form_nation ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 12 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } visible = { NOT = { has_country_flag = is_INDOCHI } } highlight_states = { highlight_states_trigger = { OR = { is_core_of = VIE is_core_of = LAO is_core_of = CBD } } } available = { custom_trigger_tooltip = { tooltip = INDOCHI_integrate_trigger_tt count_triggers = { amount = 11 511 = { state_owned_or_puppet_owned_by_root = yes } 512 = { state_owned_or_puppet_owned_by_root = yes } 513 = { state_owned_or_puppet_owned_by_root = yes } 514 = { state_owned_or_puppet_owned_by_root = yes } 515 = { state_owned_or_puppet_owned_by_root = yes } 516 = { state_owned_or_puppet_owned_by_root = yes } 517 = { state_owned_or_puppet_owned_by_root = yes } 518 = { state_owned_or_puppet_owned_by_root = yes } 519 = { state_owned_or_puppet_owned_by_root = yes } 520 = { state_owned_or_puppet_owned_by_root = yes } 521 = { state_owned_or_puppet_owned_by_root = yes } 522 = { state_owned_or_puppet_owned_by_root = yes } 523 = { state_owned_or_puppet_owned_by_root = yes } 524 = { state_owned_or_puppet_owned_by_root = yes } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision INDOCHI_integrate_start" if = { limit = { NOT = { has_country_flag = is_INDOCHI } } set_country_flag = is_INDOCHI set_global_flag = INDOCHI_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_@ROOT custom_effect_tooltip = INDOCHI_start_integrate_tt custom_effect_tooltip = general_integrate_tt add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 12 } set_variable = { formable_committed_size = 14 } } } } #VIE INDOCHI_integrate_VIE = { icon = GFX_decision_generic_form_nation cost = 500 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 12 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } allowed = { NOT = { tag = VIE } } visible = { has_country_flag = is_INDOCHI NOT = { has_country_flag = integrated_VIE } } highlight_states = { highlight_state_targets = { state = 518 state = 519 state = 520 state = 521 state = 522 state = 523 state = 524 } } available = { custom_trigger_tooltip = { tooltip = INDOCHI_integrate_VIE_tt 518 = { state_owned_or_puppet_owned_by_root = yes } 519 = { state_owned_or_puppet_owned_by_root = yes } 520 = { state_owned_or_puppet_owned_by_root = yes } 521 = { state_owned_or_puppet_owned_by_root = yes } 522 = { state_owned_or_puppet_owned_by_root = yes } 523 = { state_owned_or_puppet_owned_by_root = yes } 524 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision INDOCHI_integrate_VIE" add_state_core = 518 add_state_core = 519 add_state_core = 520 add_state_core = 521 add_state_core = 522 add_state_core = 523 add_state_core = 524 if = { limit = { country_exists = VIE VIE = { is_subject_of = ROOT all_owned_state = { OR = { state = 518 state = 519 state = 520 state = 521 state = 522 state = 523 state = 524 } } } } VIE = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = VIE transfer_troops = yes } } if = { limit = { NOT = { owns_state = 518 } } transfer_state = 518 } if = { limit = { NOT = { owns_state = 519 } } transfer_state = 519 } if = { limit = { NOT = { owns_state = 520 } } transfer_state = 520 } if = { limit = { NOT = { owns_state = 521 } } transfer_state = 521 } if = { limit = { NOT = { owns_state = 522 } } transfer_state = 522 } if = { limit = { NOT = { owns_state = 523 } } transfer_state = 523 } if = { limit = { NOT = { owns_state = 524 } } transfer_state = 524 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_VIE } } #LAO INDOCHI_integrate_LAO = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 12 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } allowed = { NOT = { tag = LAO } } visible = { has_country_flag = is_INDOCHI NOT = { has_country_flag = integrated_LAO } } highlight_states = { highlight_state_targets = { state = 515 state = 516 state = 517 } } available = { custom_trigger_tooltip = { tooltip = INDOCHI_integrate_LAO_tt 515 = { state_owned_or_puppet_owned_by_root = yes } 516 = { state_owned_or_puppet_owned_by_root = yes } 517 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision INDOCHI_integrate_LAO" add_state_core = 515 add_state_core = 516 add_state_core = 517 if = { limit = { country_exists = LAO LAO = { is_subject_of = ROOT all_owned_state = { OR = { state = 515 state = 516 state = 517 } } } } LAO = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = LAO transfer_troops = yes } } if = { limit = { NOT = { owns_state = 515 } } transfer_state = 515 } if = { limit = { NOT = { owns_state = 516 } } transfer_state = 516 } if = { limit = { NOT = { owns_state = 517 } } transfer_state = 517 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_LAO } } #CBD INDOCHI_integrate_CBD = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 12 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } allowed = { NOT = { tag = CBD } } visible = { has_country_flag = is_INDOCHI NOT = { has_country_flag = integrated_CBD } } highlight_states = { highlight_state_targets = { state = 511 state = 512 state = 513 state = 514 } } available = { custom_trigger_tooltip = { tooltip = INDOCHI_integrate_CBD_tt 511 = { state_owned_or_puppet_owned_by_root = yes } 512 = { state_owned_or_puppet_owned_by_root = yes } 513 = { state_owned_or_puppet_owned_by_root = yes } 514 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision INDOCHI_integrate_CBD" add_state_core = 511 add_state_core = 512 add_state_core = 513 add_state_core = 514 if = { limit = { country_exists = CBD CBD = { is_subject_of = ROOT all_owned_state = { OR = { state = 511 state = 512 state = 513 state = 514 } } } } CBD = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = CBD transfer_troops = yes } } if = { limit = { NOT = { owns_state = 511 } } transfer_state = 511 } if = { limit = { NOT = { owns_state = 512 } } transfer_state = 512 } if = { limit = { NOT = { owns_state = 513 } } transfer_state = 513 } if = { limit = { NOT = { owns_state = 514 } } transfer_state = 514 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_CBD } } ### Cosmetic ### INDOCHI_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 12 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } visible = { has_country_flag = is_INDOCHI NOT = { has_cosmetic_tag = INDOCHI } } highlight_states = { highlight_state_targets = { state = 511 state = 512 state = 513 state = 514 state = 515 state = 516 state = 517 state = 518 state = 519 state = 520 state = 521 state = 522 state = 523 state = 524 } } available = { custom_trigger_tooltip = { tooltip = INDOCHI_update_flag_tt count_triggers = { amount = 11 511 = { is_core_of = ROOT } 512 = { is_core_of = ROOT } 513 = { is_core_of = ROOT } 514 = { is_core_of = ROOT } 515 = { is_core_of = ROOT } 516 = { is_core_of = ROOT } 517 = { is_core_of = ROOT } 518 = { is_core_of = ROOT } 519 = { is_core_of = ROOT } 520 = { is_core_of = ROOT } 521 = { is_core_of = ROOT } 522 = { is_core_of = ROOT } 523 = { is_core_of = ROOT } 524 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision INDOCHI_update_flag" set_cosmetic_tag = INDOCHI remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 12 } set_variable = { formable_committed_size = 14 } } } } # Post-formation purchase of unowned cores INDOCHI_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 12 } } check_variable = { var = formable_committed_size value = 14 compare = greater_than_or_equals } } } visible = { has_country_flag = is_INDOCHI } target_root_trigger = { has_country_flag = is_INDOCHI } target_array = global.INDOCHI_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision INDOCHI_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel INDOCHI_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove INDOCHI_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } } form_ANDES_category = { ### Integrate (ANDES) ### # Start integrate ANDES_integrate_start = { icon = GFX_decision_generic_form_nation ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 13 } } check_variable = { var = formable_committed_size value = 16 compare = greater_than_or_equals } } } visible = { NOT = { has_country_flag = is_ANDES } } highlight_states = { highlight_states_trigger = { OR = { is_core_of = COL is_core_of = PRU is_core_of = BOL } } } available = { custom_trigger_tooltip = { tooltip = ANDES_integrate_trigger_tt count_triggers = { amount = 13 870 = { state_owned_or_puppet_owned_by_root = yes } 871 = { state_owned_or_puppet_owned_by_root = yes } 872 = { state_owned_or_puppet_owned_by_root = yes } 873 = { state_owned_or_puppet_owned_by_root = yes } 897 = { state_owned_or_puppet_owned_by_root = yes } 898 = { state_owned_or_puppet_owned_by_root = yes } 899 = { state_owned_or_puppet_owned_by_root = yes } 900 = { state_owned_or_puppet_owned_by_root = yes } 901 = { state_owned_or_puppet_owned_by_root = yes } 902 = { state_owned_or_puppet_owned_by_root = yes } 903 = { state_owned_or_puppet_owned_by_root = yes } 904 = { state_owned_or_puppet_owned_by_root = yes } 911 = { state_owned_or_puppet_owned_by_root = yes } 912 = { state_owned_or_puppet_owned_by_root = yes } 913 = { state_owned_or_puppet_owned_by_root = yes } 914 = { state_owned_or_puppet_owned_by_root = yes } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision ANDES_integrate_start" if = { limit = { NOT = { has_country_flag = is_ANDES } } set_country_flag = is_ANDES set_global_flag = ANDES_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_@ROOT custom_effect_tooltip = ANDES_start_integrate_tt custom_effect_tooltip = general_integrate_tt add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 13 } set_variable = { formable_committed_size = 16 } } } } #COL ANDES_integrate_COL = { icon = GFX_decision_generic_form_nation cost = 400 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 13 } } check_variable = { var = formable_committed_size value = 16 compare = greater_than_or_equals } } } allowed = { NOT = { tag = COL } } visible = { has_country_flag = is_ANDES NOT = { has_country_flag = integrated_COL } } highlight_states = { highlight_state_targets = { state = 870 state = 871 state = 872 state = 873 state = 911 state = 912 state = 913 state = 914 } } available = { custom_trigger_tooltip = { tooltip = ANDES_integrate_COL_tt 870 = { state_owned_or_puppet_owned_by_root = yes } 871 = { state_owned_or_puppet_owned_by_root = yes } 872 = { state_owned_or_puppet_owned_by_root = yes } 873 = { state_owned_or_puppet_owned_by_root = yes } 911 = { state_owned_or_puppet_owned_by_root = yes } 912 = { state_owned_or_puppet_owned_by_root = yes } 913 = { state_owned_or_puppet_owned_by_root = yes } 914 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision ANDES_integrate_COL" add_state_core = 870 add_state_core = 871 add_state_core = 872 add_state_core = 873 add_state_core = 911 add_state_core = 912 add_state_core = 913 add_state_core = 914 if = { limit = { country_exists = COL COL = { is_subject_of = ROOT all_owned_state = { OR = { state = 870 state = 871 state = 872 state = 873 state = 911 state = 912 state = 913 state = 914 } } } } COL = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = COL transfer_troops = yes } } if = { limit = { NOT = { owns_state = 870 } } transfer_state = 870 } if = { limit = { NOT = { owns_state = 871 } } transfer_state = 871 } if = { limit = { NOT = { owns_state = 872 } } transfer_state = 872 } if = { limit = { NOT = { owns_state = 873 } } transfer_state = 873 } if = { limit = { NOT = { owns_state = 911 } } transfer_state = 911 } if = { limit = { NOT = { owns_state = 912 } } transfer_state = 912 } if = { limit = { NOT = { owns_state = 913 } } transfer_state = 913 } if = { limit = { NOT = { owns_state = 914 } } transfer_state = 914 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_COL } } #PRU ANDES_integrate_PRU = { icon = GFX_decision_generic_form_nation cost = 350 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 13 } } check_variable = { var = formable_committed_size value = 16 compare = greater_than_or_equals } } } allowed = { NOT = { tag = PRU } } visible = { has_country_flag = is_ANDES NOT = { has_country_flag = integrated_PRU } } highlight_states = { highlight_state_targets = { state = 900 state = 901 state = 902 state = 903 state = 904 } } available = { custom_trigger_tooltip = { tooltip = ANDES_integrate_PRU_tt 900 = { state_owned_or_puppet_owned_by_root = yes } 901 = { state_owned_or_puppet_owned_by_root = yes } 902 = { state_owned_or_puppet_owned_by_root = yes } 903 = { state_owned_or_puppet_owned_by_root = yes } 904 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision ANDES_integrate_PRU" add_state_core = 900 add_state_core = 901 add_state_core = 902 add_state_core = 903 add_state_core = 904 if = { limit = { country_exists = PRU PRU = { is_subject_of = ROOT all_owned_state = { OR = { state = 900 state = 901 state = 902 state = 903 state = 904 } } } } PRU = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = PRU transfer_troops = yes } } if = { limit = { NOT = { owns_state = 900 } } transfer_state = 900 } if = { limit = { NOT = { owns_state = 901 } } transfer_state = 901 } if = { limit = { NOT = { owns_state = 902 } } transfer_state = 902 } if = { limit = { NOT = { owns_state = 903 } } transfer_state = 903 } if = { limit = { NOT = { owns_state = 904 } } transfer_state = 904 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_PRU } } #BOL ANDES_integrate_BOL = { icon = GFX_decision_generic_form_nation cost = 250 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 13 } } check_variable = { var = formable_committed_size value = 16 compare = greater_than_or_equals } } } allowed = { NOT = { tag = BOL } } visible = { has_country_flag = is_ANDES NOT = { has_country_flag = integrated_BOL } } highlight_states = { highlight_state_targets = { state = 897 state = 898 state = 899 } } available = { custom_trigger_tooltip = { tooltip = ANDES_integrate_BOL_tt 897 = { state_owned_or_puppet_owned_by_root = yes } 898 = { state_owned_or_puppet_owned_by_root = yes } 899 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision ANDES_integrate_BOL" add_state_core = 897 add_state_core = 898 add_state_core = 899 if = { limit = { country_exists = BOL BOL = { is_subject_of = ROOT all_owned_state = { OR = { state = 897 state = 898 state = 899 } } } } BOL = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = BOL transfer_troops = yes } } if = { limit = { NOT = { owns_state = 897 } } transfer_state = 897 } if = { limit = { NOT = { owns_state = 898 } } transfer_state = 898 } if = { limit = { NOT = { owns_state = 899 } } transfer_state = 899 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_BOL } } ### Cosmetic ### ANDES_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 13 } } check_variable = { var = formable_committed_size value = 16 compare = greater_than_or_equals } } } visible = { has_country_flag = is_ANDES NOT = { has_cosmetic_tag = ANDES } } highlight_states = { highlight_state_targets = { state = 870 state = 871 state = 872 state = 873 state = 897 state = 898 state = 899 state = 900 state = 901 state = 902 state = 903 state = 904 state = 911 state = 912 state = 913 state = 914 } } available = { custom_trigger_tooltip = { tooltip = ANDES_update_flag_tt count_triggers = { amount = 13 870 = { is_core_of = ROOT } 871 = { is_core_of = ROOT } 872 = { is_core_of = ROOT } 873 = { is_core_of = ROOT } 897 = { is_core_of = ROOT } 898 = { is_core_of = ROOT } 899 = { is_core_of = ROOT } 900 = { is_core_of = ROOT } 901 = { is_core_of = ROOT } 902 = { is_core_of = ROOT } 903 = { is_core_of = ROOT } 904 = { is_core_of = ROOT } 911 = { is_core_of = ROOT } 912 = { is_core_of = ROOT } 913 = { is_core_of = ROOT } 914 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision ANDES_update_flag" set_cosmetic_tag = ANDES remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 13 } set_variable = { formable_committed_size = 16 } } } } # Post-formation purchase of unowned cores ANDES_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 13 } } check_variable = { var = formable_committed_size value = 16 compare = greater_than_or_equals } } } visible = { has_country_flag = is_ANDES } target_root_trigger = { has_country_flag = is_ANDES } target_array = global.ANDES_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision ANDES_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel ANDES_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove ANDES_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } } form_ANTCONF_category = { ### Integrate (ANTCONF) ### # Start integrate ANTCONF_integrate_start = { icon = GFX_decision_generic_form_nation ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 14 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } visible = { NOT = { has_country_flag = is_ANTCONF } } highlight_states = { highlight_states_trigger = { OR = { is_core_of = CUB is_core_of = DOM is_core_of = HAI is_core_of = PTR } } } available = { custom_trigger_tooltip = { tooltip = ANTCONF_integrate_trigger_tt count_triggers = { amount = 7 424 = { state_owned_or_puppet_owned_by_root = yes } 815 = { state_owned_or_puppet_owned_by_root = yes } 854 = { state_owned_or_puppet_owned_by_root = yes } 855 = { state_owned_or_puppet_owned_by_root = yes } 859 = { state_owned_or_puppet_owned_by_root = yes } 860 = { state_owned_or_puppet_owned_by_root = yes } 861 = { state_owned_or_puppet_owned_by_root = yes } 862 = { state_owned_or_puppet_owned_by_root = yes } 1121 = { state_owned_or_puppet_owned_by_root = yes } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision ANTCONF_integrate_start" if = { limit = { NOT = { has_country_flag = is_ANTCONF } } set_country_flag = is_ANTCONF set_global_flag = ANTCONF_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_@ROOT custom_effect_tooltip = ANTCONF_start_integrate_tt custom_effect_tooltip = general_integrate_tt add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 14 } set_variable = { formable_committed_size = 9 } } } } #CUB ANTCONF_integrate_CUB = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 14 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } allowed = { NOT = { tag = CUB } } visible = { has_country_flag = is_ANTCONF NOT = { has_country_flag = integrated_CUB } } highlight_states = { highlight_state_targets = { state = 424 state = 854 state = 855 state = 1121 } } available = { custom_trigger_tooltip = { tooltip = ANTCONF_integrate_CUB_tt 424 = { state_owned_or_puppet_owned_by_root = yes } 854 = { state_owned_or_puppet_owned_by_root = yes } 855 = { state_owned_or_puppet_owned_by_root = yes } 1121 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision ANTCONF_integrate_CUB" add_state_core = 424 add_state_core = 854 add_state_core = 855 add_state_core = 1121 if = { limit = { country_exists = CUB CUB = { is_subject_of = ROOT all_owned_state = { OR = { state = 424 state = 854 state = 855 state = 1121 } } } } CUB = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = CUB transfer_troops = yes } } if = { limit = { NOT = { owns_state = 424 } } transfer_state = 424 } if = { limit = { NOT = { owns_state = 854 } } transfer_state = 854 } if = { limit = { NOT = { owns_state = 855 } } transfer_state = 855 } if = { limit = { NOT = { owns_state = 1121 } } transfer_state = 1121 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_CUB } } #DOM ANTCONF_integrate_DOM = { icon = GFX_decision_generic_form_nation cost = 250 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 14 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } allowed = { NOT = { tag = DOM } } visible = { has_country_flag = is_ANTCONF NOT = { has_country_flag = integrated_DOM } } highlight_states = { highlight_state_targets = { state = 861 state = 862 } } available = { custom_trigger_tooltip = { tooltip = ANTCONF_integrate_DOM_tt 861 = { state_owned_or_puppet_owned_by_root = yes } 862 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision ANTCONF_integrate_DOM" add_state_core = 861 add_state_core = 862 if = { limit = { country_exists = DOM DOM = { is_subject_of = ROOT all_owned_state = { OR = { state = 861 state = 862 } } } } DOM = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = DOM transfer_troops = yes } } if = { limit = { NOT = { owns_state = 861 } } transfer_state = 861 } if = { limit = { NOT = { owns_state = 862 } } transfer_state = 862 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_DOM } } #HAI ANTCONF_integrate_HAI = { icon = GFX_decision_generic_form_nation cost = 250 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 14 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } allowed = { NOT = { tag = HAI } } visible = { has_country_flag = is_ANTCONF NOT = { has_country_flag = integrated_HAI } } highlight_states = { highlight_state_targets = { state = 859 state = 860 } } available = { custom_trigger_tooltip = { tooltip = ANTCONF_integrate_HAI_tt 859 = { state_owned_or_puppet_owned_by_root = yes } 860 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision ANTCONF_integrate_HAI" add_state_core = 859 add_state_core = 860 if = { limit = { country_exists = HAI HAI = { is_subject_of = ROOT all_owned_state = { OR = { state = 859 state = 860 } } } } HAI = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = HAI transfer_troops = yes } } if = { limit = { NOT = { owns_state = 859 } } transfer_state = 859 } if = { limit = { NOT = { owns_state = 860 } } transfer_state = 860 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_HAI } } ANTCONF_integrate_PTR = { icon = GFX_decision_generic_form_nation cost = 250 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 14 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } allowed = { NOT = { tag = PTR } } visible = { has_country_flag = is_ANTCONF NOT = { has_country_flag = integrated_PTR } } highlight_states = { highlight_state_targets = { state = 815 } } available = { custom_trigger_tooltip = { tooltip = ANTCONF_integrate_PTR_tt 815 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision ANTCONF_integrate_PTR" add_state_core = 815 if = { limit = { country_exists = PTR PTR = { is_subject_of = ROOT all_owned_state = { state = 815 } } } PTR = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = PTR transfer_troops = yes } } if = { limit = { NOT = { owns_state = 815 } } transfer_state = 815 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_PTR } } ### Cosmetic ### ANTCONF_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 14 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } visible = { has_country_flag = is_ANTCONF NOT = { has_cosmetic_tag = ANTCONF } } highlight_states = { highlight_state_targets = { state = 424 state = 815 state = 854 state = 855 state = 859 state = 860 state = 861 state = 862 state = 1121 } } available = { custom_trigger_tooltip = { tooltip = ANTCONF_update_flag_tt count_triggers = { amount = 7 424 = { is_core_of = ROOT } 815 = { is_core_of = ROOT } 854 = { is_core_of = ROOT } 855 = { is_core_of = ROOT } 859 = { is_core_of = ROOT } 860 = { is_core_of = ROOT } 861 = { is_core_of = ROOT } 862 = { is_core_of = ROOT } 1121 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision ANTCONF_update_flag" set_cosmetic_tag = ANTCONF remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 14 } set_variable = { formable_committed_size = 9 } } } } # Post-formation purchase of unowned cores ANTCONF_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 14 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } visible = { has_country_flag = is_ANTCONF } target_root_trigger = { has_country_flag = is_ANTCONF } target_array = global.ANTCONF_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision ANTCONF_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel ANTCONF_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove ANTCONF_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } } #CANZUK form_CANZUK_category = { ### Integrate ### # Start integrate CANZUK_integrate_start = { icon = GFX_decision_generic_form_nation ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 15 } } check_variable = { var = formable_committed_size value = 53 compare = greater_than_or_equals } } # Never commit to a formable whose update_flag the EU guard blocks modifier = { factor = 0 OR = { has_global_flag = european_federation has_idea = EU_member } } } visible = { NOT = { has_country_flag = is_CANZUK } } highlight_states = { highlight_states_trigger = { OR = { is_core_of = CAN is_core_of = AST is_core_of = NZL is_core_of = ENG } } } available = { custom_trigger_tooltip = { tooltip = CANZUK_integrate_trigger_tt count_triggers = { amount = 42 8 = { state_owned_or_puppet_owned_by_root = yes } 9 = { state_owned_or_puppet_owned_by_root = yes } 10 = { state_owned_or_puppet_owned_by_root = yes } 11 = { state_owned_or_puppet_owned_by_root = yes } 12 = { state_owned_or_puppet_owned_by_root = yes } 13 = { state_owned_or_puppet_owned_by_root = yes } 14 = { state_owned_or_puppet_owned_by_root = yes } 15 = { state_owned_or_puppet_owned_by_root = yes } 16 = { state_owned_or_puppet_owned_by_root = yes } 17 = { state_owned_or_puppet_owned_by_root = yes } 18 = { state_owned_or_puppet_owned_by_root = yes } 19 = { state_owned_or_puppet_owned_by_root = yes } 437 = { state_owned_or_puppet_owned_by_root = yes } 741 = { state_owned_or_puppet_owned_by_root = yes } 742 = { state_owned_or_puppet_owned_by_root = yes } 743 = { state_owned_or_puppet_owned_by_root = yes } 744 = { state_owned_or_puppet_owned_by_root = yes } 745 = { state_owned_or_puppet_owned_by_root = yes } 746 = { state_owned_or_puppet_owned_by_root = yes } 747 = { state_owned_or_puppet_owned_by_root = yes } 748 = { state_owned_or_puppet_owned_by_root = yes } 749 = { state_owned_or_puppet_owned_by_root = yes } 750 = { state_owned_or_puppet_owned_by_root = yes } 751 = { state_owned_or_puppet_owned_by_root = yes } 753 = { state_owned_or_puppet_owned_by_root = yes } 754 = { state_owned_or_puppet_owned_by_root = yes } 755 = { state_owned_or_puppet_owned_by_root = yes } 756 = { state_owned_or_puppet_owned_by_root = yes } 757 = { state_owned_or_puppet_owned_by_root = yes } 758 = { state_owned_or_puppet_owned_by_root = yes } 759 = { state_owned_or_puppet_owned_by_root = yes } 760 = { state_owned_or_puppet_owned_by_root = yes } 761 = { state_owned_or_puppet_owned_by_root = yes } 762 = { state_owned_or_puppet_owned_by_root = yes } 763 = { state_owned_or_puppet_owned_by_root = yes } 824 = { state_owned_or_puppet_owned_by_root = yes } 955 = { state_owned_or_puppet_owned_by_root = yes } 973 = { state_owned_or_puppet_owned_by_root = yes } 1159 = { state_owned_or_puppet_owned_by_root = yes } 1160 = { state_owned_or_puppet_owned_by_root = yes } 1190 = { state_owned_or_puppet_owned_by_root = yes } 1191 = { state_owned_or_puppet_owned_by_root = yes } 1192 = { state_owned_or_puppet_owned_by_root = yes } 1193 = { state_owned_or_puppet_owned_by_root = yes } 1194 = { state_owned_or_puppet_owned_by_root = yes } 1195 = { state_owned_or_puppet_owned_by_root = yes } 1196 = { state_owned_or_puppet_owned_by_root = yes } 1197 = { state_owned_or_puppet_owned_by_root = yes } 1217 = { state_owned_or_puppet_owned_by_root = yes } 1218 = { state_owned_or_puppet_owned_by_root = yes } 1219 = { state_owned_or_puppet_owned_by_root = yes } 1220 = { state_owned_or_puppet_owned_by_root = yes } 1221 = { state_owned_or_puppet_owned_by_root = yes } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision CANZUK_integrate_start" if = { limit = { NOT = { has_country_flag = is_CANZUK } } set_country_flag = is_CANZUK set_global_flag = CANZUK_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_@ROOT custom_effect_tooltip = CANZUK_start_integrate_tt custom_effect_tooltip = general_integrate_tt add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 15 } set_variable = { formable_committed_size = 53 } } } } CANZUK_integrate_CAN = { icon = GFX_decision_generic_form_nation cost = 500 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 15 } } check_variable = { var = formable_committed_size value = 53 compare = greater_than_or_equals } } } allowed = { NOT = { tag = CAN } } visible = { has_country_flag = is_CANZUK NOT = { has_country_flag = integrated_CAN } } highlight_states = { highlight_state_targets = { state = 753 state = 754 state = 755 state = 756 state = 757 state = 758 state = 759 state = 760 state = 761 state = 762 state = 763 state = 1159 state = 1160 } } available = { custom_trigger_tooltip = { tooltip = CANZUK_integrate_CAN_tt 753 = { state_owned_or_puppet_owned_by_root = yes } 754 = { state_owned_or_puppet_owned_by_root = yes } 755 = { state_owned_or_puppet_owned_by_root = yes } 756 = { state_owned_or_puppet_owned_by_root = yes } 757 = { state_owned_or_puppet_owned_by_root = yes } 758 = { state_owned_or_puppet_owned_by_root = yes } 759 = { state_owned_or_puppet_owned_by_root = yes } 760 = { state_owned_or_puppet_owned_by_root = yes } 761 = { state_owned_or_puppet_owned_by_root = yes } 762 = { state_owned_or_puppet_owned_by_root = yes } 763 = { state_owned_or_puppet_owned_by_root = yes } 1159 = { state_owned_or_puppet_owned_by_root = yes } 1160 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision CANZUK_integrate_CAN" add_state_core = 753 add_state_core = 754 add_state_core = 755 add_state_core = 756 add_state_core = 757 add_state_core = 758 add_state_core = 759 add_state_core = 760 add_state_core = 761 add_state_core = 762 add_state_core = 763 add_state_core = 1159 add_state_core = 1160 if = { limit = { country_exists = CAN CAN = { is_subject_of = ROOT all_owned_state = { OR = { state = 753 state = 754 state = 755 state = 756 state = 757 state = 758 state = 759 state = 760 state = 761 state = 762 state = 763 state = 1159 state = 1160 } } } } CAN = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = CAN transfer_troops = yes } } if = { limit = { NOT = { owns_state = 753 } } transfer_state = 753 } if = { limit = { NOT = { owns_state = 754 } } transfer_state = 754 } if = { limit = { NOT = { owns_state = 755 } } transfer_state = 755 } if = { limit = { NOT = { owns_state = 756 } } transfer_state = 756 } if = { limit = { NOT = { owns_state = 757 } } transfer_state = 757 } if = { limit = { NOT = { owns_state = 758 } } transfer_state = 758 } if = { limit = { NOT = { owns_state = 759 } } transfer_state = 759 } if = { limit = { NOT = { owns_state = 760 } } transfer_state = 760 } if = { limit = { NOT = { owns_state = 761 } } transfer_state = 761 } if = { limit = { NOT = { owns_state = 762 } } transfer_state = 762 } if = { limit = { NOT = { owns_state = 763 } } transfer_state = 763 } if = { limit = { NOT = { owns_state = 1159 } } transfer_state = 1159 } if = { limit = { NOT = { owns_state = 1160 } } transfer_state = 1160 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_CAN } } #AST CANZUK_integrate_AST = { icon = GFX_decision_generic_form_nation cost = 500 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 15 } } check_variable = { var = formable_committed_size value = 53 compare = greater_than_or_equals } } } allowed = { NOT = { tag = AST } } visible = { has_country_flag = is_CANZUK NOT = { has_country_flag = integrated_AST } } highlight_states = { highlight_state_targets = { state = 741 state = 742 state = 743 state = 744 state = 745 state = 746 state = 747 state = 748 state = 749 state = 1219 state = 1221 } } available = { custom_trigger_tooltip = { tooltip = CANZUK_integrate_AST_tt 741 = { state_owned_or_puppet_owned_by_root = yes } 742 = { state_owned_or_puppet_owned_by_root = yes } 743 = { state_owned_or_puppet_owned_by_root = yes } 744 = { state_owned_or_puppet_owned_by_root = yes } 745 = { state_owned_or_puppet_owned_by_root = yes } 746 = { state_owned_or_puppet_owned_by_root = yes } 747 = { state_owned_or_puppet_owned_by_root = yes } 748 = { state_owned_or_puppet_owned_by_root = yes } 749 = { state_owned_or_puppet_owned_by_root = yes } 1219 = { state_owned_or_puppet_owned_by_root = yes } 1221 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision CANZUK_integrate_AST" add_state_core = 741 add_state_core = 742 add_state_core = 743 add_state_core = 744 add_state_core = 745 add_state_core = 746 add_state_core = 747 add_state_core = 748 add_state_core = 749 add_state_core = 1219 add_state_core = 1221 if = { limit = { country_exists = AST AST = { is_subject_of = ROOT all_owned_state = { OR = { state = 741 state = 742 state = 743 state = 744 state = 745 state = 746 state = 747 state = 748 state = 749 state = 1219 state = 1221 } } } } AST = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = AST transfer_troops = yes } } if = { limit = { NOT = { owns_state = 741 } } transfer_state = 741 } if = { limit = { NOT = { owns_state = 742 } } transfer_state = 742 } if = { limit = { NOT = { owns_state = 743 } } transfer_state = 743 } if = { limit = { NOT = { owns_state = 744 } } transfer_state = 744 } if = { limit = { NOT = { owns_state = 745 } } transfer_state = 745 } if = { limit = { NOT = { owns_state = 746 } } transfer_state = 746 } if = { limit = { NOT = { owns_state = 747 } } transfer_state = 747 } if = { limit = { NOT = { owns_state = 748 } } transfer_state = 748 } if = { limit = { NOT = { owns_state = 749 } } transfer_state = 749 } if = { limit = { NOT = { owns_state = 1219 } } transfer_state = 1219 } if = { limit = { NOT = { owns_state = 1221 } } transfer_state = 1221 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_AST } } #NZL CANZUK_integrate_NZL = { icon = GFX_decision_generic_form_nation cost = 200 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 15 } } check_variable = { var = formable_committed_size value = 53 compare = greater_than_or_equals } } } allowed = { NOT = { tag = NZL } } visible = { has_country_flag = is_CANZUK NOT = { has_country_flag = integrated_NZL } } highlight_states = { highlight_state_targets = { state = 750 state = 751 state = 1217 state = 1218 state = 1220 } } available = { custom_trigger_tooltip = { tooltip = CANZUK_integrate_NZL_tt 750 = { state_owned_or_puppet_owned_by_root = yes } 751 = { state_owned_or_puppet_owned_by_root = yes } 1217 = { state_owned_or_puppet_owned_by_root = yes } 1218 = { state_owned_or_puppet_owned_by_root = yes } 1220 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision CANZUK_integrate_NZL" add_state_core = 750 add_state_core = 751 add_state_core = 1217 add_state_core = 1218 add_state_core = 1220 if = { limit = { country_exists = NZL NZL = { is_subject_of = ROOT all_owned_state = { OR = { state = 750 state = 751 state = 1217 state = 1218 state = 1220 } } } } NZL = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = NZL transfer_troops = yes } } if = { limit = { NOT = { owns_state = 750 } } transfer_state = 750 } if = { limit = { NOT = { owns_state = 751 } } transfer_state = 751 } if = { limit = { NOT = { owns_state = 1217 } } transfer_state = 1217 } if = { limit = { NOT = { owns_state = 1218 } } transfer_state = 1218 } if = { limit = { NOT = { owns_state = 1220 } } transfer_state = 1220 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_NZL } } #ENG CANZUK_integrate_ENG = { icon = GFX_decision_generic_form_nation cost = 900 days_remove = 500 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 15 } } check_variable = { var = formable_committed_size value = 53 compare = greater_than_or_equals } } } allowed = { NOT = { tag = ENG } } visible = { has_country_flag = is_CANZUK NOT = { has_country_flag = integrated_ENG } } highlight_states = { highlight_state_targets = { state = 8 state = 9 state = 10 state = 11 state = 12 state = 13 state = 14 state = 15 state = 16 state = 17 state = 18 state = 19 state = 437 state = 824 state = 955 state = 973 state = 1190 state = 1191 state = 1192 state = 1193 state = 1194 state = 1195 state = 1196 state = 1197 } } available = { custom_trigger_tooltip = { tooltip = CANZUK_integrate_ENG_tt 8 = { state_owned_or_puppet_owned_by_root = yes } 9 = { state_owned_or_puppet_owned_by_root = yes } 10 = { state_owned_or_puppet_owned_by_root = yes } 11 = { state_owned_or_puppet_owned_by_root = yes } 12 = { state_owned_or_puppet_owned_by_root = yes } 13 = { state_owned_or_puppet_owned_by_root = yes } 14 = { state_owned_or_puppet_owned_by_root = yes } 15 = { state_owned_or_puppet_owned_by_root = yes } 16 = { state_owned_or_puppet_owned_by_root = yes } 17 = { state_owned_or_puppet_owned_by_root = yes } 18 = { state_owned_or_puppet_owned_by_root = yes } 19 = { state_owned_or_puppet_owned_by_root = yes } 437 = { state_owned_or_puppet_owned_by_root = yes } 824 = { state_owned_or_puppet_owned_by_root = yes } 955 = { state_owned_or_puppet_owned_by_root = yes } 973 = { state_owned_or_puppet_owned_by_root = yes } 1190 = { state_owned_or_puppet_owned_by_root = yes } 1191 = { state_owned_or_puppet_owned_by_root = yes } 1192 = { state_owned_or_puppet_owned_by_root = yes } 1193 = { state_owned_or_puppet_owned_by_root = yes } 1194 = { state_owned_or_puppet_owned_by_root = yes } 1195 = { state_owned_or_puppet_owned_by_root = yes } 1196 = { state_owned_or_puppet_owned_by_root = yes } 1197 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision CANZUK_integrate_ENG" add_state_core = 8 add_state_core = 9 add_state_core = 10 add_state_core = 11 add_state_core = 12 add_state_core = 13 add_state_core = 14 add_state_core = 15 add_state_core = 16 add_state_core = 17 add_state_core = 18 add_state_core = 19 add_state_core = 437 add_state_core = 824 add_state_core = 955 add_state_core = 973 add_state_core = 1190 add_state_core = 1191 add_state_core = 1192 add_state_core = 1193 add_state_core = 1194 add_state_core = 1195 add_state_core = 1196 add_state_core = 1197 if = { limit = { country_exists = ENG ENG = { is_subject_of = ROOT all_owned_state = { OR = { state = 8 state = 9 state = 10 state = 11 state = 12 state = 13 state = 14 state = 15 state = 16 state = 17 state = 18 state = 19 state = 437 state = 824 state = 955 state = 973 state = 1190 state = 1191 state = 1192 state = 1193 state = 1194 state = 1195 state = 1196 state = 1197 } } } } ENG = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = ENG transfer_troops = yes } } if = { limit = { NOT = { owns_state = 8 } } transfer_state = 8 } if = { limit = { NOT = { owns_state = 9 } } transfer_state = 9 } if = { limit = { NOT = { owns_state = 10 } } transfer_state = 10 } if = { limit = { NOT = { owns_state = 11 } } transfer_state = 11 } if = { limit = { NOT = { owns_state = 12 } } transfer_state = 12 } if = { limit = { NOT = { owns_state = 13 } } transfer_state = 13 } if = { limit = { NOT = { owns_state = 14 } } transfer_state = 14 } if = { limit = { NOT = { owns_state = 15 } } transfer_state = 15 } if = { limit = { NOT = { owns_state = 16 } } transfer_state = 16 } if = { limit = { NOT = { owns_state = 17 } } transfer_state = 17 } if = { limit = { NOT = { owns_state = 18 } } transfer_state = 18 } if = { limit = { NOT = { owns_state = 19 } } transfer_state = 19 } if = { limit = { NOT = { owns_state = 437 } } transfer_state = 437 } if = { limit = { NOT = { owns_state = 824 } } transfer_state = 824 } if = { limit = { NOT = { owns_state = 955 } } transfer_state = 955 } if = { limit = { NOT = { owns_state = 973 } } transfer_state = 973 } if = { limit = { NOT = { owns_state = 1190 } } transfer_state = 1190 } if = { limit = { NOT = { owns_state = 1191 } } transfer_state = 1191 } if = { limit = { NOT = { owns_state = 1192 } } transfer_state = 1192 } if = { limit = { NOT = { owns_state = 1193 } } transfer_state = 1193 } if = { limit = { NOT = { owns_state = 1194 } } transfer_state = 1194 } if = { limit = { NOT = { owns_state = 1195 } } transfer_state = 1195 } if = { limit = { NOT = { owns_state = 1196 } } transfer_state = 1196 } if = { limit = { NOT = { owns_state = 1197 } } transfer_state = 1197 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_ENG } } ### Cosmetic ### CANZUK_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 15 } } check_variable = { var = formable_committed_size value = 53 compare = greater_than_or_equals } } } visible = { has_country_flag = is_CANZUK NOT = { OR = { has_global_flag = european_federation has_idea = EU_member has_cosmetic_tag = CANZUK } } } highlight_states = { highlight_state_targets = { state = 8 state = 9 state = 10 state = 11 state = 12 state = 13 state = 14 state = 15 state = 16 state = 17 state = 18 state = 19 state = 437 state = 741 state = 742 state = 743 state = 744 state = 745 state = 746 state = 747 state = 748 state = 749 state = 750 state = 751 state = 753 state = 754 state = 755 state = 756 state = 757 state = 758 state = 759 state = 760 state = 761 state = 762 state = 763 state = 824 state = 955 state = 973 state = 1159 state = 1160 state = 1190 state = 1191 state = 1192 state = 1193 state = 1194 state = 1195 state = 1196 state = 1197 state = 1217 state = 1218 state = 1219 state = 1220 state = 1221 } } available = { custom_trigger_tooltip = { tooltip = CANZUK_update_flag_tt count_triggers = { amount = 42 8 = { is_core_of = ROOT } 9 = { is_core_of = ROOT } 10 = { is_core_of = ROOT } 11 = { is_core_of = ROOT } 12 = { is_core_of = ROOT } 13 = { is_core_of = ROOT } 14 = { is_core_of = ROOT } 15 = { is_core_of = ROOT } 16 = { is_core_of = ROOT } 17 = { is_core_of = ROOT } 18 = { is_core_of = ROOT } 19 = { is_core_of = ROOT } 437 = { is_core_of = ROOT } 741 = { is_core_of = ROOT } 742 = { is_core_of = ROOT } 743 = { is_core_of = ROOT } 744 = { is_core_of = ROOT } 745 = { is_core_of = ROOT } 746 = { is_core_of = ROOT } 747 = { is_core_of = ROOT } 748 = { is_core_of = ROOT } 749 = { is_core_of = ROOT } 750 = { is_core_of = ROOT } 751 = { is_core_of = ROOT } 753 = { is_core_of = ROOT } 754 = { is_core_of = ROOT } 755 = { is_core_of = ROOT } 756 = { is_core_of = ROOT } 757 = { is_core_of = ROOT } 758 = { is_core_of = ROOT } 759 = { is_core_of = ROOT } 760 = { is_core_of = ROOT } 761 = { is_core_of = ROOT } 762 = { is_core_of = ROOT } 763 = { is_core_of = ROOT } 824 = { is_core_of = ROOT } 955 = { is_core_of = ROOT } 973 = { is_core_of = ROOT } 1159 = { is_core_of = ROOT } 1160 = { is_core_of = ROOT } 1190 = { is_core_of = ROOT } 1191 = { is_core_of = ROOT } 1192 = { is_core_of = ROOT } 1193 = { is_core_of = ROOT } 1194 = { is_core_of = ROOT } 1195 = { is_core_of = ROOT } 1196 = { is_core_of = ROOT } 1197 = { is_core_of = ROOT } 1217 = { is_core_of = ROOT } 1218 = { is_core_of = ROOT } 1219 = { is_core_of = ROOT } 1220 = { is_core_of = ROOT } 1221 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision CANZUK_update_flag" #CANZUK set_cosmetic_tag = CANZUK remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 15 } set_variable = { formable_committed_size = 53 } } } } # Post-formation purchase of unowned cores CANZUK_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 15 } } check_variable = { var = formable_committed_size value = 53 compare = greater_than_or_equals } } } visible = { has_country_flag = is_CANZUK } target_root_trigger = { has_country_flag = is_CANZUK } target_array = global.CANZUK_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision CANZUK_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel CANZUK_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove CANZUK_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } } #Rio de la Plata form_RDLP_category = { ### Integrate (RDLP) ### # Start integrate RDLP_integrate_start = { icon = GFX_decision_generic_form_nation ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 16 } } check_variable = { var = formable_committed_size value = 21 compare = greater_than_or_equals } } } visible = { NOT = { has_country_flag = is_RDLP } } highlight_states = { highlight_states_trigger = { OR = { is_core_of = PAR is_core_of = BOL is_core_of = CHL is_core_of = URG is_core_of = ARG } } } available = { custom_trigger_tooltip = { tooltip = RDLP_integrate_trigger_tt count_triggers = { amount = 17 443 = { state_owned_or_puppet_owned_by_root = yes } 446 = { state_owned_or_puppet_owned_by_root = yes } 448 = { state_owned_or_puppet_owned_by_root = yes } 449 = { state_owned_or_puppet_owned_by_root = yes } 450 = { state_owned_or_puppet_owned_by_root = yes } 453 = { state_owned_or_puppet_owned_by_root = yes } 454 = { state_owned_or_puppet_owned_by_root = yes } 457 = { state_owned_or_puppet_owned_by_root = yes } 463 = { state_owned_or_puppet_owned_by_root = yes } 468 = { state_owned_or_puppet_owned_by_root = yes } 472 = { state_owned_or_puppet_owned_by_root = yes } 893 = { state_owned_or_puppet_owned_by_root = yes } 894 = { state_owned_or_puppet_owned_by_root = yes } 895 = { state_owned_or_puppet_owned_by_root = yes } 896 = { state_owned_or_puppet_owned_by_root = yes } 897 = { state_owned_or_puppet_owned_by_root = yes } 898 = { state_owned_or_puppet_owned_by_root = yes } 899 = { state_owned_or_puppet_owned_by_root = yes } 942 = { state_owned_or_puppet_owned_by_root = yes } 949 = { state_owned_or_puppet_owned_by_root = yes } 950 = { state_owned_or_puppet_owned_by_root = yes } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision RDLP_integrate_start" if = { limit = { NOT = { has_country_flag = is_RDLP } } set_country_flag = is_RDLP set_global_flag = RDLP_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_@ROOT custom_effect_tooltip = RDLP_start_integrate_tt custom_effect_tooltip = general_integrate_tt add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 16 } set_variable = { formable_committed_size = 21 } } } } #PAR RDLP_integrate_PAR = { icon = GFX_decision_generic_form_nation cost = 200 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 16 } } check_variable = { var = formable_committed_size value = 21 compare = greater_than_or_equals } } } allowed = { NOT = { tag = PAR } } visible = { has_country_flag = is_RDLP NOT = { has_country_flag = integrated_PAR } } highlight_states = { highlight_state_targets = { state = 895 state = 896 } } available = { custom_trigger_tooltip = { tooltip = RDLP_integrate_PAR_tt 895 = { state_owned_or_puppet_owned_by_root = yes } 896 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision RDLP_integrate_PAR" add_state_core = 895 add_state_core = 896 if = { limit = { country_exists = PAR PAR = { is_subject_of = ROOT all_owned_state = { OR = { state = 895 state = 896 } } } } PAR = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = PAR transfer_troops = yes } } if = { limit = { NOT = { owns_state = 895 } } transfer_state = 895 } if = { limit = { NOT = { owns_state = 896 } } transfer_state = 896 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_PAR } } #BOL RDLP_integrate_BOL = { icon = GFX_decision_generic_form_nation cost = 250 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 16 } } check_variable = { var = formable_committed_size value = 21 compare = greater_than_or_equals } } } allowed = { NOT = { tag = BOL } } visible = { has_country_flag = is_RDLP NOT = { has_country_flag = integrated_BOL } } highlight_states = { highlight_state_targets = { state = 897 state = 898 state = 899 } } available = { custom_trigger_tooltip = { tooltip = RDLP_integrate_BOL_tt 897 = { state_owned_or_puppet_owned_by_root = yes } 898 = { state_owned_or_puppet_owned_by_root = yes } 899 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision RDLP_integrate_BOL" add_state_core = 897 add_state_core = 898 add_state_core = 899 if = { limit = { country_exists = BOL BOL = { is_subject_of = ROOT all_owned_state = { OR = { state = 897 state = 898 state = 899 } } } } BOL = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = BOL transfer_troops = yes } } if = { limit = { NOT = { owns_state = 897 } } transfer_state = 897 } if = { limit = { NOT = { owns_state = 898 } } transfer_state = 898 } if = { limit = { NOT = { owns_state = 899 } } transfer_state = 899 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_BOL } } #CHL RDLP_integrate_CHL = { icon = GFX_decision_generic_form_nation cost = 350 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 16 } } check_variable = { var = formable_committed_size value = 21 compare = greater_than_or_equals } } } allowed = { NOT = { tag = CHL } } visible = { has_country_flag = is_RDLP NOT = { has_country_flag = integrated_CHL } } highlight_states = { highlight_state_targets = { state = 463 state = 468 state = 472 state = 942 state = 949 state = 950 } } available = { custom_trigger_tooltip = { tooltip = RDLP_integrate_CHL_tt 463 = { state_owned_or_puppet_owned_by_root = yes } 468 = { state_owned_or_puppet_owned_by_root = yes } 472 = { state_owned_or_puppet_owned_by_root = yes } 942 = { state_owned_or_puppet_owned_by_root = yes } 949 = { state_owned_or_puppet_owned_by_root = yes } 950 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision RDLP_integrate_CHL" add_state_core = 463 add_state_core = 468 add_state_core = 472 add_state_core = 942 add_state_core = 949 add_state_core = 950 if = { limit = { country_exists = CHL CHL = { is_subject_of = ROOT all_owned_state = { OR = { state = 463 state = 468 state = 472 state = 942 state = 949 state = 950 } } } } CHL = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = CHL transfer_troops = yes } } if = { limit = { NOT = { owns_state = 463 } } transfer_state = 463 } if = { limit = { NOT = { owns_state = 468 } } transfer_state = 468 } if = { limit = { NOT = { owns_state = 472 } } transfer_state = 472 } if = { limit = { NOT = { owns_state = 942 } } transfer_state = 942 } if = { limit = { NOT = { owns_state = 949 } } transfer_state = 949 } if = { limit = { NOT = { owns_state = 950 } } transfer_state = 950 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_CHL } } #URG RDLP_integrate_URG = { icon = GFX_decision_generic_form_nation cost = 200 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 16 } } check_variable = { var = formable_committed_size value = 21 compare = greater_than_or_equals } } } allowed = { NOT = { tag = URG } } visible = { has_country_flag = is_RDLP NOT = { has_country_flag = integrated_URG } } highlight_states = { highlight_state_targets = { state = 893 state = 894 } } available = { custom_trigger_tooltip = { tooltip = RDLP_integrate_URG_tt 893 = { state_owned_or_puppet_owned_by_root = yes } 894 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision RDLP_integrate_URG" add_state_core = 893 add_state_core = 894 if = { limit = { country_exists = URG URG = { is_subject_of = ROOT all_owned_state = { OR = { state = 893 state = 894 } } } } URG = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = URG transfer_troops = yes } } if = { limit = { NOT = { owns_state = 893 } } transfer_state = 893 } if = { limit = { NOT = { owns_state = 894 } } transfer_state = 894 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_URG } } #ARG RDLP_integrate_ARG = { icon = GFX_decision_generic_form_nation cost = 500 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 16 } } check_variable = { var = formable_committed_size value = 21 compare = greater_than_or_equals } } } allowed = { NOT = { tag = ARG } } visible = { has_country_flag = is_RDLP NOT = { has_country_flag = integrated_ARG } } highlight_states = { highlight_state_targets = { state = 443 state = 446 state = 448 state = 449 state = 450 state = 453 state = 454 state = 457 } } available = { custom_trigger_tooltip = { tooltip = RDLP_integrate_ARG_tt 443 = { state_owned_or_puppet_owned_by_root = yes } 446 = { state_owned_or_puppet_owned_by_root = yes } 448 = { state_owned_or_puppet_owned_by_root = yes } 449 = { state_owned_or_puppet_owned_by_root = yes } 450 = { state_owned_or_puppet_owned_by_root = yes } 453 = { state_owned_or_puppet_owned_by_root = yes } 454 = { state_owned_or_puppet_owned_by_root = yes } 457 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision RDLP_integrate_ARG" add_state_core = 443 add_state_core = 446 add_state_core = 448 add_state_core = 449 add_state_core = 450 add_state_core = 453 add_state_core = 454 add_state_core = 457 if = { limit = { country_exists = ARG ARG = { is_subject_of = ROOT all_owned_state = { OR = { state = 443 state = 446 state = 448 state = 449 state = 450 state = 453 state = 454 state = 457 } } } } ARG = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = ARG transfer_troops = yes } } if = { limit = { NOT = { owns_state = 443 } } transfer_state = 443 } if = { limit = { NOT = { owns_state = 446 } } transfer_state = 446 } if = { limit = { NOT = { owns_state = 448 } } transfer_state = 448 } if = { limit = { NOT = { owns_state = 449 } } transfer_state = 449 } if = { limit = { NOT = { owns_state = 450 } } transfer_state = 450 } if = { limit = { NOT = { owns_state = 453 } } transfer_state = 453 } if = { limit = { NOT = { owns_state = 454 } } transfer_state = 454 } if = { limit = { NOT = { owns_state = 457 } } transfer_state = 457 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_ARG } } ### Cosmetic ### RDLP_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 16 } } check_variable = { var = formable_committed_size value = 21 compare = greater_than_or_equals } } } visible = { has_country_flag = is_RDLP NOT = { has_cosmetic_tag = RDLP } } highlight_states = { highlight_state_targets = { state = 443 state = 446 state = 448 state = 449 state = 450 state = 453 state = 454 state = 457 state = 463 state = 468 state = 472 state = 893 state = 894 state = 895 state = 896 state = 897 state = 898 state = 899 state = 942 state = 949 state = 950 } } available = { custom_trigger_tooltip = { tooltip = RDLP_update_flag_tt count_triggers = { amount = 17 443 = { is_core_of = ROOT } 446 = { is_core_of = ROOT } 448 = { is_core_of = ROOT } 449 = { is_core_of = ROOT } 450 = { is_core_of = ROOT } 453 = { is_core_of = ROOT } 454 = { is_core_of = ROOT } 457 = { is_core_of = ROOT } 463 = { is_core_of = ROOT } 468 = { is_core_of = ROOT } 472 = { is_core_of = ROOT } 893 = { is_core_of = ROOT } 894 = { is_core_of = ROOT } 895 = { is_core_of = ROOT } 896 = { is_core_of = ROOT } 897 = { is_core_of = ROOT } 898 = { is_core_of = ROOT } 899 = { is_core_of = ROOT } 942 = { is_core_of = ROOT } 949 = { is_core_of = ROOT } 950 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision RDLP_update_flag" set_cosmetic_tag = RDLP remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 16 } set_variable = { formable_committed_size = 21 } } } } # Post-formation purchase of unowned cores RDLP_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 16 } } check_variable = { var = formable_committed_size value = 21 compare = greater_than_or_equals } } } visible = { has_country_flag = is_RDLP } target_root_trigger = { has_country_flag = is_RDLP } target_array = global.RDLP_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision RDLP_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel RDLP_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove RDLP_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } } #North Sea Empire form_NORDEM_category = { ### Integrate ### # Start integrate NORDEM_integrate_start = { icon = GFX_decision_generic_form_nation ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 17 } } check_variable = { var = formable_committed_size value = 45 compare = greater_than_or_equals } # A CANZUK commitment stranded by the EU guard must not also block its fallback formables NOT = { AND = { check_variable = { formable_committed_id = 15 } OR = { has_global_flag = european_federation has_idea = EU_member } } } } } highlight_states = { highlight_state_targets = { # ENG (UK mainland) per available block state = 9 #Central Belt state = 10 #Yorkshire and the Humber state = 11 #Greater Manchester state = 12 #West Midlands state = 13 #Greater London state = 14 #East of England state = 15 #Southern England state = 16 #South Wales state = 17 #Northern Ireland state = 437 #Highlands state = 955 #Isle of Mann state = 973 #Cornwall # SWE southern core state = 34 #Svealand state = 35 #Gotaland state = 36 #Gotland state = 439 #Ostergotland state = 550 #Skane # NRY all cores state = 30 #Vestlandet state = 31 #Nord-Norge state = 32 #Ostlandet state = 542 #Trondelag # DEN all cores state = 1 #Central Plateau state = 2 #Faroe Islands state = 3 #Bornholm state = 4 #Sjaelland state = 5 #Fyn state = 6 #Jylland state = 1161 #Kitaa state = 1162 #Tunu state = 1240 #Southern Interior } } visible = { NOT = { has_country_flag = is_NORDEM } } available = { custom_trigger_tooltip = { tooltip = NORDEM_integrate_trigger_tt count_triggers = { amount = 36 1 = { state_owned_or_puppet_owned_by_root = yes } 2 = { state_owned_or_puppet_owned_by_root = yes } 3 = { state_owned_or_puppet_owned_by_root = yes } 4 = { state_owned_or_puppet_owned_by_root = yes } 5 = { state_owned_or_puppet_owned_by_root = yes } 6 = { state_owned_or_puppet_owned_by_root = yes } 8 = { state_owned_or_puppet_owned_by_root = yes } 9 = { state_owned_or_puppet_owned_by_root = yes } 10 = { state_owned_or_puppet_owned_by_root = yes } 11 = { state_owned_or_puppet_owned_by_root = yes } 12 = { state_owned_or_puppet_owned_by_root = yes } 13 = { state_owned_or_puppet_owned_by_root = yes } 14 = { state_owned_or_puppet_owned_by_root = yes } 15 = { state_owned_or_puppet_owned_by_root = yes } 16 = { state_owned_or_puppet_owned_by_root = yes } 17 = { state_owned_or_puppet_owned_by_root = yes } 18 = { state_owned_or_puppet_owned_by_root = yes } 19 = { state_owned_or_puppet_owned_by_root = yes } 30 = { state_owned_or_puppet_owned_by_root = yes } 31 = { state_owned_or_puppet_owned_by_root = yes } 32 = { state_owned_or_puppet_owned_by_root = yes } 33 = { state_owned_or_puppet_owned_by_root = yes } 34 = { state_owned_or_puppet_owned_by_root = yes } 35 = { state_owned_or_puppet_owned_by_root = yes } 36 = { state_owned_or_puppet_owned_by_root = yes } 437 = { state_owned_or_puppet_owned_by_root = yes } 439 = { state_owned_or_puppet_owned_by_root = yes } 442 = { state_owned_or_puppet_owned_by_root = yes } 542 = { state_owned_or_puppet_owned_by_root = yes } 550 = { state_owned_or_puppet_owned_by_root = yes } 824 = { state_owned_or_puppet_owned_by_root = yes } 881 = { state_owned_or_puppet_owned_by_root = yes } 955 = { state_owned_or_puppet_owned_by_root = yes } 973 = { state_owned_or_puppet_owned_by_root = yes } 1161 = { state_owned_or_puppet_owned_by_root = yes } 1162 = { state_owned_or_puppet_owned_by_root = yes } 1190 = { state_owned_or_puppet_owned_by_root = yes } 1191 = { state_owned_or_puppet_owned_by_root = yes } 1192 = { state_owned_or_puppet_owned_by_root = yes } 1193 = { state_owned_or_puppet_owned_by_root = yes } 1194 = { state_owned_or_puppet_owned_by_root = yes } 1195 = { state_owned_or_puppet_owned_by_root = yes } 1196 = { state_owned_or_puppet_owned_by_root = yes } 1197 = { state_owned_or_puppet_owned_by_root = yes } 1240 = { state_owned_or_puppet_owned_by_root = yes } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision NORDEM_integrate_start" if = { limit = { NOT = { has_country_flag = is_NORDEM } } set_country_flag = is_NORDEM set_global_flag = NORDEM_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_@ROOT custom_effect_tooltip = NORDEM_start_integrate_tt custom_effect_tooltip = general_integrate_tt add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 17 } set_variable = { formable_committed_size = 45 } } } } #SWE NORDEM_integrate_SWE = { icon = GFX_decision_generic_form_nation cost = 500 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 17 } } check_variable = { var = formable_committed_size value = 45 compare = greater_than_or_equals } # A CANZUK commitment stranded by the EU guard must not also block its fallback formables NOT = { AND = { check_variable = { formable_committed_id = 15 } OR = { has_global_flag = european_federation has_idea = EU_member } } } } } allowed = { NOT = { tag = SWE } } visible = { has_country_flag = is_NORDEM NOT = { has_country_flag = integrated_SWE } } highlight_states = { highlight_state_targets = { state = 33 state = 34 state = 35 state = 36 state = 439 state = 442 state = 550 state = 881 } } available = { custom_trigger_tooltip = { tooltip = NORDEM_integrate_SWE_tt 33 = { state_owned_or_puppet_owned_by_root = yes } 34 = { state_owned_or_puppet_owned_by_root = yes } 35 = { state_owned_or_puppet_owned_by_root = yes } 36 = { state_owned_or_puppet_owned_by_root = yes } 439 = { state_owned_or_puppet_owned_by_root = yes } 442 = { state_owned_or_puppet_owned_by_root = yes } 550 = { state_owned_or_puppet_owned_by_root = yes } 881 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision NORDEM_integrate_SWE" add_state_core = 33 add_state_core = 34 add_state_core = 35 add_state_core = 36 add_state_core = 439 add_state_core = 442 add_state_core = 550 add_state_core = 881 if = { limit = { country_exists = SWE SWE = { is_subject_of = ROOT all_owned_state = { OR = { state = 33 state = 34 state = 35 state = 36 state = 439 state = 442 state = 550 state = 881 } } } } SWE = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = SWE transfer_troops = yes } } if = { limit = { NOT = { owns_state = 33 } } transfer_state = 33 } if = { limit = { NOT = { owns_state = 34 } } transfer_state = 34 } if = { limit = { NOT = { owns_state = 35 } } transfer_state = 35 } if = { limit = { NOT = { owns_state = 36 } } transfer_state = 36 } if = { limit = { NOT = { owns_state = 439 } } transfer_state = 439 } if = { limit = { NOT = { owns_state = 442 } } transfer_state = 442 } if = { limit = { NOT = { owns_state = 550 } } transfer_state = 550 } if = { limit = { NOT = { owns_state = 881 } } transfer_state = 881 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_SWE } } #NRY NORDEM_integrate_NOR = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 17 } } check_variable = { var = formable_committed_size value = 45 compare = greater_than_or_equals } # A CANZUK commitment stranded by the EU guard must not also block its fallback formables NOT = { AND = { check_variable = { formable_committed_id = 15 } OR = { has_global_flag = european_federation has_idea = EU_member } } } } } allowed = { NOT = { tag = NRY } } visible = { has_country_flag = is_NORDEM NOT = { has_country_flag = integrated_NOR } } highlight_states = { highlight_state_targets = { state = 30 state = 31 state = 32 state = 542 } } available = { custom_trigger_tooltip = { tooltip = NORDEM_integrate_NRY_tt 30 = { state_owned_or_puppet_owned_by_root = yes } 31 = { state_owned_or_puppet_owned_by_root = yes } 32 = { state_owned_or_puppet_owned_by_root = yes } 542 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision NORDEM_integrate_NOR" add_state_core = 30 add_state_core = 31 add_state_core = 32 add_state_core = 542 if = { limit = { country_exists = NRY NRY = { is_subject_of = ROOT all_owned_state = { OR = { state = 30 state = 31 state = 32 state = 542 } } } } NRY = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = NRY transfer_troops = yes } } if = { limit = { NOT = { owns_state = 30 } } transfer_state = 30 } if = { limit = { NOT = { owns_state = 31 } } transfer_state = 31 } if = { limit = { NOT = { owns_state = 32 } } transfer_state = 32 } if = { limit = { NOT = { owns_state = 542 } } transfer_state = 542 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_NOR } } #DEN NORDEM_integrate_DEN = { icon = GFX_decision_generic_form_nation cost = 400 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 17 } } check_variable = { var = formable_committed_size value = 45 compare = greater_than_or_equals } # A CANZUK commitment stranded by the EU guard must not also block its fallback formables NOT = { AND = { check_variable = { formable_committed_id = 15 } OR = { has_global_flag = european_federation has_idea = EU_member } } } } } allowed = { NOT = { tag = DEN } } visible = { has_country_flag = is_NORDEM NOT = { has_country_flag = integrated_DEN } } highlight_states = { highlight_state_targets = { state = 1 state = 2 state = 3 state = 4 state = 5 state = 6 state = 1161 state = 1162 state = 1240 } } available = { custom_trigger_tooltip = { tooltip = NORDEM_integrate_DEN_tt 1 = { state_owned_or_puppet_owned_by_root = yes } 2 = { state_owned_or_puppet_owned_by_root = yes } 3 = { state_owned_or_puppet_owned_by_root = yes } 4 = { state_owned_or_puppet_owned_by_root = yes } 5 = { state_owned_or_puppet_owned_by_root = yes } 6 = { state_owned_or_puppet_owned_by_root = yes } 1161 = { state_owned_or_puppet_owned_by_root = yes } 1162 = { state_owned_or_puppet_owned_by_root = yes } 1240 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision NORDEM_integrate_DEN" add_state_core = 1 add_state_core = 2 add_state_core = 3 add_state_core = 4 add_state_core = 5 add_state_core = 6 add_state_core = 1161 add_state_core = 1162 add_state_core = 1240 if = { limit = { country_exists = DEN DEN = { is_subject_of = ROOT all_owned_state = { OR = { state = 1 state = 2 state = 3 state = 4 state = 5 state = 6 state = 1161 state = 1162 state = 1240 } } } } DEN = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = DEN transfer_troops = yes } } if = { limit = { NOT = { owns_state = 1 } } transfer_state = 1 } if = { limit = { NOT = { owns_state = 2 } } transfer_state = 2 } if = { limit = { NOT = { owns_state = 3 } } transfer_state = 3 } if = { limit = { NOT = { owns_state = 4 } } transfer_state = 4 } if = { limit = { NOT = { owns_state = 5 } } transfer_state = 5 } if = { limit = { NOT = { owns_state = 6 } } transfer_state = 6 } if = { limit = { NOT = { owns_state = 1161 } } transfer_state = 1161 } if = { limit = { NOT = { owns_state = 1162 } } transfer_state = 1162 } if = { limit = { NOT = { owns_state = 1240 } } transfer_state = 1240 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_DEN } } #ENG NORDEM_integrate_ENG = { icon = GFX_decision_generic_form_nation cost = 800 days_remove = 500 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 17 } } check_variable = { var = formable_committed_size value = 45 compare = greater_than_or_equals } # A CANZUK commitment stranded by the EU guard must not also block its fallback formables NOT = { AND = { check_variable = { formable_committed_id = 15 } OR = { has_global_flag = european_federation has_idea = EU_member } } } } } allowed = { NOT = { tag = ENG } } visible = { has_country_flag = is_NORDEM NOT = { has_country_flag = integrated_ENG } } highlight_states = { highlight_state_targets = { state = 8 state = 9 state = 10 state = 11 state = 12 state = 13 state = 14 state = 15 state = 16 state = 17 state = 18 state = 19 state = 437 state = 824 state = 955 state = 973 state = 1190 state = 1191 state = 1192 state = 1193 state = 1194 state = 1195 state = 1196 state = 1197 } } available = { custom_trigger_tooltip = { tooltip = NORDEM_integrate_ENG_tt 8 = { state_owned_or_puppet_owned_by_root = yes } 9 = { state_owned_or_puppet_owned_by_root = yes } 10 = { state_owned_or_puppet_owned_by_root = yes } 11 = { state_owned_or_puppet_owned_by_root = yes } 12 = { state_owned_or_puppet_owned_by_root = yes } 13 = { state_owned_or_puppet_owned_by_root = yes } 14 = { state_owned_or_puppet_owned_by_root = yes } 15 = { state_owned_or_puppet_owned_by_root = yes } 16 = { state_owned_or_puppet_owned_by_root = yes } 17 = { state_owned_or_puppet_owned_by_root = yes } 18 = { state_owned_or_puppet_owned_by_root = yes } 19 = { state_owned_or_puppet_owned_by_root = yes } 437 = { state_owned_or_puppet_owned_by_root = yes } 824 = { state_owned_or_puppet_owned_by_root = yes } 955 = { state_owned_or_puppet_owned_by_root = yes } 973 = { state_owned_or_puppet_owned_by_root = yes } 1190 = { state_owned_or_puppet_owned_by_root = yes } 1191 = { state_owned_or_puppet_owned_by_root = yes } 1192 = { state_owned_or_puppet_owned_by_root = yes } 1193 = { state_owned_or_puppet_owned_by_root = yes } 1194 = { state_owned_or_puppet_owned_by_root = yes } 1195 = { state_owned_or_puppet_owned_by_root = yes } 1196 = { state_owned_or_puppet_owned_by_root = yes } 1197 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision NORDEM_integrate_ENG" add_state_core = 8 add_state_core = 9 add_state_core = 10 add_state_core = 11 add_state_core = 12 add_state_core = 13 add_state_core = 14 add_state_core = 15 add_state_core = 16 add_state_core = 17 add_state_core = 18 add_state_core = 19 add_state_core = 437 add_state_core = 824 add_state_core = 955 add_state_core = 973 add_state_core = 1190 add_state_core = 1191 add_state_core = 1192 add_state_core = 1193 add_state_core = 1194 add_state_core = 1195 add_state_core = 1196 add_state_core = 1197 if = { limit = { country_exists = ENG ENG = { is_subject_of = ROOT all_owned_state = { OR = { state = 8 state = 9 state = 10 state = 11 state = 12 state = 13 state = 14 state = 15 state = 16 state = 17 state = 18 state = 19 state = 437 state = 824 state = 955 state = 973 state = 1190 state = 1191 state = 1192 state = 1193 state = 1194 state = 1195 state = 1196 state = 1197 } } } } ENG = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = ENG transfer_troops = yes } } if = { limit = { NOT = { owns_state = 8 } } transfer_state = 8 } if = { limit = { NOT = { owns_state = 9 } } transfer_state = 9 } if = { limit = { NOT = { owns_state = 10 } } transfer_state = 10 } if = { limit = { NOT = { owns_state = 11 } } transfer_state = 11 } if = { limit = { NOT = { owns_state = 12 } } transfer_state = 12 } if = { limit = { NOT = { owns_state = 13 } } transfer_state = 13 } if = { limit = { NOT = { owns_state = 14 } } transfer_state = 14 } if = { limit = { NOT = { owns_state = 15 } } transfer_state = 15 } if = { limit = { NOT = { owns_state = 16 } } transfer_state = 16 } if = { limit = { NOT = { owns_state = 17 } } transfer_state = 17 } if = { limit = { NOT = { owns_state = 18 } } transfer_state = 18 } if = { limit = { NOT = { owns_state = 19 } } transfer_state = 19 } if = { limit = { NOT = { owns_state = 437 } } transfer_state = 437 } if = { limit = { NOT = { owns_state = 824 } } transfer_state = 824 } if = { limit = { NOT = { owns_state = 955 } } transfer_state = 955 } if = { limit = { NOT = { owns_state = 973 } } transfer_state = 973 } if = { limit = { NOT = { owns_state = 1190 } } transfer_state = 1190 } if = { limit = { NOT = { owns_state = 1191 } } transfer_state = 1191 } if = { limit = { NOT = { owns_state = 1192 } } transfer_state = 1192 } if = { limit = { NOT = { owns_state = 1193 } } transfer_state = 1193 } if = { limit = { NOT = { owns_state = 1194 } } transfer_state = 1194 } if = { limit = { NOT = { owns_state = 1195 } } transfer_state = 1195 } if = { limit = { NOT = { owns_state = 1196 } } transfer_state = 1196 } if = { limit = { NOT = { owns_state = 1197 } } transfer_state = 1197 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_ENG } } ### Cosmetic ### NORDEM_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 17 } } check_variable = { var = formable_committed_size value = 45 compare = greater_than_or_equals } # A CANZUK commitment stranded by the EU guard must not also block its fallback formables NOT = { AND = { check_variable = { formable_committed_id = 15 } OR = { has_global_flag = european_federation has_idea = EU_member } } } } } visible = { has_country_flag = is_NORDEM NOT = { has_cosmetic_tag = NORDEM } } highlight_states = { highlight_state_targets = { state = 1 state = 2 state = 3 state = 4 state = 5 state = 6 state = 8 state = 9 state = 10 state = 11 state = 12 state = 13 state = 14 state = 15 state = 16 state = 17 state = 18 state = 19 state = 30 state = 31 state = 32 state = 33 state = 34 state = 35 state = 36 state = 437 state = 439 state = 442 state = 542 state = 550 state = 824 state = 881 state = 955 state = 973 state = 1161 state = 1162 state = 1190 state = 1191 state = 1192 state = 1193 state = 1194 state = 1195 state = 1196 state = 1197 state = 1240 } } available = { custom_trigger_tooltip = { tooltip = NORDEM_update_flag_tt count_triggers = { amount = 36 1 = { is_core_of = ROOT } 2 = { is_core_of = ROOT } 3 = { is_core_of = ROOT } 4 = { is_core_of = ROOT } 5 = { is_core_of = ROOT } 6 = { is_core_of = ROOT } 8 = { is_core_of = ROOT } 9 = { is_core_of = ROOT } 10 = { is_core_of = ROOT } 11 = { is_core_of = ROOT } 12 = { is_core_of = ROOT } 13 = { is_core_of = ROOT } 14 = { is_core_of = ROOT } 15 = { is_core_of = ROOT } 16 = { is_core_of = ROOT } 17 = { is_core_of = ROOT } 18 = { is_core_of = ROOT } 19 = { is_core_of = ROOT } 30 = { is_core_of = ROOT } 31 = { is_core_of = ROOT } 32 = { is_core_of = ROOT } 33 = { is_core_of = ROOT } 34 = { is_core_of = ROOT } 35 = { is_core_of = ROOT } 36 = { is_core_of = ROOT } 437 = { is_core_of = ROOT } 439 = { is_core_of = ROOT } 442 = { is_core_of = ROOT } 542 = { is_core_of = ROOT } 550 = { is_core_of = ROOT } 824 = { is_core_of = ROOT } 881 = { is_core_of = ROOT } 955 = { is_core_of = ROOT } 973 = { is_core_of = ROOT } 1161 = { is_core_of = ROOT } 1162 = { is_core_of = ROOT } 1190 = { is_core_of = ROOT } 1191 = { is_core_of = ROOT } 1192 = { is_core_of = ROOT } 1193 = { is_core_of = ROOT } 1194 = { is_core_of = ROOT } 1195 = { is_core_of = ROOT } 1196 = { is_core_of = ROOT } 1197 = { is_core_of = ROOT } 1240 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision NORDEM_update_flag" set_cosmetic_tag = NORDEM remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 17 } set_variable = { formable_committed_size = 45 } } } } # Post-formation purchase of unowned cores NORDEM_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 17 } } check_variable = { var = formable_committed_size value = 45 compare = greater_than_or_equals } # A CANZUK commitment stranded by the EU guard must not also block its fallback formables NOT = { AND = { check_variable = { formable_committed_id = 15 } OR = { has_global_flag = european_federation has_idea = EU_member } } } } } visible = { has_country_flag = is_NORDEM } target_root_trigger = { has_country_flag = is_NORDEM } target_array = global.NORDEM_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision NORDEM_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel NORDEM_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove NORDEM_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } } #Arab Maghreb Union form_MAGHREB_category = { ### Integrate ### # Start integrate MAGHREB_integrate_start = { icon = GFX_decision_generic_form_nation ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 18 } } check_variable = { var = formable_committed_size value = 46 compare = greater_than_or_equals } } } visible = { NOT = { has_country_flag = is_MAGHREB } NOT = { is_neo_baathist_uar = yes } NOT = { is_baathist_uar = yes } } available = { custom_trigger_tooltip = { tooltip = MAGHREB_integrate_trigger_tt count_triggers = { amount = 37 369 = { state_owned_or_puppet_owned_by_root = yes } 370 = { state_owned_or_puppet_owned_by_root = yes } 371 = { state_owned_or_puppet_owned_by_root = yes } 372 = { state_owned_or_puppet_owned_by_root = yes } 373 = { state_owned_or_puppet_owned_by_root = yes } 374 = { state_owned_or_puppet_owned_by_root = yes } 375 = { state_owned_or_puppet_owned_by_root = yes } 376 = { state_owned_or_puppet_owned_by_root = yes } 377 = { state_owned_or_puppet_owned_by_root = yes } 378 = { state_owned_or_puppet_owned_by_root = yes } 379 = { state_owned_or_puppet_owned_by_root = yes } 380 = { state_owned_or_puppet_owned_by_root = yes } 381 = { state_owned_or_puppet_owned_by_root = yes } 382 = { state_owned_or_puppet_owned_by_root = yes } 383 = { state_owned_or_puppet_owned_by_root = yes } 384 = { state_owned_or_puppet_owned_by_root = yes } 385 = { state_owned_or_puppet_owned_by_root = yes } 386 = { state_owned_or_puppet_owned_by_root = yes } 387 = { state_owned_or_puppet_owned_by_root = yes } 388 = { state_owned_or_puppet_owned_by_root = yes } 389 = { state_owned_or_puppet_owned_by_root = yes } 390 = { state_owned_or_puppet_owned_by_root = yes } 391 = { state_owned_or_puppet_owned_by_root = yes } 392 = { state_owned_or_puppet_owned_by_root = yes } 393 = { state_owned_or_puppet_owned_by_root = yes } 394 = { state_owned_or_puppet_owned_by_root = yes } 395 = { state_owned_or_puppet_owned_by_root = yes } 396 = { state_owned_or_puppet_owned_by_root = yes } 397 = { state_owned_or_puppet_owned_by_root = yes } 413 = { state_owned_or_puppet_owned_by_root = yes } 495 = { state_owned_or_puppet_owned_by_root = yes } 579 = { state_owned_or_puppet_owned_by_root = yes } 632 = { state_owned_or_puppet_owned_by_root = yes } 918 = { state_owned_or_puppet_owned_by_root = yes } 919 = { state_owned_or_puppet_owned_by_root = yes } 920 = { state_owned_or_puppet_owned_by_root = yes } 1100 = { state_owned_or_puppet_owned_by_root = yes } 1101 = { state_owned_or_puppet_owned_by_root = yes } 1175 = { state_owned_or_puppet_owned_by_root = yes } 1176 = { state_owned_or_puppet_owned_by_root = yes } 1177 = { state_owned_or_puppet_owned_by_root = yes } 1178 = { state_owned_or_puppet_owned_by_root = yes } 1179 = { state_owned_or_puppet_owned_by_root = yes } 1202 = { state_owned_or_puppet_owned_by_root = yes } 1203 = { state_owned_or_puppet_owned_by_root = yes } 1204 = { state_owned_or_puppet_owned_by_root = yes } } } } highlight_states = { highlight_state_targets = { # MAU cores state = 369 #Coastal Mauritania state = 370 #Mauritanian Sahel state = 371 #Adrar state = 413 #Mauritanian Sahara # SHA state = 372 #Tifariti # MOR (states required by available) state = 373 #West-Sahara state = 374 #Tanger-Tetouan-Al Hoceima state = 375 #Marrakesh-Safi state = 376 #Draa-Tafilalet state = 377 #Casablanca-Settat state = 378 #Souss-Massa # ALG (is_algeria_state_owned) state = 379 #M'zab state = 380 #Aurès state = 381 #Tamanrasset state = 382 #Grand Erg Occidental state = 383 #Algerian Atlas state = 384 #Constantinois state = 385 #Kabylia state = 386 #Algérois state = 387 #Oranais state = 394 #Algerian Sahara # TUN cores state = 388 #Tunis state = 389 #Gabès state = 390 #Tunisian Desert # LBA (is_libya_state_owned) state = 391 #Tripolitania state = 392 #Eastern Fezzan state = 393 #Jabal Al Gharbi state = 395 #Benghazi state = 396 #Cyrenaica state = 397 #Southern Cyrenaica state = 579 #Libyan Desert state = 918 #Ghat state = 919 #Sirte state = 920 #Murqub state = 1100 #Al Kufrah state = 1101 #Jebel Uweinat state = 1202 #Serir Tibesti state = 1203 #Haruj state = 1204 #Murzuq & Ubari Deserts } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision MAGHREB_integrate_start" if = { limit = { NOT = { has_country_flag = is_MAGHREB } } set_country_flag = is_MAGHREB set_global_flag = MAGHREB_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_@ROOT custom_effect_tooltip = MAGHREB_start_integrate_tt custom_effect_tooltip = general_integrate_tt add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 18 } set_variable = { formable_committed_size = 46 } } } } #ALG MAGHREB_integrate_ALG = { icon = GFX_decision_generic_form_nation cost = 500 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 18 } } check_variable = { var = formable_committed_size value = 46 compare = greater_than_or_equals } } } allowed = { NOT = { tag = ALG } } visible = { has_country_flag = is_MAGHREB NOT = { has_country_flag = integrated_ALG } } highlight_states = { highlight_state_targets = { state = 379 state = 380 state = 381 state = 382 state = 383 state = 384 state = 385 state = 386 state = 387 state = 394 } } available = { custom_trigger_tooltip = { tooltip = MAGHREB_integrate_ALG_tt 379 = { state_owned_or_puppet_owned_by_root = yes } 380 = { state_owned_or_puppet_owned_by_root = yes } 381 = { state_owned_or_puppet_owned_by_root = yes } 382 = { state_owned_or_puppet_owned_by_root = yes } 383 = { state_owned_or_puppet_owned_by_root = yes } 384 = { state_owned_or_puppet_owned_by_root = yes } 385 = { state_owned_or_puppet_owned_by_root = yes } 386 = { state_owned_or_puppet_owned_by_root = yes } 387 = { state_owned_or_puppet_owned_by_root = yes } 394 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision MAGHREB_integrate_ALG" add_state_core = 379 add_state_core = 380 add_state_core = 381 add_state_core = 382 add_state_core = 383 add_state_core = 384 add_state_core = 385 add_state_core = 386 add_state_core = 387 add_state_core = 394 if = { limit = { country_exists = ALG ALG = { is_subject_of = ROOT all_owned_state = { OR = { state = 379 state = 380 state = 381 state = 382 state = 383 state = 384 state = 385 state = 386 state = 387 state = 394 } } } } ALG = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = ALG transfer_troops = yes } } if = { limit = { NOT = { owns_state = 379 } } transfer_state = 379 } if = { limit = { NOT = { owns_state = 380 } } transfer_state = 380 } if = { limit = { NOT = { owns_state = 381 } } transfer_state = 381 } if = { limit = { NOT = { owns_state = 382 } } transfer_state = 382 } if = { limit = { NOT = { owns_state = 383 } } transfer_state = 383 } if = { limit = { NOT = { owns_state = 384 } } transfer_state = 384 } if = { limit = { NOT = { owns_state = 385 } } transfer_state = 385 } if = { limit = { NOT = { owns_state = 386 } } transfer_state = 386 } if = { limit = { NOT = { owns_state = 387 } } transfer_state = 387 } if = { limit = { NOT = { owns_state = 394 } } transfer_state = 394 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_ALG } } #LBA MAGHREB_integrate_LBA = { icon = GFX_decision_generic_form_nation cost = 450 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 18 } } check_variable = { var = formable_committed_size value = 46 compare = greater_than_or_equals } } } allowed = { NOT = { tag = LBA } NOT = { tag = GNC } NOT = { tag = HOR } NOT = { tag = GNA } } visible = { has_country_flag = is_MAGHREB NOT = { has_country_flag = integrated_LBA } } highlight_states = { highlight_state_targets = { state = 391 state = 392 state = 393 state = 395 state = 396 state = 397 state = 579 state = 918 state = 919 state = 920 state = 1100 state = 1101 state = 1202 state = 1203 state = 1204 } } available = { custom_trigger_tooltip = { tooltip = MAGHREB_integrate_LBA_tt 391 = { state_owned_or_puppet_owned_by_root = yes } 392 = { state_owned_or_puppet_owned_by_root = yes } 393 = { state_owned_or_puppet_owned_by_root = yes } 395 = { state_owned_or_puppet_owned_by_root = yes } 396 = { state_owned_or_puppet_owned_by_root = yes } 397 = { state_owned_or_puppet_owned_by_root = yes } 579 = { state_owned_or_puppet_owned_by_root = yes } 918 = { state_owned_or_puppet_owned_by_root = yes } 919 = { state_owned_or_puppet_owned_by_root = yes } 920 = { state_owned_or_puppet_owned_by_root = yes } 1100 = { state_owned_or_puppet_owned_by_root = yes } 1101 = { state_owned_or_puppet_owned_by_root = yes } 1202 = { state_owned_or_puppet_owned_by_root = yes } 1203 = { state_owned_or_puppet_owned_by_root = yes } 1204 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision MAGHREB_integrate_LBA" add_state_core = 391 add_state_core = 392 add_state_core = 393 add_state_core = 395 add_state_core = 396 add_state_core = 397 add_state_core = 579 add_state_core = 918 add_state_core = 919 add_state_core = 920 add_state_core = 1100 add_state_core = 1101 add_state_core = 1202 add_state_core = 1203 add_state_core = 1204 if = { limit = { country_exists = LBA LBA = { is_subject_of = ROOT all_owned_state = { OR = { state = 391 state = 392 state = 393 state = 395 state = 396 state = 397 state = 579 state = 918 state = 919 state = 920 state = 1100 state = 1101 state = 1202 state = 1203 state = 1204 } } } } LBA = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = LBA transfer_troops = yes } } if = { limit = { country_exists = GNC GNC = { is_subject_of = ROOT all_owned_state = { OR = { state = 391 state = 392 state = 393 state = 395 state = 396 state = 397 state = 579 state = 918 state = 919 state = 920 state = 1100 state = 1101 state = 1202 state = 1203 state = 1204 } } } } GNC = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = GNC transfer_troops = yes } } if = { limit = { country_exists = HOR HOR = { is_subject_of = ROOT all_owned_state = { OR = { state = 391 state = 392 state = 393 state = 395 state = 396 state = 397 state = 579 state = 918 state = 919 state = 920 state = 1100 state = 1101 state = 1202 state = 1203 state = 1204 } } } } HOR = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = HOR transfer_troops = yes } } if = { limit = { country_exists = GNA GNA = { is_subject_of = ROOT all_owned_state = { OR = { state = 391 state = 392 state = 393 state = 395 state = 396 state = 397 state = 579 state = 918 state = 919 state = 920 state = 1100 state = 1101 state = 1202 state = 1203 state = 1204 } } } } GNA = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = GNA transfer_troops = yes } } if = { limit = { NOT = { owns_state = 391 } } transfer_state = 391 } if = { limit = { NOT = { owns_state = 392 } } transfer_state = 392 } if = { limit = { NOT = { owns_state = 393 } } transfer_state = 393 } if = { limit = { NOT = { owns_state = 395 } } transfer_state = 395 } if = { limit = { NOT = { owns_state = 396 } } transfer_state = 396 } if = { limit = { NOT = { owns_state = 397 } } transfer_state = 397 } if = { limit = { NOT = { owns_state = 579 } } transfer_state = 579 } if = { limit = { NOT = { owns_state = 918 } } transfer_state = 918 } if = { limit = { NOT = { owns_state = 919 } } transfer_state = 919 } if = { limit = { NOT = { owns_state = 920 } } transfer_state = 920 } if = { limit = { NOT = { owns_state = 1100 } } transfer_state = 1100 } if = { limit = { NOT = { owns_state = 1101 } } transfer_state = 1101 } if = { limit = { NOT = { owns_state = 1202 } } transfer_state = 1202 } if = { limit = { NOT = { owns_state = 1203 } } transfer_state = 1203 } if = { limit = { NOT = { owns_state = 1204 } } transfer_state = 1204 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_LBA } } #MOR MAGHREB_integrate_MOR = { icon = GFX_decision_generic_form_nation cost = 450 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 18 } } check_variable = { var = formable_committed_size value = 46 compare = greater_than_or_equals } } } allowed = { NOT = { tag = MOR } } visible = { has_country_flag = is_MAGHREB NOT = { has_country_flag = integrated_MOR } } highlight_states = { highlight_state_targets = { state = 372 state = 373 state = 374 state = 375 state = 376 state = 377 state = 378 state = 495 state = 632 state = 1175 state = 1176 state = 1177 state = 1178 state = 1179 } } available = { custom_trigger_tooltip = { tooltip = MAGHREB_integrate_MOR_tt 372 = { state_owned_or_puppet_owned_by_root = yes } 373 = { state_owned_or_puppet_owned_by_root = yes } 374 = { state_owned_or_puppet_owned_by_root = yes } 375 = { state_owned_or_puppet_owned_by_root = yes } 376 = { state_owned_or_puppet_owned_by_root = yes } 377 = { state_owned_or_puppet_owned_by_root = yes } 378 = { state_owned_or_puppet_owned_by_root = yes } 495 = { state_owned_or_puppet_owned_by_root = yes } 632 = { state_owned_or_puppet_owned_by_root = yes } 1175 = { state_owned_or_puppet_owned_by_root = yes } 1176 = { state_owned_or_puppet_owned_by_root = yes } 1177 = { state_owned_or_puppet_owned_by_root = yes } 1178 = { state_owned_or_puppet_owned_by_root = yes } 1179 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision MAGHREB_integrate_MOR" add_state_core = 372 add_state_core = 373 add_state_core = 374 add_state_core = 375 add_state_core = 376 add_state_core = 377 add_state_core = 378 add_state_core = 495 add_state_core = 632 add_state_core = 1175 add_state_core = 1176 add_state_core = 1177 add_state_core = 1178 add_state_core = 1179 if = { limit = { country_exists = MOR MOR = { is_subject_of = ROOT all_owned_state = { OR = { state = 372 state = 373 state = 374 state = 375 state = 376 state = 377 state = 378 state = 495 state = 632 state = 1175 state = 1176 state = 1177 state = 1178 state = 1179 } } } } MOR = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = MOR transfer_troops = yes } } if = { limit = { NOT = { owns_state = 372 } } transfer_state = 372 } if = { limit = { NOT = { owns_state = 373 } } transfer_state = 373 } if = { limit = { NOT = { owns_state = 374 } } transfer_state = 374 } if = { limit = { NOT = { owns_state = 375 } } transfer_state = 375 } if = { limit = { NOT = { owns_state = 376 } } transfer_state = 376 } if = { limit = { NOT = { owns_state = 377 } } transfer_state = 377 } if = { limit = { NOT = { owns_state = 378 } } transfer_state = 378 } if = { limit = { NOT = { owns_state = 495 } } transfer_state = 495 } if = { limit = { NOT = { owns_state = 632 } } transfer_state = 632 } if = { limit = { NOT = { owns_state = 1175 } } transfer_state = 1175 } if = { limit = { NOT = { owns_state = 1176 } } transfer_state = 1176 } if = { limit = { NOT = { owns_state = 1177 } } transfer_state = 1177 } if = { limit = { NOT = { owns_state = 1178 } } transfer_state = 1178 } if = { limit = { NOT = { owns_state = 1179 } } transfer_state = 1179 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_MOR } } #SHA MAGHREB_integrate_SHA = { icon = GFX_decision_generic_form_nation cost = 200 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 18 } } check_variable = { var = formable_committed_size value = 46 compare = greater_than_or_equals } } } allowed = { NOT = { tag = SHA } } visible = { has_country_flag = is_MAGHREB NOT = { has_country_flag = integrated_SHA } } highlight_states = { highlight_state_targets = { state = 372 state = 373 } } available = { custom_trigger_tooltip = { tooltip = MAGHREB_integrate_SHA_tt 372 = { state_owned_or_puppet_owned_by_root = yes } 373 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision MAGHREB_integrate_SHA" add_state_core = 372 add_state_core = 373 if = { limit = { country_exists = SHA SHA = { is_subject_of = ROOT all_owned_state = { OR = { state = 372 state = 373 } } } } SHA = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = SHA transfer_troops = yes } } if = { limit = { NOT = { owns_state = 372 } } transfer_state = 372 } if = { limit = { NOT = { owns_state = 373 } } transfer_state = 373 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_SHA } } #TUN MAGHREB_integrate_TUN = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 18 } } check_variable = { var = formable_committed_size value = 46 compare = greater_than_or_equals } } } allowed = { NOT = { tag = TUN } } visible = { has_country_flag = is_MAGHREB NOT = { has_country_flag = integrated_TUN } } highlight_states = { highlight_state_targets = { state = 388 state = 389 state = 390 } } available = { custom_trigger_tooltip = { tooltip = MAGHREB_integrate_TUN_tt 388 = { state_owned_or_puppet_owned_by_root = yes } 389 = { state_owned_or_puppet_owned_by_root = yes } 390 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision MAGHREB_integrate_TUN" add_state_core = 388 add_state_core = 389 add_state_core = 390 if = { limit = { country_exists = TUN TUN = { is_subject_of = ROOT all_owned_state = { OR = { state = 388 state = 389 state = 390 } } } } TUN = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = TUN transfer_troops = yes } } if = { limit = { NOT = { owns_state = 388 } } transfer_state = 388 } if = { limit = { NOT = { owns_state = 389 } } transfer_state = 389 } if = { limit = { NOT = { owns_state = 390 } } transfer_state = 390 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_TUN } } #MAU MAGHREB_integrate_MAU = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 18 } } check_variable = { var = formable_committed_size value = 46 compare = greater_than_or_equals } } } allowed = { NOT = { tag = MAU } } visible = { has_country_flag = is_MAGHREB NOT = { has_country_flag = integrated_MAU } } highlight_states = { highlight_state_targets = { state = 369 state = 370 state = 371 state = 413 } } available = { custom_trigger_tooltip = { tooltip = MAGHREB_integrate_MAU_tt 369 = { state_owned_or_puppet_owned_by_root = yes } 370 = { state_owned_or_puppet_owned_by_root = yes } 371 = { state_owned_or_puppet_owned_by_root = yes } 413 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision MAGHREB_integrate_MAU" add_state_core = 369 add_state_core = 370 add_state_core = 371 add_state_core = 413 if = { limit = { country_exists = MAU MAU = { is_subject_of = ROOT all_owned_state = { OR = { state = 369 state = 370 state = 371 state = 413 } } } } MAU = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = MAU transfer_troops = yes } } if = { limit = { NOT = { owns_state = 369 } } transfer_state = 369 } if = { limit = { NOT = { owns_state = 370 } } transfer_state = 370 } if = { limit = { NOT = { owns_state = 371 } } transfer_state = 371 } if = { limit = { NOT = { owns_state = 413 } } transfer_state = 413 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_MAU } } ### Cosmetic ### MAGHREB_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 18 } } check_variable = { var = formable_committed_size value = 46 compare = greater_than_or_equals } } } visible = { has_country_flag = is_MAGHREB NOT = { OR = { has_global_flag = european_federation has_idea = EU_member has_cosmetic_tag = MAGHREB } } } highlight_states = { highlight_state_targets = { state = 369 state = 370 state = 371 state = 372 state = 373 state = 374 state = 375 state = 376 state = 377 state = 378 state = 379 state = 380 state = 381 state = 382 state = 383 state = 384 state = 385 state = 386 state = 387 state = 388 state = 389 state = 390 state = 391 state = 392 state = 393 state = 394 state = 395 state = 396 state = 397 state = 413 state = 495 state = 579 state = 632 state = 918 state = 919 state = 920 state = 1100 state = 1101 state = 1175 state = 1176 state = 1177 state = 1178 state = 1179 state = 1202 state = 1203 state = 1204 } } available = { custom_trigger_tooltip = { tooltip = MAGHREB_update_flag_tt count_triggers = { amount = 37 369 = { is_core_of = ROOT } 370 = { is_core_of = ROOT } 371 = { is_core_of = ROOT } 372 = { is_core_of = ROOT } 373 = { is_core_of = ROOT } 374 = { is_core_of = ROOT } 375 = { is_core_of = ROOT } 376 = { is_core_of = ROOT } 377 = { is_core_of = ROOT } 378 = { is_core_of = ROOT } 379 = { is_core_of = ROOT } 380 = { is_core_of = ROOT } 381 = { is_core_of = ROOT } 382 = { is_core_of = ROOT } 383 = { is_core_of = ROOT } 384 = { is_core_of = ROOT } 385 = { is_core_of = ROOT } 386 = { is_core_of = ROOT } 387 = { is_core_of = ROOT } 388 = { is_core_of = ROOT } 389 = { is_core_of = ROOT } 390 = { is_core_of = ROOT } 391 = { is_core_of = ROOT } 392 = { is_core_of = ROOT } 393 = { is_core_of = ROOT } 394 = { is_core_of = ROOT } 395 = { is_core_of = ROOT } 396 = { is_core_of = ROOT } 397 = { is_core_of = ROOT } 413 = { is_core_of = ROOT } 495 = { is_core_of = ROOT } 579 = { is_core_of = ROOT } 632 = { is_core_of = ROOT } 918 = { is_core_of = ROOT } 919 = { is_core_of = ROOT } 920 = { is_core_of = ROOT } 1100 = { is_core_of = ROOT } 1101 = { is_core_of = ROOT } 1175 = { is_core_of = ROOT } 1176 = { is_core_of = ROOT } 1177 = { is_core_of = ROOT } 1178 = { is_core_of = ROOT } 1179 = { is_core_of = ROOT } 1202 = { is_core_of = ROOT } 1203 = { is_core_of = ROOT } 1204 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision MAGHREB_update_flag" set_cosmetic_tag = MAGHREB remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 18 } set_variable = { formable_committed_size = 46 } } } } # Post-formation purchase of unowned cores MAGHREB_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 18 } } check_variable = { var = formable_committed_size value = 46 compare = greater_than_or_equals } } } visible = { has_country_flag = is_MAGHREB } target_root_trigger = { has_country_flag = is_MAGHREB } target_array = global.MAGHREB_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision MAGHREB_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel MAGHREB_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove MAGHREB_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } } #West Indies Federation form_WESTFED_category = { ### Integrate ### # Start integrate WESTFED_integrate_start = { icon = GFX_decision_generic_form_nation ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 19 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } highlight_states = { highlight_states_trigger = { OR = { is_core_of = TRI is_core_of = GRA is_core_of = STL is_core_of = ANT is_core_of = BAR is_core_of = STV is_core_of = STK is_core_of = DMI is_core_of = JAM } } } visible = { NOT = { has_country_flag = is_WESTFED } } available = { custom_trigger_tooltip = { tooltip = WESTFED_integrate_trigger_tt count_triggers = { amount = 7 858 = { state_owned_or_puppet_owned_by_root = yes } 863 = { state_owned_or_puppet_owned_by_root = yes } 864 = { state_owned_or_puppet_owned_by_root = yes } 865 = { state_owned_or_puppet_owned_by_root = yes } 866 = { state_owned_or_puppet_owned_by_root = yes } 867 = { state_owned_or_puppet_owned_by_root = yes } 868 = { state_owned_or_puppet_owned_by_root = yes } 869 = { state_owned_or_puppet_owned_by_root = yes } 1210 = { state_owned_or_puppet_owned_by_root = yes } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision WESTFED_integrate_start" if = { limit = { NOT = { has_country_flag = is_WESTFED } } set_country_flag = is_WESTFED set_global_flag = WESTFED_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_@ROOT custom_effect_tooltip = WESTFED_start_integrate_tt custom_effect_tooltip = general_integrate_tt add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 19 } set_variable = { formable_committed_size = 9 } } } } #TRI WESTFED_integrate_TRI = { icon = GFX_decision_generic_form_nation cost = 250 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 19 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } allowed = { NOT = { tag = TRI } } visible = { has_country_flag = is_WESTFED NOT = { has_country_flag = integrated_TRI } } highlight_states = { highlight_state_targets = { state = 869 } } available = { custom_trigger_tooltip = { tooltip = WESTFED_integrate_TRI_tt 869 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision WESTFED_integrate_TRI" add_state_core = 869 if = { limit = { country_exists = TRI TRI = { is_subject_of = ROOT all_owned_state = { state = 869 } } } TRI = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = TRI transfer_troops = yes } } if = { limit = { NOT = { owns_state = 869 } } transfer_state = 869 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_TRI } } #GRA WESTFED_integrate_GRA = { icon = GFX_decision_generic_form_nation cost = 150 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 19 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } allowed = { NOT = { tag = GRA } } visible = { has_country_flag = is_WESTFED NOT = { has_country_flag = integrated_GRA } } highlight_states = { highlight_state_targets = { state = 868 } } available = { custom_trigger_tooltip = { tooltip = WESTFED_integrate_GRA_tt 868 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision WESTFED_integrate_GRA" add_state_core = 868 if = { limit = { country_exists = GRA GRA = { is_subject_of = ROOT all_owned_state = { state = 868 } } } GRA = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = GRA transfer_troops = yes } } if = { limit = { NOT = { owns_state = 868 } } transfer_state = 868 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_GRA } } #STV WESTFED_integrate_STV = { icon = GFX_decision_generic_form_nation cost = 150 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 19 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } allowed = { NOT = { tag = STV } } visible = { has_country_flag = is_WESTFED NOT = { has_country_flag = integrated_STV } } highlight_states = { highlight_state_targets = { state = 866 } } available = { custom_trigger_tooltip = { tooltip = WESTFED_integrate_STV_tt 866 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision WESTFED_integrate_STV" add_state_core = 866 if = { limit = { country_exists = STV STV = { is_subject_of = ROOT all_owned_state = { state = 866 } } } STV = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = STV transfer_troops = yes } } if = { limit = { NOT = { owns_state = 866 } } transfer_state = 866 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_STV } } #ANT WESTFED_integrate_ANT = { icon = GFX_decision_generic_form_nation cost = 150 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 19 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } allowed = { NOT = { tag = ANT } } visible = { has_country_flag = is_WESTFED NOT = { has_country_flag = integrated_ANT } } highlight_states = { highlight_state_targets = { state = 1210 } } available = { custom_trigger_tooltip = { tooltip = WESTFED_integrate_ANT_tt 1210 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision WESTFED_integrate_ANT" add_state_core = 1210 if = { limit = { country_exists = ANT ANT = { is_subject_of = ROOT all_owned_state = { state = 1210 } } } ANT = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = ANT transfer_troops = yes } } if = { limit = { NOT = { owns_state = 1210 } } transfer_state = 1210 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_ANT } } #BAR WESTFED_integrate_BAR = { icon = GFX_decision_generic_form_nation cost = 150 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 19 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } allowed = { NOT = { tag = BAR } } visible = { has_country_flag = is_WESTFED NOT = { has_country_flag = integrated_BAR } } highlight_states = { highlight_state_targets = { state = 865 } } available = { custom_trigger_tooltip = { tooltip = WESTFED_integrate_BAR_tt 865 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision WESTFED_integrate_BAR" add_state_core = 865 if = { limit = { country_exists = BAR BAR = { is_subject_of = ROOT all_owned_state = { state = 865 } } } BAR = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = BAR transfer_troops = yes } } if = { limit = { NOT = { owns_state = 865 } } transfer_state = 865 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_BAR } } #STL WESTFED_integrate_STL = { icon = GFX_decision_generic_form_nation cost = 150 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 19 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } allowed = { NOT = { tag = STL } } visible = { has_country_flag = is_WESTFED NOT = { has_country_flag = integrated_STL } } highlight_states = { highlight_state_targets = { state = 864 } } available = { custom_trigger_tooltip = { tooltip = WESTFED_integrate_STL_tt 864 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision WESTFED_integrate_STL" add_state_core = 864 if = { limit = { country_exists = STL STL = { is_subject_of = ROOT all_owned_state = { state = 864 } } } STL = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = STL transfer_troops = yes } } if = { limit = { NOT = { owns_state = 864 } } transfer_state = 864 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_STL } } #STK WESTFED_integrate_STK = { icon = GFX_decision_generic_form_nation cost = 150 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 19 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } allowed = { NOT = { tag = STK } } visible = { has_country_flag = is_WESTFED NOT = { has_country_flag = integrated_STK } } highlight_states = { highlight_state_targets = { state = 863 } } available = { custom_trigger_tooltip = { tooltip = WESTFED_integrate_STK_tt 863 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision WESTFED_integrate_STK" add_state_core = 863 if = { limit = { country_exists = STK STK = { is_subject_of = ROOT all_owned_state = { state = 863 } } } STK = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = STK transfer_troops = yes } } if = { limit = { NOT = { owns_state = 863 } } transfer_state = 863 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_STK } } #DMI WESTFED_integrate_DMI = { icon = GFX_decision_generic_form_nation cost = 150 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 19 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } allowed = { NOT = { tag = DMI } } visible = { has_country_flag = is_WESTFED NOT = { has_country_flag = integrated_DMI } } highlight_states = { highlight_state_targets = { state = 867 } } available = { custom_trigger_tooltip = { tooltip = WESTFED_integrate_DMI_tt 867 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision WESTFED_integrate_DMI" add_state_core = 867 if = { limit = { country_exists = DMI DMI = { is_subject_of = ROOT all_owned_state = { state = 867 } } } DMI = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = DMI transfer_troops = yes } } if = { limit = { NOT = { owns_state = 867 } } transfer_state = 867 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_DMI } } #JAM WESTFED_integrate_JAM = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 19 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } allowed = { NOT = { tag = JAM } } visible = { has_country_flag = is_WESTFED NOT = { has_country_flag = integrated_JAM } } highlight_states = { highlight_state_targets = { state = 858 } } available = { custom_trigger_tooltip = { tooltip = WESTFED_integrate_JAM_tt 858 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision WESTFED_integrate_JAM" add_state_core = 858 if = { limit = { country_exists = JAM JAM = { is_subject_of = ROOT all_owned_state = { state = 858 } } } JAM = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = JAM transfer_troops = yes } } if = { limit = { NOT = { owns_state = 858 } } transfer_state = 858 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_JAM } } #CAYMAN WESTFED_integrate_CAYMAN = { icon = GFX_decision_generic_form_nation cost = 150 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 19 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } allowed = { NOT = { tag = ENG } } visible = { has_country_flag = is_WESTFED NOT = { has_country_flag = integrated_CAYMAN } } highlight_states = { highlight_state_targets = { state = 1007 } } available = { OR = { ENG = { is_subject_of = ROOT has_war = no owns_state = 1007 } owns_state = 1007 } if = { limit = { NOT = { any_subject_country = { owns_state = 1007 } } } 1007 = { compliance > 50 resistance < 30 } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision WESTFED_integrate_CAYMAN" add_state_core = 1007 if = { limit = { ENG = { is_subject_of = ROOT has_war = no owns_state = 1007 } } ROOT = { transfer_state = 1007 } } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_CAYMAN } } #TURKS WESTFED_integrate_TURKS = { icon = GFX_decision_generic_form_nation cost = 150 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 19 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } allowed = { NOT = { tag = ENG } } visible = { has_country_flag = is_WESTFED NOT = { has_country_flag = integrated_TURKS } } highlight_states = { highlight_state_targets = { state = 1008 } } available = { OR = { ENG = { is_subject_of = ROOT has_war = no owns_state = 1008 } owns_state = 1008 } if = { limit = { NOT = { any_subject_country = { owns_state = 1008 } } } 1008 = { compliance > 50 resistance < 30 } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision WESTFED_integrate_TURKS" add_state_core = 1008 if = { limit = { ENG = { is_subject_of = ROOT has_war = no owns_state = 1008 } } ROOT = { transfer_state = 1008 } } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_TURKS } } #ANTILLES WESTFED_integrate_ANTILLES = { icon = GFX_decision_generic_form_nation cost = 150 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 19 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } allowed = { NOT = { tag = ENG } } visible = { has_country_flag = is_WESTFED NOT = { has_country_flag = integrated_ANTILLES } } highlight_states = { highlight_state_targets = { state = 23 } } available = { OR = { ENG = { is_subject_of = ROOT has_war = no owns_state = 23 } owns_state = 23 } if = { limit = { NOT = { any_subject_country = { owns_state = 23 } } } 23 = { compliance > 50 resistance < 30 } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision WESTFED_integrate_ANTILLES" add_state_core = 23 if = { limit = { ENG = { is_subject_of = ROOT has_war = no owns_state = 23 } } ROOT = { transfer_state = 23 } } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_ANTILLES } } #GUADELOUPE WESTFED_integrate_GUADELOUPE = { icon = GFX_decision_generic_form_nation cost = 200 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 19 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } allowed = { NOT = { tag = FRA } } visible = { has_country_flag = is_WESTFED NOT = { has_country_flag = integrated_GUADELOUPE } } highlight_states = { highlight_state_targets = { state = 68 } } available = { OR = { FRA = { is_subject_of = ROOT has_war = no owns_state = 68 } owns_state = 68 } if = { limit = { NOT = { any_subject_country = { owns_state = 68 } } } 68 = { compliance > 50 resistance < 30 } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision WESTFED_integrate_GUADELOUPE" add_state_core = 68 if = { limit = { FRA = { is_subject_of = ROOT has_war = no owns_state = 68 } } ROOT = { transfer_state = 68 } } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_GUADELOUPE } } ### Cosmetic ### WESTFED_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 19 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } visible = { has_country_flag = is_WESTFED NOT = { has_cosmetic_tag = WESTFED } } highlight_states = { highlight_state_targets = { state = 858 state = 863 state = 864 state = 865 state = 866 state = 867 state = 868 state = 869 state = 1210 } } available = { custom_trigger_tooltip = { tooltip = WESTFED_update_flag_tt count_triggers = { amount = 7 858 = { is_core_of = ROOT } 863 = { is_core_of = ROOT } 864 = { is_core_of = ROOT } 865 = { is_core_of = ROOT } 866 = { is_core_of = ROOT } 867 = { is_core_of = ROOT } 868 = { is_core_of = ROOT } 869 = { is_core_of = ROOT } 1210 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision WESTFED_update_flag" set_cosmetic_tag = WESTFED remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 19 } set_variable = { formable_committed_size = 9 } } } } # Post-formation purchase of unowned cores WESTFED_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 19 } } check_variable = { var = formable_committed_size value = 9 compare = greater_than_or_equals } } } visible = { has_country_flag = is_WESTFED } target_root_trigger = { has_country_flag = is_WESTFED } target_array = global.WESTFED_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision WESTFED_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel WESTFED_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove WESTFED_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } } # Austria-Hungary form_AUSHUN_category = { ### Integrate ### # Start integrate AUSHUN_integrate_start = { icon = GFX_decision_generic_form_nation ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 20 } } check_variable = { var = formable_committed_size value = 35 compare = greater_than_or_equals } } } highlight_states = { highlight_state_targets = { # AUS region state = 75 state = 76 state = 78 state = 285 state = 286 state = 1061 # HUN region state = 121 state = 122 state = 123 state = 999 # CZE region state = 117 state = 118 state = 1017 # SLV region state = 119 state = 120 # SLO region state = 151 state = 909 state = 910 # BOS region state = 126 state = 127 # CRO/Galicia/etc. state = 124 state = 125 state = 128 state = 129 state = 628 state = 700 state = 701 state = 1018 state = 1051 state = 1052 state = 1053 state = 1054 state = 1098 state = 1111 state = 1247 } } visible = { NOT = { has_country_flag = is_AUSHUN } } available = { custom_trigger_tooltip = { tooltip = AUSHUN_integrate_trigger_tt count_triggers = { amount = 26 122 = { state_owned_or_puppet_owned_by_root = yes } 121 = { state_owned_or_puppet_owned_by_root = yes } 999 = { state_owned_or_puppet_owned_by_root = yes } 123 = { state_owned_or_puppet_owned_by_root = yes } 76 = { state_owned_or_puppet_owned_by_root = yes } 75 = { state_owned_or_puppet_owned_by_root = yes } 286 = { state_owned_or_puppet_owned_by_root = yes } 285 = { state_owned_or_puppet_owned_by_root = yes } 78 = { state_owned_or_puppet_owned_by_root = yes } 1061 = { state_owned_or_puppet_owned_by_root = yes } 126 = { state_owned_or_puppet_owned_by_root = yes } 127 = { state_owned_or_puppet_owned_by_root = yes } 119 = { state_owned_or_puppet_owned_by_root = yes } 120 = { state_owned_or_puppet_owned_by_root = yes } 151 = { state_owned_or_puppet_owned_by_root = yes } 909 = { state_owned_or_puppet_owned_by_root = yes } 910 = { state_owned_or_puppet_owned_by_root = yes } 628 = { state_owned_or_puppet_owned_by_root = yes } 1098 = { state_owned_or_puppet_owned_by_root = yes } 700 = { state_owned_or_puppet_owned_by_root = yes } 701 = { state_owned_or_puppet_owned_by_root = yes } 124 = { state_owned_or_puppet_owned_by_root = yes } 125 = { state_owned_or_puppet_owned_by_root = yes } 1017 = { state_owned_or_puppet_owned_by_root = yes } 117 = { state_owned_or_puppet_owned_by_root = yes } 118 = { state_owned_or_puppet_owned_by_root = yes } 1018 = { state_owned_or_puppet_owned_by_root = yes } 1051 = { state_owned_or_puppet_owned_by_root = yes } 1054 = { state_owned_or_puppet_owned_by_root = yes } 1053 = { state_owned_or_puppet_owned_by_root = yes } 1052 = { state_owned_or_puppet_owned_by_root = yes } 128 = { state_owned_or_puppet_owned_by_root = yes } 129 = { state_owned_or_puppet_owned_by_root = yes } 1111 = { state_owned_or_puppet_owned_by_root = yes } 1247 = { state_owned_or_puppet_owned_by_root = yes } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision AUSHUN_integrate_start" if = { limit = { NOT = { has_country_flag = is_AUSHUN } } set_country_flag = is_AUSHUN set_global_flag = AUSHUN_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_@ROOT custom_effect_tooltip = AUSHUN_start_integrate_tt custom_effect_tooltip = general_integrate_tt add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 20 } set_variable = { formable_committed_size = 35 } } } } #AUS AUSHUN_integrate_AUS = { icon = GFX_decision_generic_form_nation cost = 500 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 20 } } check_variable = { var = formable_committed_size value = 35 compare = greater_than_or_equals } } } allowed = { NOT = { tag = AUS } } visible = { has_country_flag = is_AUSHUN NOT = { has_country_flag = integrated_AUS } } highlight_states = { highlight_state_targets = { state = 75 state = 76 state = 286 } } available = { custom_trigger_tooltip = { tooltip = AUSHUN_integrate_AUS_tt 75 = { state_owned_or_puppet_owned_by_root = yes } 76 = { state_owned_or_puppet_owned_by_root = yes } 286 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision AUSHUN_integrate_AUS" add_state_core = 75 add_state_core = 76 add_state_core = 286 if = { limit = { country_exists = AUS AUS = { is_subject_of = ROOT all_owned_state = { OR = { state = 75 state = 76 state = 286 } } } } AUS = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = AUS transfer_troops = yes } } if = { limit = { NOT = { owns_state = 75 } } transfer_state = 75 } if = { limit = { NOT = { owns_state = 76 } } transfer_state = 76 } if = { limit = { NOT = { owns_state = 286 } } transfer_state = 286 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_AUS } } #HUN AUSHUN_integrate_HUN = { icon = GFX_decision_generic_form_nation cost = 500 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 20 } } check_variable = { var = formable_committed_size value = 35 compare = greater_than_or_equals } } } allowed = { NOT = { tag = HUN } } visible = { has_country_flag = is_AUSHUN NOT = { has_country_flag = integrated_HUN } } highlight_states = { highlight_state_targets = { state = 121 state = 122 state = 123 state = 999 } } available = { custom_trigger_tooltip = { tooltip = AUSHUN_integrate_HUN_tt 121 = { state_owned_or_puppet_owned_by_root = yes } 122 = { state_owned_or_puppet_owned_by_root = yes } 123 = { state_owned_or_puppet_owned_by_root = yes } 999 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision AUSHUN_integrate_HUN" add_state_core = 121 add_state_core = 122 add_state_core = 123 add_state_core = 999 if = { limit = { country_exists = HUN HUN = { is_subject_of = ROOT all_owned_state = { OR = { state = 121 state = 122 state = 123 state = 999 } } } } HUN = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = HUN transfer_troops = yes } } if = { limit = { NOT = { owns_state = 121 } } transfer_state = 121 } if = { limit = { NOT = { owns_state = 122 } } transfer_state = 122 } if = { limit = { NOT = { owns_state = 123 } } transfer_state = 123 } if = { limit = { NOT = { owns_state = 999 } } transfer_state = 999 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_HUN } } #SLV AUSHUN_integrate_SLV = { icon = GFX_decision_generic_form_nation cost = 350 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 20 } } check_variable = { var = formable_committed_size value = 35 compare = greater_than_or_equals } } } allowed = { NOT = { tag = SLV } } visible = { has_country_flag = is_AUSHUN NOT = { has_country_flag = integrated_SLV } } highlight_states = { highlight_state_targets = { state = 124 state = 125 } } available = { custom_trigger_tooltip = { tooltip = AUSHUN_integrate_SLV_tt 124 = { state_owned_or_puppet_owned_by_root = yes } 125 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision AUSHUN_integrate_SLV" add_state_core = 124 add_state_core = 125 if = { limit = { country_exists = SLV SLV = { is_subject_of = ROOT all_owned_state = { OR = { state = 124 state = 125 } } } } SLV = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = SLV transfer_troops = yes } } if = { limit = { NOT = { owns_state = 124 } } transfer_state = 124 } if = { limit = { NOT = { owns_state = 125 } } transfer_state = 125 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_SLV } } #NORTHITA AUSHUN_integrate_NORTHITA = { icon = GFX_decision_generic_form_nation cost = 150 days_remove = 180 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 20 } } check_variable = { var = formable_committed_size value = 35 compare = greater_than_or_equals } } } allowed = { NOT = { tag = ITA } } visible = { has_country_flag = is_AUSHUN NOT = { has_country_flag = integrated_NORTHITA } } highlight_states = { highlight_state_targets = { state = 285 state = 1061 } } available = { OR = { ITA = { is_subject_of = ROOT has_war = no owns_state = 285 owns_state = 1061 } AND = { owns_state = 285 owns_state = 1061 } } if = { limit = { NOT = { any_subject_country = { owns_state = 285 owns_state = 1061 } } } 285 = { compliance > 50 resistance < 30 } 1061 = { compliance > 50 resistance < 30 } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision AUSHUN_integrate_NORTHITA" add_state_core = 285 add_state_core = 1061 if = { limit = { ITA = { is_subject_of = ROOT has_war = no owns_state = 285 owns_state = 1061 } } ROOT = { transfer_state = 285 transfer_state = 1061 } } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_NORTHITA } } #CRO AUSHUN_integrate_CRO = { icon = GFX_decision_generic_form_nation cost = 350 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 20 } } check_variable = { var = formable_committed_size value = 35 compare = greater_than_or_equals } } } allowed = { NOT = { tag = CRO } } visible = { has_country_flag = is_AUSHUN NOT = { has_country_flag = integrated_CRO } } highlight_states = { highlight_state_targets = { state = 126 state = 127 } } available = { custom_trigger_tooltip = { tooltip = AUSHUN_integrate_CRO_tt 126 = { state_owned_or_puppet_owned_by_root = yes } 127 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision AUSHUN_integrate_CRO" add_state_core = 126 add_state_core = 127 if = { limit = { country_exists = CRO CRO = { is_subject_of = ROOT all_owned_state = { OR = { state = 126 state = 127 } } } } CRO = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = CRO transfer_troops = yes } } if = { limit = { NOT = { owns_state = 126 } } transfer_state = 126 } if = { limit = { NOT = { owns_state = 127 } } transfer_state = 127 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_CRO } } #BOS AUSHUN_integrate_BOS = { icon = GFX_decision_generic_form_nation cost = 350 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 20 } } check_variable = { var = formable_committed_size value = 35 compare = greater_than_or_equals } } } allowed = { NOT = { tag = BOS } } visible = { has_country_flag = is_AUSHUN NOT = { has_country_flag = integrated_BOS } } highlight_states = { highlight_state_targets = { state = 128 state = 129 state = 1051 state = 1052 state = 1053 state = 1054 } } available = { custom_trigger_tooltip = { tooltip = AUSHUN_integrate_BOS_tt 128 = { state_owned_or_puppet_owned_by_root = yes } 129 = { state_owned_or_puppet_owned_by_root = yes } 1051 = { state_owned_or_puppet_owned_by_root = yes } 1052 = { state_owned_or_puppet_owned_by_root = yes } 1053 = { state_owned_or_puppet_owned_by_root = yes } 1054 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision AUSHUN_integrate_BOS" add_state_core = 128 add_state_core = 129 add_state_core = 1051 add_state_core = 1052 add_state_core = 1053 add_state_core = 1054 if = { limit = { country_exists = BOS BOS = { is_subject_of = ROOT all_owned_state = { OR = { state = 128 state = 129 state = 1051 state = 1052 state = 1053 state = 1054 } } } } BOS = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = BOS transfer_troops = yes } } if = { limit = { NOT = { owns_state = 128 } } transfer_state = 128 } if = { limit = { NOT = { owns_state = 129 } } transfer_state = 129 } if = { limit = { NOT = { owns_state = 1051 } } transfer_state = 1051 } if = { limit = { NOT = { owns_state = 1052 } } transfer_state = 1052 } if = { limit = { NOT = { owns_state = 1053 } } transfer_state = 1053 } if = { limit = { NOT = { owns_state = 1054 } } transfer_state = 1054 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_BOS } } #SLO AUSHUN_integrate_SLO = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 20 } } check_variable = { var = formable_committed_size value = 35 compare = greater_than_or_equals } } } allowed = { NOT = { tag = SLO } } visible = { has_country_flag = is_AUSHUN NOT = { has_country_flag = integrated_SLO } } highlight_states = { highlight_state_targets = { state = 119 state = 120 } } available = { custom_trigger_tooltip = { tooltip = AUSHUN_integrate_SLO_tt 119 = { state_owned_or_puppet_owned_by_root = yes } 120 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision AUSHUN_integrate_SLO" add_state_core = 119 add_state_core = 120 if = { limit = { country_exists = SLO SLO = { is_subject_of = ROOT all_owned_state = { OR = { state = 119 state = 120 } } } } SLO = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = SLO transfer_troops = yes } } if = { limit = { NOT = { owns_state = 119 } } transfer_state = 119 } if = { limit = { NOT = { owns_state = 120 } } transfer_state = 120 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_SLO } } #AUSROM AUSHUN_integrate_AUSROM = { icon = GFX_decision_generic_form_nation cost = 350 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 20 } } check_variable = { var = formable_committed_size value = 35 compare = greater_than_or_equals } } } allowed = { NOT = { tag = ROM } } visible = { has_country_flag = is_AUSHUN NOT = { has_country_flag = integrated_AUSROM } } highlight_states = { highlight_state_targets = { state = 151 state = 909 state = 910 } } available = { OR = { ROM = { is_subject_of = ROOT has_war = no owns_state = 151 owns_state = 909 owns_state = 910 } AND = { owns_state = 151 owns_state = 909 owns_state = 910 } } if = { limit = { NOT = { any_subject_country = { owns_state = 151 owns_state = 909 owns_state = 910 } } } 151 = { compliance > 50 resistance < 30 } 909 = { compliance > 50 resistance < 30 } 910 = { compliance > 50 resistance < 30 } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision AUSHUN_integrate_AUSROM" add_state_core = 151 add_state_core = 909 add_state_core = 910 if = { limit = { ROM = { is_subject_of = ROOT has_war = no owns_state = 151 owns_state = 909 owns_state = 910 } } ROOT = { transfer_state = 151 transfer_state = 909 transfer_state = 910 } } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_AUSROM } } #CZE AUSHUN_integrate_CZE = { icon = GFX_decision_generic_form_nation cost = 500 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 20 } } check_variable = { var = formable_committed_size value = 35 compare = greater_than_or_equals } } } allowed = { NOT = { tag = CZE } } visible = { has_country_flag = is_AUSHUN NOT = { has_country_flag = integrated_CZE } } highlight_states = { highlight_state_targets = { state = 117 state = 118 state = 1017 state = 1018 } } available = { custom_trigger_tooltip = { tooltip = AUSHUN_integrate_CZE_tt 117 = { state_owned_or_puppet_owned_by_root = yes } 118 = { state_owned_or_puppet_owned_by_root = yes } 1017 = { state_owned_or_puppet_owned_by_root = yes } 1018 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision AUSHUN_integrate_CZE" add_state_core = 117 add_state_core = 118 add_state_core = 1017 add_state_core = 1018 if = { limit = { country_exists = CZE CZE = { is_subject_of = ROOT all_owned_state = { OR = { state = 117 state = 118 state = 1017 state = 1018 } } } } CZE = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = CZE transfer_troops = yes } } if = { limit = { NOT = { owns_state = 117 } } transfer_state = 117 } if = { limit = { NOT = { owns_state = 118 } } transfer_state = 118 } if = { limit = { NOT = { owns_state = 1017 } } transfer_state = 1017 } if = { limit = { NOT = { owns_state = 1018 } } transfer_state = 1018 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_CZE } } #AUSPOL AUSHUN_integrate_AUSPOL = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 20 } } check_variable = { var = formable_committed_size value = 35 compare = greater_than_or_equals } } } allowed = { NOT = { tag = POL } } visible = { has_country_flag = is_AUSHUN NOT = { has_country_flag = integrated_AUSPOL } } highlight_states = { highlight_state_targets = { state = 112 state = 628 state = 1098 } } available = { OR = { POL = { is_subject_of = ROOT has_war = no owns_state = 112 owns_state = 628 owns_state = 1098 } AND = { owns_state = 112 owns_state = 628 owns_state = 1098 } } if = { limit = { NOT = { any_subject_country = { owns_state = 112 owns_state = 628 owns_state = 1098 } } } 112 = { compliance > 50 resistance < 30 } 628 = { compliance > 50 resistance < 30 } 1098 = { compliance > 50 resistance < 30 } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision AUSHUN_integrate_AUSPOL" add_state_core = 112 add_state_core = 628 add_state_core = 1098 if = { limit = { POL = { is_subject_of = ROOT has_war = no owns_state = 112 owns_state = 628 owns_state = 1098 } } ROOT = { transfer_state = 112 transfer_state = 628 transfer_state = 1098 } } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_AUSPOL #WESTUKR } } AUSHUN_integrate_WESTUKR = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 20 } } check_variable = { var = formable_committed_size value = 35 compare = greater_than_or_equals } } } allowed = { NOT = { tag = UKR } } visible = { has_country_flag = is_AUSHUN NOT = { has_country_flag = integrated_WESTUKR } } highlight_states = { highlight_state_targets = { state = 700 state = 1111 state = 1247 state = 701 } } available = { OR = { UKR = { is_subject_of = ROOT has_war = no owns_state = 700 owns_state = 1111 owns_state = 1247 owns_state = 701 } AND = { owns_state = 700 owns_state = 1111 owns_state = 1247 owns_state = 701 } } if = { limit = { NOT = { any_subject_country = { owns_state = 700 owns_state = 1111 owns_state = 1247 owns_state = 701 } } } 700 = { compliance > 50 resistance < 30 } 1111 = { compliance > 50 resistance < 30 } 1247 = { compliance > 50 resistance < 30 } 701 = { compliance > 50 resistance < 30 } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision AUSHUN_integrate_WESTUKR" add_state_core = 700 add_state_core = 1111 add_state_core = 1247 add_state_core = 701 if = { limit = { UKR = { is_subject_of = ROOT has_war = no owns_state = 700 owns_state = 1111 owns_state = 1247 owns_state = 701 } } ROOT = { transfer_state = 700 transfer_state = 1111 transfer_state = 1247 transfer_state = 701 } } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_WESTUKR } } ### Cosmetic ### AUSHUN_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 20 } } check_variable = { var = formable_committed_size value = 35 compare = greater_than_or_equals } } } visible = { has_country_flag = is_AUSHUN NOT = { has_cosmetic_tag = AUSHUN } } highlight_states = { highlight_state_targets = { state = 122 state = 121 state = 999 state = 123 state = 76 state = 75 state = 286 state = 285 state = 78 state = 1061 state = 126 state = 127 state = 119 state = 120 state = 151 state = 909 state = 910 state = 628 state = 1098 state = 700 state = 701 state = 124 state = 125 state = 1017 state = 117 state = 118 state = 1018 state = 1051 state = 1054 state = 1053 state = 1052 state = 128 state = 129 state = 1111 state = 1247 } } available = { custom_trigger_tooltip = { tooltip = AUSHUN_update_flag_tt count_triggers = { amount = 26 122 = { is_core_of = ROOT } 121 = { is_core_of = ROOT } 999 = { is_core_of = ROOT } 123 = { is_core_of = ROOT } 76 = { is_core_of = ROOT } 75 = { is_core_of = ROOT } 286 = { is_core_of = ROOT } 285 = { is_core_of = ROOT } 78 = { is_core_of = ROOT } 1061 = { is_core_of = ROOT } 126 = { is_core_of = ROOT } 127 = { is_core_of = ROOT } 119 = { is_core_of = ROOT } 120 = { is_core_of = ROOT } 151 = { is_core_of = ROOT } 909 = { is_core_of = ROOT } 910 = { is_core_of = ROOT } 628 = { is_core_of = ROOT } 1098 = { is_core_of = ROOT } 700 = { is_core_of = ROOT } 701 = { is_core_of = ROOT } 124 = { is_core_of = ROOT } 125 = { is_core_of = ROOT } 1017 = { is_core_of = ROOT } 117 = { is_core_of = ROOT } 118 = { is_core_of = ROOT } 1018 = { is_core_of = ROOT } 1051 = { is_core_of = ROOT } 1054 = { is_core_of = ROOT } 1053 = { is_core_of = ROOT } 1052 = { is_core_of = ROOT } 128 = { is_core_of = ROOT } 129 = { is_core_of = ROOT } 1111 = { is_core_of = ROOT } 1247 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision AUSHUN_update_flag" set_cosmetic_tag = AUSHUN remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 20 } set_variable = { formable_committed_size = 35 } } } } # Post-formation purchase of unowned cores AUSHUN_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 20 } } check_variable = { var = formable_committed_size value = 35 compare = greater_than_or_equals } } } visible = { has_country_flag = is_AUSHUN } target_root_trigger = { has_country_flag = is_AUSHUN } target_array = global.AUSHUN_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision AUSHUN_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel AUSHUN_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove AUSHUN_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } } #Peru-Bolivian Confederation form_PBL_category = { ### Integrate ### # Start integrate PBL_integrate_start = { icon = GFX_decision_generic_form_nation ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 21 } } check_variable = { var = formable_committed_size value = 41 compare = greater_than_or_equals } } } highlight_states = { highlight_state_targets = { # PRU cores state = 900 state = 901 state = 902 state = 903 state = 904 # BOL cores state = 897 state = 898 state = 899 # BRA western state state = 1022 # CHL northern states state = 949 state = 950 # PAR state = 896 } } visible = { NOT = { has_country_flag = is_PBL } } available = { custom_trigger_tooltip = { tooltip = PBL_integrate_trigger_tt count_triggers = { amount = 33 463 = { state_owned_or_puppet_owned_by_root = yes } 468 = { state_owned_or_puppet_owned_by_root = yes } 472 = { state_owned_or_puppet_owned_by_root = yes } 879 = { state_owned_or_puppet_owned_by_root = yes } 880 = { state_owned_or_puppet_owned_by_root = yes } 882 = { state_owned_or_puppet_owned_by_root = yes } 883 = { state_owned_or_puppet_owned_by_root = yes } 884 = { state_owned_or_puppet_owned_by_root = yes } 885 = { state_owned_or_puppet_owned_by_root = yes } 886 = { state_owned_or_puppet_owned_by_root = yes } 887 = { state_owned_or_puppet_owned_by_root = yes } 888 = { state_owned_or_puppet_owned_by_root = yes } 889 = { state_owned_or_puppet_owned_by_root = yes } 890 = { state_owned_or_puppet_owned_by_root = yes } 891 = { state_owned_or_puppet_owned_by_root = yes } 892 = { state_owned_or_puppet_owned_by_root = yes } 895 = { state_owned_or_puppet_owned_by_root = yes } 896 = { state_owned_or_puppet_owned_by_root = yes } 897 = { state_owned_or_puppet_owned_by_root = yes } 898 = { state_owned_or_puppet_owned_by_root = yes } 899 = { state_owned_or_puppet_owned_by_root = yes } 900 = { state_owned_or_puppet_owned_by_root = yes } 901 = { state_owned_or_puppet_owned_by_root = yes } 902 = { state_owned_or_puppet_owned_by_root = yes } 903 = { state_owned_or_puppet_owned_by_root = yes } 904 = { state_owned_or_puppet_owned_by_root = yes } 942 = { state_owned_or_puppet_owned_by_root = yes } 949 = { state_owned_or_puppet_owned_by_root = yes } 950 = { state_owned_or_puppet_owned_by_root = yes } 953 = { state_owned_or_puppet_owned_by_root = yes } 954 = { state_owned_or_puppet_owned_by_root = yes } 1021 = { state_owned_or_puppet_owned_by_root = yes } 1022 = { state_owned_or_puppet_owned_by_root = yes } 1023 = { state_owned_or_puppet_owned_by_root = yes } 1024 = { state_owned_or_puppet_owned_by_root = yes } 1025 = { state_owned_or_puppet_owned_by_root = yes } 1026 = { state_owned_or_puppet_owned_by_root = yes } 1027 = { state_owned_or_puppet_owned_by_root = yes } 1028 = { state_owned_or_puppet_owned_by_root = yes } 1029 = { state_owned_or_puppet_owned_by_root = yes } 1031 = { state_owned_or_puppet_owned_by_root = yes } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision PBL_integrate_start" if = { limit = { NOT = { has_country_flag = is_PBL } } set_country_flag = is_PBL set_global_flag = PBL_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_@ROOT custom_effect_tooltip = PBL_start_integrate_tt custom_effect_tooltip = general_integrate_tt add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 21 } set_variable = { formable_committed_size = 41 } } } } #PRU PBL_integrate_PRU = { icon = GFX_decision_generic_form_nation cost = 500 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 21 } } check_variable = { var = formable_committed_size value = 41 compare = greater_than_or_equals } } } allowed = { NOT = { tag = PRU } } visible = { has_country_flag = is_PBL NOT = { has_country_flag = integrated_PRU } } highlight_states = { highlight_state_targets = { state = 900 state = 901 state = 902 state = 903 state = 904 } } available = { custom_trigger_tooltip = { tooltip = PBL_integrate_PRU_tt 900 = { state_owned_or_puppet_owned_by_root = yes } 901 = { state_owned_or_puppet_owned_by_root = yes } 902 = { state_owned_or_puppet_owned_by_root = yes } 903 = { state_owned_or_puppet_owned_by_root = yes } 904 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision PBL_integrate_PRU" add_state_core = 900 add_state_core = 901 add_state_core = 902 add_state_core = 903 add_state_core = 904 if = { limit = { country_exists = PRU PRU = { is_subject_of = ROOT all_owned_state = { OR = { state = 900 state = 901 state = 902 state = 903 state = 904 } } } } PRU = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = PRU transfer_troops = yes } } if = { limit = { NOT = { owns_state = 900 } } transfer_state = 900 } if = { limit = { NOT = { owns_state = 901 } } transfer_state = 901 } if = { limit = { NOT = { owns_state = 902 } } transfer_state = 902 } if = { limit = { NOT = { owns_state = 903 } } transfer_state = 903 } if = { limit = { NOT = { owns_state = 904 } } transfer_state = 904 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_PRU } } #BOL PBL_integrate_BOL = { icon = GFX_decision_generic_form_nation cost = 500 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 21 } } check_variable = { var = formable_committed_size value = 41 compare = greater_than_or_equals } } } allowed = { NOT = { tag = BOL } } visible = { has_country_flag = is_PBL NOT = { has_country_flag = integrated_BOL } } highlight_states = { highlight_state_targets = { state = 897 state = 898 state = 899 } } available = { custom_trigger_tooltip = { tooltip = PBL_integrate_BOL_tt 897 = { state_owned_or_puppet_owned_by_root = yes } 898 = { state_owned_or_puppet_owned_by_root = yes } 899 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision PBL_integrate_BOL" add_state_core = 897 add_state_core = 898 add_state_core = 899 if = { limit = { country_exists = BOL BOL = { is_subject_of = ROOT all_owned_state = { OR = { state = 897 state = 898 state = 899 } } } } BOL = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = BOL transfer_troops = yes } } if = { limit = { NOT = { owns_state = 897 } } transfer_state = 897 } if = { limit = { NOT = { owns_state = 898 } } transfer_state = 898 } if = { limit = { NOT = { owns_state = 899 } } transfer_state = 899 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_BOL } } #WESTPAR PBL_integrate_WESTPAR = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 21 } } check_variable = { var = formable_committed_size value = 41 compare = greater_than_or_equals } } } allowed = { NOT = { tag = PAR } } visible = { has_country_flag = is_PBL NOT = { has_country_flag = integrated_WESTPAR } } highlight_states = { highlight_state_targets = { state = 896 } } available = { OR = { PAR = { is_subject_of = ROOT has_war = no owns_state = 896 } owns_state = 896 } if = { limit = { NOT = { any_subject_country = { owns_state = 896 } } } 896 = { compliance > 50 resistance < 30 } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision PBL_integrate_WESTPAR" add_state_core = 896 if = { limit = { PAR = { is_subject_of = ROOT has_war = no owns_state = 896 } } ROOT = { transfer_state = 896 } } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_WESTPAR } } #WESTBRA PBL_integrate_WESTBRA = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 21 } } check_variable = { var = formable_committed_size value = 41 compare = greater_than_or_equals } } } allowed = { NOT = { tag = BRA } } visible = { has_country_flag = is_PBL NOT = { has_country_flag = integrated_WESTBRA } } highlight_states = { highlight_state_targets = { state = 1022 } } available = { OR = { BRA = { is_subject_of = ROOT has_war = no owns_state = 1022 } owns_state = 1022 } if = { limit = { NOT = { any_subject_country = { owns_state = 1022 } } } 1022 = { compliance > 50 resistance < 30 } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision PBL_integrate_WESTBRA" add_state_core = 1022 if = { limit = { BRA = { is_subject_of = ROOT has_war = no owns_state = 1022 } } ROOT = { transfer_state = 1022 } } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_WESTBRA } } #NORTHCHL PBL_integrate_NORTHCHL = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 21 } } check_variable = { var = formable_committed_size value = 41 compare = greater_than_or_equals } } } allowed = { NOT = { tag = CHL } } visible = { has_country_flag = is_PBL NOT = { has_country_flag = integrated_NORTHCHL } } highlight_states = { highlight_state_targets = { state = 949 state = 950 } } available = { OR = { CHL = { is_subject_of = ROOT has_war = no owns_state = 950 owns_state = 949 } AND = { owns_state = 950 owns_state = 949 } } if = { limit = { NOT = { any_subject_country = { owns_state = 949 owns_state = 950 } } } 949 = { compliance > 50 resistance < 30 } 950 = { compliance > 50 resistance < 30 } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision PBL_integrate_NORTHCHL" add_state_core = 949 add_state_core = 950 if = { limit = { CHL = { is_subject_of = ROOT has_war = no owns_state = 949 owns_state = 950 } } ROOT = { transfer_state = 949 transfer_state = 950 } } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_NORTHCHL } } ### Cosmetic ### PBL_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 21 } } check_variable = { var = formable_committed_size value = 41 compare = greater_than_or_equals } } } visible = { has_country_flag = is_PBL NOT = { has_cosmetic_tag = PBL } } highlight_states = { highlight_state_targets = { state = 463 state = 468 state = 472 state = 879 state = 880 state = 882 state = 883 state = 884 state = 885 state = 886 state = 887 state = 888 state = 889 state = 890 state = 891 state = 892 state = 895 state = 896 state = 897 state = 898 state = 899 state = 900 state = 901 state = 902 state = 903 state = 904 state = 942 state = 949 state = 950 state = 953 state = 954 state = 1021 state = 1022 state = 1023 state = 1024 state = 1025 state = 1026 state = 1027 state = 1028 state = 1029 state = 1031 } } available = { custom_trigger_tooltip = { tooltip = PBL_update_flag_tt count_triggers = { amount = 33 463 = { is_core_of = ROOT } 468 = { is_core_of = ROOT } 472 = { is_core_of = ROOT } 879 = { is_core_of = ROOT } 880 = { is_core_of = ROOT } 882 = { is_core_of = ROOT } 883 = { is_core_of = ROOT } 884 = { is_core_of = ROOT } 885 = { is_core_of = ROOT } 886 = { is_core_of = ROOT } 887 = { is_core_of = ROOT } 888 = { is_core_of = ROOT } 889 = { is_core_of = ROOT } 890 = { is_core_of = ROOT } 891 = { is_core_of = ROOT } 892 = { is_core_of = ROOT } 895 = { is_core_of = ROOT } 896 = { is_core_of = ROOT } 897 = { is_core_of = ROOT } 898 = { is_core_of = ROOT } 899 = { is_core_of = ROOT } 900 = { is_core_of = ROOT } 901 = { is_core_of = ROOT } 902 = { is_core_of = ROOT } 903 = { is_core_of = ROOT } 904 = { is_core_of = ROOT } 942 = { is_core_of = ROOT } 949 = { is_core_of = ROOT } 950 = { is_core_of = ROOT } 953 = { is_core_of = ROOT } 954 = { is_core_of = ROOT } 1021 = { is_core_of = ROOT } 1022 = { is_core_of = ROOT } 1023 = { is_core_of = ROOT } 1024 = { is_core_of = ROOT } 1025 = { is_core_of = ROOT } 1026 = { is_core_of = ROOT } 1027 = { is_core_of = ROOT } 1028 = { is_core_of = ROOT } 1029 = { is_core_of = ROOT } 1031 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision PBL_update_flag" set_cosmetic_tag = PBL remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 21 } set_variable = { formable_committed_size = 41 } } } } # Post-formation purchase of unowned cores PBL_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 21 } } check_variable = { var = formable_committed_size value = 41 compare = greater_than_or_equals } } } visible = { has_country_flag = is_PBL } target_root_trigger = { has_country_flag = is_PBL } target_array = global.PBL_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision PBL_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel PBL_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove PBL_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } } #Union of African States form_UAS_category = { ### Integrate ### # Start integrate UAS_integrate_start = { icon = GFX_decision_generic_form_nation ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 22 } } check_variable = { var = formable_committed_size value = 15 compare = greater_than_or_equals } } } visible = { NOT = { has_country_flag = is_UAS } } highlight_states = { highlight_state_targets = { state = 345 #Volta state = 346 #Coastal Ghana state = 347 #Ashanti state = 348 #Upper Ghana state = 359 #Haute-Guinee state = 360 #Guinee-Maritime state = 187 #Malian Sahara state = 366 #Tombouctou state = 367 #Sikasso state = 368 #Koulikoro state = 1163 #Kidal state = 1164 #Gao state = 1165 #Menaka state = 1166 #Kayes state = 1167 #Ansongo } } available = { custom_trigger_tooltip = { tooltip = UAS_integrate_trigger_tt count_triggers = { amount = 12 345 = { state_owned_or_puppet_owned_by_root = yes } 346 = { state_owned_or_puppet_owned_by_root = yes } 347 = { state_owned_or_puppet_owned_by_root = yes } 348 = { state_owned_or_puppet_owned_by_root = yes } 359 = { state_owned_or_puppet_owned_by_root = yes } 360 = { state_owned_or_puppet_owned_by_root = yes } 187 = { state_owned_or_puppet_owned_by_root = yes } 366 = { state_owned_or_puppet_owned_by_root = yes } 367 = { state_owned_or_puppet_owned_by_root = yes } 368 = { state_owned_or_puppet_owned_by_root = yes } 1163 = { state_owned_or_puppet_owned_by_root = yes } 1164 = { state_owned_or_puppet_owned_by_root = yes } 1165 = { state_owned_or_puppet_owned_by_root = yes } 1166 = { state_owned_or_puppet_owned_by_root = yes } 1167 = { state_owned_or_puppet_owned_by_root = yes } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision UAS_integrate_start" if = { limit = { NOT = { has_country_flag = is_UAS } } set_country_flag = is_UAS set_global_flag = UAS_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_@ROOT custom_effect_tooltip = UAS_start_integrate_tt custom_effect_tooltip = general_integrate_tt add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 22 } set_variable = { formable_committed_size = 15 } } } } #GAH UAS_integrate_GAH = { icon = GFX_decision_generic_form_nation cost = 200 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 22 } } check_variable = { var = formable_committed_size value = 15 compare = greater_than_or_equals } } } allowed = { NOT = { tag = GAH } } visible = { has_country_flag = is_UAS NOT = { has_country_flag = integrated_GAH } } highlight_states = { highlight_state_targets = { state = 345 state = 346 state = 347 state = 348 } } available = { custom_trigger_tooltip = { tooltip = UAS_integrate_GAH_tt 345 = { state_owned_or_puppet_owned_by_root = yes } 346 = { state_owned_or_puppet_owned_by_root = yes } 347 = { state_owned_or_puppet_owned_by_root = yes } 348 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision UAS_integrate_GAH" add_state_core = 345 add_state_core = 346 add_state_core = 347 add_state_core = 348 if = { limit = { country_exists = GAH GAH = { is_subject_of = ROOT all_owned_state = { OR = { state = 345 state = 346 state = 347 state = 348 } } } } GAH = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = GAH transfer_troops = yes } } if = { limit = { NOT = { owns_state = 345 } } transfer_state = 345 } if = { limit = { NOT = { owns_state = 346 } } transfer_state = 346 } if = { limit = { NOT = { owns_state = 347 } } transfer_state = 347 } if = { limit = { NOT = { owns_state = 348 } } transfer_state = 348 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_GAH } } #GUI UAS_integrate_GUI = { icon = GFX_decision_generic_form_nation cost = 200 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 22 } } check_variable = { var = formable_committed_size value = 15 compare = greater_than_or_equals } } } allowed = { NOT = { tag = GUI } } visible = { has_country_flag = is_UAS NOT = { has_country_flag = integrated_GUI } } highlight_states = { highlight_state_targets = { state = 359 state = 360 } } available = { custom_trigger_tooltip = { tooltip = UAS_integrate_GUI_tt 359 = { state_owned_or_puppet_owned_by_root = yes } 360 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision UAS_integrate_GUI" add_state_core = 359 add_state_core = 360 if = { limit = { country_exists = GUI GUI = { is_subject_of = ROOT all_owned_state = { OR = { state = 359 state = 360 } } } } GUI = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = GUI transfer_troops = yes } } if = { limit = { NOT = { owns_state = 359 } } transfer_state = 359 } if = { limit = { NOT = { owns_state = 360 } } transfer_state = 360 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_GUI } } #MAL UAS_integrate_MAL = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 22 } } check_variable = { var = formable_committed_size value = 15 compare = greater_than_or_equals } } } allowed = { NOT = { tag = MAL } } visible = { has_country_flag = is_UAS NOT = { has_country_flag = integrated_MAL } } highlight_states = { highlight_state_targets = { state = 187 state = 366 state = 367 state = 368 state = 1163 state = 1164 state = 1165 state = 1166 state = 1167 } } available = { custom_trigger_tooltip = { tooltip = UAS_integrate_MAL_tt 187 = { state_owned_or_puppet_owned_by_root = yes } 366 = { state_owned_or_puppet_owned_by_root = yes } 367 = { state_owned_or_puppet_owned_by_root = yes } 368 = { state_owned_or_puppet_owned_by_root = yes } 1163 = { state_owned_or_puppet_owned_by_root = yes } 1164 = { state_owned_or_puppet_owned_by_root = yes } 1165 = { state_owned_or_puppet_owned_by_root = yes } 1166 = { state_owned_or_puppet_owned_by_root = yes } 1167 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision UAS_integrate_MAL" add_state_core = 187 add_state_core = 366 add_state_core = 367 add_state_core = 368 add_state_core = 1163 add_state_core = 1164 add_state_core = 1165 add_state_core = 1166 add_state_core = 1167 if = { limit = { country_exists = MAL MAL = { is_subject_of = ROOT all_owned_state = { OR = { state = 187 state = 366 state = 367 state = 368 state = 1163 state = 1164 state = 1165 state = 1166 state = 1167 } } } } MAL = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = MAL transfer_troops = yes } } if = { limit = { NOT = { owns_state = 187 } } transfer_state = 187 } if = { limit = { NOT = { owns_state = 366 } } transfer_state = 366 } if = { limit = { NOT = { owns_state = 367 } } transfer_state = 367 } if = { limit = { NOT = { owns_state = 368 } } transfer_state = 368 } if = { limit = { NOT = { owns_state = 1163 } } transfer_state = 1163 } if = { limit = { NOT = { owns_state = 1164 } } transfer_state = 1164 } if = { limit = { NOT = { owns_state = 1165 } } transfer_state = 1165 } if = { limit = { NOT = { owns_state = 1166 } } transfer_state = 1166 } if = { limit = { NOT = { owns_state = 1167 } } transfer_state = 1167 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_MAL } } # Update flag UAS_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 22 } } check_variable = { var = formable_committed_size value = 15 compare = greater_than_or_equals } } } visible = { has_country_flag = is_UAS NOT = { has_cosmetic_tag = UAS } } highlight_states = { highlight_state_targets = { state = 345 state = 346 state = 347 state = 348 state = 359 state = 360 state = 187 state = 366 state = 367 state = 368 state = 1163 state = 1164 state = 1165 state = 1166 state = 1167 } } available = { custom_trigger_tooltip = { tooltip = UAS_update_flag_tt count_triggers = { amount = 12 345 = { is_core_of = ROOT } 346 = { is_core_of = ROOT } 347 = { is_core_of = ROOT } 348 = { is_core_of = ROOT } 359 = { is_core_of = ROOT } 360 = { is_core_of = ROOT } 187 = { is_core_of = ROOT } 366 = { is_core_of = ROOT } 367 = { is_core_of = ROOT } 368 = { is_core_of = ROOT } 1163 = { is_core_of = ROOT } 1164 = { is_core_of = ROOT } 1165 = { is_core_of = ROOT } 1166 = { is_core_of = ROOT } 1167 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision UAS_update_flag" set_cosmetic_tag = UAS remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 22 } set_variable = { formable_committed_size = 15 } } } } # Post-formation purchase of unowned cores UAS_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 22 } } check_variable = { var = formable_committed_size value = 15 compare = greater_than_or_equals } } } visible = { has_country_flag = is_UAS } target_root_trigger = { has_country_flag = is_UAS } target_array = global.UAS_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision UAS_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel UAS_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove UAS_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } } # Angevin Empire form_AVG_category = { #Start integrate AVG_integrate_start = { icon = GFX_decision_generic_form_nation ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 23 } } check_variable = { var = formable_committed_size value = 21 compare = greater_than_or_equals } # A CANZUK commitment stranded by the EU guard must not also block its fallback formables NOT = { AND = { check_variable = { formable_committed_id = 15 } OR = { has_global_flag = european_federation has_idea = EU_member } } } } } visible = { NOT = { has_country_flag = is_AVG } } highlight_states = { highlight_state_targets = { # Kingdom of England + Lordship of Wales + Channel Islands state = 10 #Yorkshire and the Humber state = 11 #Greater Manchester state = 12 #West Midlands state = 13 #Greater London state = 14 #East of England state = 15 #Southern England state = 16 #South Wales state = 973 #Cornwall state = 1191 #East Midlands state = 1192 #North Wales state = 1193 #Northern England state = 1197 #Channel Islands # Plantagenet western France state = 55 #Normandie state = 59 #Loire state = 60 #Aquitaine state = 61 #Midi-Pyrenees state = 64 #Bretagne state = 958 #Poitou-Limousin state = 959 #Pays de la Loire # Lordship of Ireland state = 27 #Leinster state = 28 #Munster } } available = { custom_trigger_tooltip = { tooltip = AVG_integrate_trigger_tt count_triggers = { amount = 17 10 = { state_owned_or_puppet_owned_by_root = yes } 11 = { state_owned_or_puppet_owned_by_root = yes } 12 = { state_owned_or_puppet_owned_by_root = yes } 13 = { state_owned_or_puppet_owned_by_root = yes } 14 = { state_owned_or_puppet_owned_by_root = yes } 15 = { state_owned_or_puppet_owned_by_root = yes } 16 = { state_owned_or_puppet_owned_by_root = yes } 973 = { state_owned_or_puppet_owned_by_root = yes } 1191 = { state_owned_or_puppet_owned_by_root = yes } 1192 = { state_owned_or_puppet_owned_by_root = yes } 1193 = { state_owned_or_puppet_owned_by_root = yes } 1197 = { state_owned_or_puppet_owned_by_root = yes } 55 = { state_owned_or_puppet_owned_by_root = yes } 59 = { state_owned_or_puppet_owned_by_root = yes } 60 = { state_owned_or_puppet_owned_by_root = yes } 61 = { state_owned_or_puppet_owned_by_root = yes } 64 = { state_owned_or_puppet_owned_by_root = yes } 958 = { state_owned_or_puppet_owned_by_root = yes } 959 = { state_owned_or_puppet_owned_by_root = yes } 27 = { state_owned_or_puppet_owned_by_root = yes } 28 = { state_owned_or_puppet_owned_by_root = yes } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision AVG_integrate_start" if = { limit = { NOT = { has_country_flag = is_AVG } } set_country_flag = is_AVG set_global_flag = AVG_exists clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag } set_country_flag = integrated_@ROOT custom_effect_tooltip = AVG_start_integrate_tt custom_effect_tooltip = general_integrate_tt add_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 23 } set_variable = { formable_committed_size = 21 } } } } # Integrate western France AVG_integrate_FRA = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 23 } } check_variable = { var = formable_committed_size value = 21 compare = greater_than_or_equals } # A CANZUK commitment stranded by the EU guard must not also block its fallback formables NOT = { AND = { check_variable = { formable_committed_id = 15 } OR = { has_global_flag = european_federation has_idea = EU_member } } } } } allowed = { NOT = { tag = FRA } } visible = { has_country_flag = is_AVG NOT = { has_country_flag = integrated_FRA } } highlight_states = { highlight_state_targets = { state = 55 state = 59 state = 60 state = 61 state = 64 state = 958 state = 959 } } available = { custom_trigger_tooltip = { tooltip = AVG_integrate_FRA_tt 55 = { state_owned_or_puppet_owned_by_root = yes } 59 = { state_owned_or_puppet_owned_by_root = yes } 60 = { state_owned_or_puppet_owned_by_root = yes } 61 = { state_owned_or_puppet_owned_by_root = yes } 64 = { state_owned_or_puppet_owned_by_root = yes } 958 = { state_owned_or_puppet_owned_by_root = yes } 959 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision AVG_integrate_FRA" add_state_core = 55 add_state_core = 59 add_state_core = 60 add_state_core = 61 add_state_core = 64 add_state_core = 958 add_state_core = 959 if = { limit = { country_exists = FRA FRA = { is_subject_of = ROOT all_owned_state = { OR = { state = 55 state = 59 state = 60 state = 61 state = 64 state = 958 state = 959 } } } } FRA = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = FRA transfer_troops = yes } } if = { limit = { NOT = { owns_state = 55 } } transfer_state = 55 } if = { limit = { NOT = { owns_state = 59 } } transfer_state = 59 } if = { limit = { NOT = { owns_state = 60 } } transfer_state = 60 } if = { limit = { NOT = { owns_state = 61 } } transfer_state = 61 } if = { limit = { NOT = { owns_state = 64 } } transfer_state = 64 } if = { limit = { NOT = { owns_state = 958 } } transfer_state = 958 } if = { limit = { NOT = { owns_state = 959 } } transfer_state = 959 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_FRA } } # Integrate southern Ireland AVG_integrate_IRE = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 23 } } check_variable = { var = formable_committed_size value = 21 compare = greater_than_or_equals } # A CANZUK commitment stranded by the EU guard must not also block its fallback formables NOT = { AND = { check_variable = { formable_committed_id = 15 } OR = { has_global_flag = european_federation has_idea = EU_member } } } } } allowed = { NOT = { tag = IRE } } visible = { has_country_flag = is_AVG NOT = { has_country_flag = integrated_IRE } } highlight_states = { highlight_state_targets = { state = 27 state = 28 } } available = { custom_trigger_tooltip = { tooltip = AVG_integrate_IRE_tt 27 = { state_owned_or_puppet_owned_by_root = yes } 28 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision AVG_integrate_IRE" add_state_core = 27 add_state_core = 28 if = { limit = { country_exists = IRE IRE = { is_subject_of = ROOT all_owned_state = { OR = { state = 27 state = 28 } } } } IRE = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = IRE transfer_troops = yes } } if = { limit = { NOT = { owns_state = 27 } } transfer_state = 27 } if = { limit = { NOT = { owns_state = 28 } } transfer_state = 28 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_IRE } } # Integrate Enhgland AVG_integrate_ENG = { icon = GFX_decision_generic_form_nation cost = 300 days_remove = 365 ai_will_do = { base = 10 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 23 } } check_variable = { var = formable_committed_size value = 21 compare = greater_than_or_equals } # A CANZUK commitment stranded by the EU guard must not also block its fallback formables NOT = { AND = { check_variable = { formable_committed_id = 15 } OR = { has_global_flag = european_federation has_idea = EU_member } } } } } allowed = { NOT = { tag = ENG } } visible = { has_country_flag = is_AVG NOT = { has_country_flag = integrated_ENG } } highlight_states = { highlight_state_targets = { state = 10 state = 11 state = 12 state = 13 state = 14 state = 15 state = 16 state = 973 state = 1191 state = 1192 state = 1193 state = 1197 } } available = { custom_trigger_tooltip = { tooltip = AVG_integrate_ENG_tt 10 = { state_owned_or_puppet_owned_by_root = yes } 11 = { state_owned_or_puppet_owned_by_root = yes } 12 = { state_owned_or_puppet_owned_by_root = yes } 13 = { state_owned_or_puppet_owned_by_root = yes } 14 = { state_owned_or_puppet_owned_by_root = yes } 15 = { state_owned_or_puppet_owned_by_root = yes } 16 = { state_owned_or_puppet_owned_by_root = yes } 973 = { state_owned_or_puppet_owned_by_root = yes } 1191 = { state_owned_or_puppet_owned_by_root = yes } 1192 = { state_owned_or_puppet_owned_by_root = yes } 1193 = { state_owned_or_puppet_owned_by_root = yes } 1197 = { state_owned_or_puppet_owned_by_root = yes } } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision AVG_integrate_ENG" add_state_core = 10 add_state_core = 11 add_state_core = 12 add_state_core = 13 add_state_core = 14 add_state_core = 15 add_state_core = 16 add_state_core = 973 add_state_core = 1191 add_state_core = 1192 add_state_core = 1193 add_state_core = 1197 if = { limit = { country_exists = ENG ENG = { is_subject_of = ROOT all_owned_state = { OR = { state = 10 state = 11 state = 12 state = 13 state = 14 state = 15 state = 16 state = 973 state = 1191 state = 1192 state = 1193 state = 1197 } } } } ENG = { every_unit_leader = { set_nationality = ROOT } } annex_country = { target = ENG transfer_troops = yes } } if = { limit = { NOT = { owns_state = 10 } } transfer_state = 10 } if = { limit = { NOT = { owns_state = 11 } } transfer_state = 11 } if = { limit = { NOT = { owns_state = 12 } } transfer_state = 12 } if = { limit = { NOT = { owns_state = 13 } } transfer_state = 13 } if = { limit = { NOT = { owns_state = 14 } } transfer_state = 14 } if = { limit = { NOT = { owns_state = 15 } } transfer_state = 15 } if = { limit = { NOT = { owns_state = 16 } } transfer_state = 16 } if = { limit = { NOT = { owns_state = 973 } } transfer_state = 973 } if = { limit = { NOT = { owns_state = 1191 } } transfer_state = 1191 } if = { limit = { NOT = { owns_state = 1192 } } transfer_state = 1192 } if = { limit = { NOT = { owns_state = 1193 } } transfer_state = 1193 } if = { limit = { NOT = { owns_state = 1197 } } transfer_state = 1197 } clr_country_flag = dynamic_flag clr_country_flag = dynamic_rebel_flag set_country_flag = integrated_ENG } } # Update flag AVG_update_flag = { icon = GFX_decision_generic_form_nation cost = 0 ai_will_do = { base = 10000 modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 23 } } check_variable = { var = formable_committed_size value = 21 compare = greater_than_or_equals } # A CANZUK commitment stranded by the EU guard must not also block its fallback formables NOT = { AND = { check_variable = { formable_committed_id = 15 } OR = { has_global_flag = european_federation has_idea = EU_member } } } } } visible = { has_country_flag = is_AVG NOT = { has_cosmetic_tag = AVG } } highlight_states = { highlight_state_targets = { state = 10 state = 11 state = 12 state = 13 state = 14 state = 15 state = 16 state = 973 state = 1191 state = 1192 state = 1193 state = 1197 state = 55 state = 59 state = 60 state = 61 state = 64 state = 958 state = 959 state = 27 state = 28 } } available = { custom_trigger_tooltip = { tooltip = AVG_update_flag_tt count_triggers = { amount = 17 10 = { is_core_of = ROOT } 11 = { is_core_of = ROOT } 12 = { is_core_of = ROOT } 13 = { is_core_of = ROOT } 14 = { is_core_of = ROOT } 15 = { is_core_of = ROOT } 16 = { is_core_of = ROOT } 973 = { is_core_of = ROOT } 1191 = { is_core_of = ROOT } 1192 = { is_core_of = ROOT } 1193 = { is_core_of = ROOT } 1197 = { is_core_of = ROOT } 55 = { is_core_of = ROOT } 59 = { is_core_of = ROOT } 60 = { is_core_of = ROOT } 61 = { is_core_of = ROOT } 64 = { is_core_of = ROOT } 958 = { is_core_of = ROOT } 959 = { is_core_of = ROOT } 27 = { is_core_of = ROOT } 28 = { is_core_of = ROOT } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision AVG_update_flag" set_cosmetic_tag = AVG remove_ideas = reshaping_national_identity hidden_effect = { set_variable = { formable_committed_id = 23 } set_variable = { formable_committed_size = 21 } } } } # Post-formation purchase of unowned cores AVG_buy_core_state = { icon = GFX_decision_generic_form_nation state_target = yes fixed_random_seed = no days_remove = 60 ai_hint_pp_cost = 150 ai_will_do = { base = 1 modifier = { factor = 0 has_active_mission = bankruptcy_incoming_collapse } modifier = { factor = 0 check_variable = { treasury < 200 } } modifier = { factor = 2 check_variable = { treasury > 400 } } modifier = { factor = 0 NOT = { check_variable = { formable_committed_id = 23 } } check_variable = { var = formable_committed_size value = 21 compare = greater_than_or_equals } # A CANZUK commitment stranded by the EU guard must not also block its fallback formables NOT = { AND = { check_variable = { formable_committed_id = 15 } OR = { has_global_flag = european_federation has_idea = EU_member } } } } } visible = { has_country_flag = is_AVG } highlight_states = { highlight_state_targets = { state = FROM } } target_root_trigger = { has_country_flag = is_AVG } target_array = global.AVG_buy_core_state # Second OR branch: a running offer's own target must stay selectable, because a targeted decision whose target_trigger goes false mid-timer is dropped without running remove_effect or cancel_effect. cancel_trigger retires it instead. target_trigger = { FROM = { OR = { formable_purchase_state_is_purchasable = yes AND = { has_state_flag = formable_purchase_offer_target@ROOT ROOT = { has_country_flag = formable_purchase_offer_active } } } } } available = { custom_trigger_tooltip = { tooltip = formable_purchase_one_offer_at_a_time_tt NOT = { has_country_flag = formable_purchase_offer_active } } } custom_cost_trigger = { check_variable = { treasury > 100 } has_political_power > 149 } custom_cost_text = formable_buy_core_state_cost complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision AVG_buy_core_state on state [?FROM.id]" set_temp_variable = { treasury_change = -100 } modify_treasury_effect = yes hidden_effect = { add_political_power = -150 } set_country_flag = { flag = formable_purchase_offer_active value = 1 days = 120 } FROM = { set_state_flag = formable_purchase_offer_target@ROOT } custom_effect_tooltip = formable_purchase_offer_sent_tt } cancel_trigger = { FROM = { OR = { is_owned_by = ROOT owner = { has_war_with = ROOT } } } } cancel_effect = { log = "[GetDateText]: [Root.GetName]: Decision cancel AVG_buy_core_state on state [?FROM.id]" formable_purchase_cancel_offer = yes } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision remove AVG_buy_core_state on state [?FROM.id]" formable_purchase_deliver_offer = yes } } }