modify_union_state_support = { custom_effect_tooltip = UNS_union_state_TT add_to_variable = { union_state = modify_union_state } clamp_variable = { var = union_state min = 0 max = 100 } # No is_ai guard: the panel shows all four subjects to every viewer, so an AI subject's # change still has to refresh the human player's copy. update_usr_union_state_dirty_variable = yes } update_usr_union_state_dirty_variable = { if = { limit = { check_variable = { global.USR_union_state_dirty_update_var < 10000 } } add_to_variable = { global.USR_union_state_dirty_update_var = 1 } } else = { set_variable = { global.USR_union_state_dirty_update_var = 1 } } } ###########UNION STATE - ADDED FIRST TIER MINISTRY########### # Ideas move together; sentinel check makes re-entry idempotent. USR_first_tier_ministry_added = { if = { limit = { NOT = { has_idea = USR_eternal_commitie_idea } } add_ideas = { USR_eternal_commitie_idea USR_money_palata_idea USR_council_ministers_idea USR_gos_sovet_idea USR_parlament_idea } } } ###########UNION STATE - ADDED SECOND TIER MINISTRY########### USR_second_tier_ministry_added = { if = { limit = { NOT = { has_idea = USR_valute_idea } } add_ideas = { USR_valute_idea USR_civils_idea USR_economic_space_idea } } } ###########UNION STATE - LEAVE UNION STATE (REMOVE ALL MINISTRIES)########### # Each remove_ideas guarded individually so partial-state cleanup still works. USR_leave_union_state_script = { if = { limit = { has_idea = USR_valute_idea } remove_ideas = USR_valute_idea } if = { limit = { has_idea = USR_civils_idea } remove_ideas = USR_civils_idea } if = { limit = { has_idea = USR_economic_space_idea } remove_ideas = USR_economic_space_idea } if = { limit = { has_idea = USR_eternal_commitie_idea } remove_ideas = USR_eternal_commitie_idea } if = { limit = { has_idea = USR_money_palata_idea } remove_ideas = USR_money_palata_idea } if = { limit = { has_idea = USR_council_ministers_idea } remove_ideas = USR_council_ministers_idea } if = { limit = { has_idea = USR_gos_sovet_idea } remove_ideas = USR_gos_sovet_idea } if = { limit = { has_idea = USR_parlament_idea } remove_ideas = USR_parlament_idea } } ###########UNION STATE - BELARUS BECOME UNION STATE########### USR_union_state_blr_create = { hidden_effect = { # Called from union_state.3.a (event fired on BLR), so ROOT = BLR. # Influencer must be SOV for every change_influence_percentage call in this block. set_temp_variable = { tag_index = SOV } set_temp_variable = { percent_change = 9 } change_influence_percentage = yes SOV = { set_autonomy = { target = ROOT autonomy_state = autonomy_union_state } } if = { limit = { has_government = communism SOV = { has_government = communism } } set_temp_variable = { percent_change = 5 } change_influence_percentage = yes } if = { limit = { has_government = communism SOV = { NOT = { has_government = communism } } } set_temp_variable = { percent_change = 5 } change_influence_percentage = yes } if = { limit = { has_government = democratic SOV = { has_government = democratic } } set_temp_variable = { percent_change = 5 } change_influence_percentage = yes } if = { limit = { has_government = democratic SOV = { NOT = { has_government = democratic } } } BLR = { start_civil_war = { ideology = democratic size = 0.5 capital = 111 states = { 625 474 113 626 112 115 116 } } } set_temp_variable = { percent_change = -22.2 } change_influence_percentage = yes } if = { limit = { has_government = neutrality SOV = { has_government = neutrality } } set_temp_variable = { percent_change = 5 } change_influence_percentage = yes } if = { limit = { has_government = neutrality SOV = { NOT = { has_government = neutrality } } } BLR = { start_civil_war = { ideology = neutrality size = 0.5 capital = 111 states = { 625 474 113 626 112 115 116 } } } set_temp_variable = { percent_change = -22.2 } change_influence_percentage = yes } if = { limit = { has_government = nationalist SOV = { has_government = nationalist } } set_temp_variable = { percent_change = -22.2 } change_influence_percentage = yes } if = { limit = { has_government = nationalist SOV = { NOT = { has_government = nationalist } } } BLR = { start_civil_war = { ideology = nationalist size = 0.5 capital = 111 states = { 625 474 113 626 112 115 116 } } } set_temp_variable = { percent_change = -22.2 } change_influence_percentage = yes } } } ###########UNION STATE - PRO UNION STATE REVOULT IN BELARUS########### USR_belarus_pro_rus_revoult = { if = { limit = { SOV = { NOT = { nationalist_fascist_are_in_power = yes } } } random_list = { 30 = { BLR = { batka_deleted = yes add_popularity = { ideology = communism popularity = -0.10 } recalculate_party = yes if = { limit = { NOT = { check_variable = { ruling_party = 15 } } } set_temp_variable = { rul_party_temp = 15 } change_ruling_party_effect = yes } set_temp_variable = { party_index = 15 } set_temp_variable = { party_popularity_increase = 0.20 } set_temp_variable = { temp_outlook_increase = 0.26 } change_relative_party_popularity = yes set_temp_variable = { percent_change = 5.2 } change_influence_percentage = yes } } 30 = { BLR = { set_cosmetic_tag = BLR_limonka clr_country_flag = dynamic_flag batka_deleted = yes add_popularity = { ideology = communism popularity = -0.10 } recalculate_party = yes if = { limit = { NOT = { check_variable = { ruling_party = 21 } } } set_temp_variable = { rul_party_temp = 21 } change_ruling_party_effect = yes } set_temp_variable = { party_index = 21 } set_temp_variable = { party_popularity_increase = 0.20 } set_temp_variable = { temp_outlook_increase = 0.26 } change_relative_party_popularity = yes set_temp_variable = { percent_change = 5.2 } change_influence_percentage = yes } } 30 = { add_opinion_modifier = { target = BLR modifier = bad_revoult } reverse_add_opinion_modifier = { target = BLR modifier = bad_revoult } BLR = { set_temp_variable = { percent_change = -15.2 } change_influence_percentage = yes } } } } else_if = { limit = { SOV = { nationalist_fascist_are_in_power = yes } } random_list = { 50 = { BLR = { batka_deleted = yes add_popularity = { ideology = communism popularity = -0.10 } recalculate_party = yes if = { limit = { NOT = { check_variable = { ruling_party = 15 } } } set_temp_variable = { rul_party_temp = 15 } change_ruling_party_effect = yes } set_temp_variable = { party_index = 15 } set_temp_variable = { party_popularity_increase = 0.20 } set_temp_variable = { temp_outlook_increase = 0.26 } change_relative_party_popularity = yes set_temp_variable = { percent_change = 5.2 } change_influence_percentage = yes } } 50 = { BLR = { set_cosmetic_tag = BLR_limonka clr_country_flag = dynamic_flag batka_deleted = yes add_popularity = { ideology = communism popularity = -0.10 } recalculate_party = yes if = { limit = { NOT = { check_variable = { ruling_party = 21 } } } set_temp_variable = { rul_party_temp = 21 } change_ruling_party_effect = yes } set_temp_variable = { party_index = 21 } set_temp_variable = { party_popularity_increase = 0.20 } set_temp_variable = { temp_outlook_increase = 0.26 } change_relative_party_popularity = yes set_temp_variable = { percent_change = 5.2 } change_influence_percentage = yes } } } } } ###########UNION STATE - ANTI SEPARATISM IN CAUCAS########### USR_sov_arm_anti_separatism_in_caucas = { ###########SEPARATISM CHECHNYA########### if = { limit = { CHE = { NOT = { has_country_flag = SUB_subject_rebellion_flag } OR = { SOV = { owns_state = 672 } has_autonomy_state = autonomy_republic_rf has_autonomy_state = autonomy_kray_rf has_autonomy_state = autonomy_oblast_rf has_autonomy_state = autonomy_okrug_rf } } check_variable = { CHE.subjectinped > 15 } } hidden_effect = { CHE = { set_temp_variable = { modify_subjectinped = -3 } modify_subjectinped_support = yes } } } ###########SEPARATISM INGUSHETIA########### if = { limit = { ING = { NOT = { has_country_flag = SUB_subject_rebellion_flag } OR = { SOV = { owns_state = 1126 } has_autonomy_state = autonomy_republic_rf has_autonomy_state = autonomy_kray_rf has_autonomy_state = autonomy_oblast_rf has_autonomy_state = autonomy_okrug_rf } } check_variable = { ING.subjectinped > 15 } } hidden_effect = { ING = { set_temp_variable = { modify_subjectinped = -3 } modify_subjectinped_support = yes } } } ###########SEPARATISM KABARDINO-BALKARIA########### if = { limit = { KBK = { NOT = { has_country_flag = SUB_subject_rebellion_flag } OR = { SOV = { owns_state = 674 } has_autonomy_state = autonomy_republic_rf has_autonomy_state = autonomy_kray_rf has_autonomy_state = autonomy_oblast_rf has_autonomy_state = autonomy_okrug_rf } } check_variable = { KBK.subjectinped > 15 } } hidden_effect = { KBK = { set_temp_variable = { modify_subjectinped = -3 } modify_subjectinped_support = yes } } } ###########SEPARATISM KARACHAEVO-CHERKESSIYA########### if = { limit = { KCC = { NOT = { has_country_flag = SUB_subject_rebellion_flag } OR = { SOV = { owns_state = 1125 } has_autonomy_state = autonomy_republic_rf has_autonomy_state = autonomy_kray_rf has_autonomy_state = autonomy_oblast_rf has_autonomy_state = autonomy_okrug_rf } } check_variable = { KCC.subjectinped > 15 } } hidden_effect = { KCC = { set_temp_variable = { modify_subjectinped = -3 } modify_subjectinped_support = yes } } } ###########SEPARATISM ADYGEA########### if = { limit = { ADY = { NOT = { has_country_flag = SUB_subject_rebellion_flag } OR = { SOV = { owns_state = 1127 } has_autonomy_state = autonomy_republic_rf has_autonomy_state = autonomy_kray_rf has_autonomy_state = autonomy_oblast_rf has_autonomy_state = autonomy_okrug_rf } } check_variable = { ADY.subjectinped > 15 } } hidden_effect = { ADY = { set_temp_variable = { modify_subjectinped = -3 } modify_subjectinped_support = yes } } } ###########SEPARATISM DAGESTAN########### if = { limit = { DAG = { NOT = { has_country_flag = SUB_subject_rebellion_flag } OR = { SOV = { owns_state = 671 } has_autonomy_state = autonomy_republic_rf has_autonomy_state = autonomy_kray_rf has_autonomy_state = autonomy_oblast_rf has_autonomy_state = autonomy_okrug_rf } } check_variable = { DAG.subjectinped > 15 } } hidden_effect = { DAG = { set_temp_variable = { modify_subjectinped = -3 } modify_subjectinped_support = yes } } } }