add_namespace = recognition ### [FROM.GetName] is Undermining Our Territorial Integrity! country_event = { id = recognition.1 title = recognition.1.t desc = recognition.1.d picture = GFX_crime_fighting is_triggered_only = yes minor_flavor = yes option = { name = recognition.1.a } } ### [FROM.GetName] No Longer Recognizes Our Independence! country_event = { id = recognition.3 title = recognition.3.t desc = recognition.3.d picture = GFX_crime_fighting is_triggered_only = yes minor_flavor = yes option = { name = recognition.3.a } } ### [FROM.GetName] Withdraws Recognition of the Breakaway country_event = { id = recognition.4 title = recognition.4.t desc = recognition.4.d picture = GFX_trade_agreement is_triggered_only = yes minor_flavor = yes option = { name = recognition.4.a log = "[GetDateText]: [This.GetName]: recognition.4.a executed" apply_recognition_pp = yes } } #We did it! country_event = { id = recognition.71 title = recognition.71.t desc = recognition.71.d picture = GFX_trade_agreement is_triggered_only = yes minor_flavor = yes immediate = { news_event = recognition.7 } option = { name = recognition.71.a log = "[GetDateText]: [This.GetName]: recognition.71.a executed" remove_ideas = lacks_international_recognition if = { limit = { has_idea = non_state_actor } remove_ideas = non_state_actor } if = { limit = { NOT = { is_in_array = { global.UN_general_assembly = THIS } } } add_to_array = { global.UN_general_assembly = THIS } add_dynamic_modifier = { modifier = united_nations_member } recompute_un_2_3_number = yes international_systems_force_update = yes } clr_country_flag = recent_un_ascension_attempt remove_stale_ga_membership_votes_for_this = yes international_systems_update = yes } } #No, we failed! country_event = { id = recognition.72 title = recognition.72.t desc = recognition.72.d picture = GFX_trade_agreement is_triggered_only = yes minor_flavor = yes option = { name = recognition.72.a log = "[GetDateText]: [This.GetName]: recognition.72.a executed" news_event = recognition.73 } } ### [FROM.GetName] Joins the United Nations! news_event = { id = recognition.7 title = recognition.7.t desc = recognition.7.d picture = GFX_UN_event_global_1 is_triggered_only = yes major = yes option = { name = recognition.7.a } } ### [FROM.GetName] Failed to join the UN! news_event = { id = recognition.73 title = recognition.73.t desc = recognition.73.d picture = GFX_UN_event_global_1 is_triggered_only = yes major = yes option = { name = recognition.73.a } } ### [FROM.GetName] is Pressuring Us to Recognize [pressured_to_recognize] country_event = { id = recognition.8 title = recognition.8.t desc = recognition.8.d picture = GFX_politics_talks is_triggered_only = yes option = { name = recognition.8.a log = "[GetDateText]: [This.GetName]: recognition.8.a executed" random_country = { limit = { has_country_flag = pressured_to_recognize_@ROOT } clr_country_flag = pressured_to_recognize_@ROOT add_opinion_modifier = { target = ROOT modifier = recognises_us } recognition_grant_increment = yes ROOT = { if = { limit = { NOT = { is_in_array = { recognised_countries = PREV } } } add_to_array = { recognised_countries = PREV } } } } ai_chance = { base = 1 modifier = { add = 1 sender_influence_higher_5 = yes } modifier = { add = 1 sender_influence_higher_10 = yes } modifier = { add = 1 sender_influence_higher_20 = yes } modifier = { add = 1 sender_influence_higher_30 = yes } modifier = { add = 1 sender_influence_higher_40 = yes } modifier = { add = 1 sender_influence_higher_50 = yes } } } option = { name = recognition.8.b log = "[GetDateText]: [This.GetName]: recognition.8.b executed" hidden_effect = { random_country = { limit = { has_country_flag = pressured_to_recognize_@ROOT } clr_country_flag = pressured_to_recognize_@ROOT } } if = { limit = { sender_influence_higher_5 = yes NOT = { sender_influence_higher_10 = yes } } add_political_power = -10 } else_if = { limit = { sender_influence_higher_10 = yes NOT = { sender_influence_higher_20 = yes } } add_political_power = -25 } else_if = { limit = { sender_influence_higher_20 = yes NOT = { sender_influence_higher_30 = yes } } add_political_power = -50 } else_if = { limit = { sender_influence_higher_30 = yes NOT = { sender_influence_higher_40 = yes } } add_political_power = -75 } else_if = { limit = { sender_influence_higher_40 = yes NOT = { sender_influence_higher_50 = yes } } add_political_power = -100 } else_if = { limit = { sender_influence_higher_50 = yes } add_political_power = -150 } ai_chance = { base = 1 modifier = { add = 1 any_country = { has_country_flag = pressured_to_recognize_@ROOT check_variable = { THIS.Granted_Recognition < 5 } } } modifier = { add = 5 any_country = { has_country_flag = pressured_to_recognize_@ROOT check_variable = { THIS.Granted_Recognition < 70 } } } modifier = { add = 10 OR = { tag = CHI tag = SPR FROM = { NOT = { has_government = PREV } } ic_ratio = { tag = FROM ratio > 1 } strength_ratio = { tag = FROM ratio > 1 } any_country = { has_country_flag = pressured_to_recognize_@ROOT OR = { has_country_flag = original_owner_@THIS has_country_flag = supports_original_owner_@THIS AND = { USA = { NOT = { is_in_array = { recognised_countries = PREV } } } ROOT = { check_variable = { influence_array^0 = USA } } } AND = { CHI = { NOT = { is_in_array = { recognised_countries = PREV } } } ROOT = { check_variable = { influence_array^0 = CHI } } } AND = { SOV = { NOT = { is_in_array = { recognised_countries = PREV } } } ROOT = { check_variable = { influence_array^0 = SOV } } } AND = { RAJ = { NOT = { is_in_array = { recognised_countries = PREV } } } ROOT = { check_variable = { influence_array^0 = RAJ } } } AND = { SAU = { NOT = { is_in_array = { recognised_countries = PREV } } } ROOT = { check_variable = { influence_array^0 = SAU } } } AND = { SAF = { NOT = { is_in_array = { recognised_countries = PREV } } } ROOT = { check_variable = { influence_array^0 = SAF } } } AND = { PER = { NOT = { is_in_array = { recognised_countries = PREV } } } ROOT = { check_variable = { influence_array^0 = PER } } } AND = { BRA = { NOT = { is_in_array = { recognised_countries = PREV } } } ROOT = { check_variable = { influence_array^0 = BRA } } } } } } } } } } #Scoping Events to prompt UN SC votes for International Recog country_event = { id = recognition.10 is_triggered_only = yes hidden = yes immediate = { set_temp_variable = { recog_owner_found = 0 } random_scope_in_array = { array = global.UN_general_assembly limit = { exists = yes has_country_flag = original_owner_@PREV } country_event = recognition.11 PREV = { set_temp_variable = { recog_owner_found = 1 } } } if = { limit = { check_variable = { recog_owner_found = 0 } } random_scope_in_array = { array = global.UN_general_assembly limit = { exists = yes } country_event = recognition.11 } } } } #Scope event to get proper nation info country_event = { id = recognition.11 is_triggered_only = yes hidden = yes immediate = { random_scope_in_array = { array = global.security_council_members # Dead members cannot finish the mission, and the vote subject is recused. limit = { is_eligible_current_sc_voter = yes } set_global_flag = current_ongoing_sc_vote set_country_flag = has_sc_mission activate_mission = UN_SC_voting_mission } for_each_loop = { array = global.security_council_members value = v var:v = { if = { limit = { is_eligible_current_sc_voter = yes } if = { limit = { NOT = { has_auto_sc_vote = yes } } country_event = recognition.12 } else = { process_auto_sc_vote = yes } if = { limit = { NOT = { has_country_flag = has_sc_mission } } activate_mission = UN_SC_voting_mission_result_timer } } } } } } #Security Council Vote country_event = { id = recognition.12 title = recognition.12.t desc = recognition.12.d picture = GFX_UN_gen_assembly is_triggered_only = yes #Yes option = { name = recognition.12.a log = "[GetDateText]: [THIS.GetName] has voted yes" if = { limit = { has_global_flag = current_ongoing_sc_vote } add_to_array = { global.security_council_vote_yes = THIS } } international_systems_update = yes ai_chance = { base = 1 modifier = { factor = 50 is_in_array = { recognised_countries = FROM.FROM } } modifier = { factor = 10 check_variable = { opinion@FROM.FROM > opinion@FROM } } modifier = { add = 15 check_variable = { opinion@FROM.FROM > 0 } } modifier = { add = 50 has_guaranteed = FROM.FROM } modifier = { add = 50 is_ally_with = FROM.FROM } } } #No option = { name = recognition.12.b if = { limit = { has_global_flag = current_ongoing_sc_vote } add_to_array = { global.security_council_vote_no = THIS } if = { limit = { is_in_array = { global.p5_sc_members = THIS } } set_global_flag = security_council_veto } } log = "[GetDateText]: [THIS.GetName] has voted no" international_systems_update = yes ai_chance = { base = 1 modifier = { factor = 0 is_in_array = { recognised_countries = FROM.FROM } } modifier = { factor = 10 check_variable = { opinion@FROM.FROM < opinion@FROM } } modifier = { add = 15 check_variable = { opinion@FROM > 0 } } modifier = { add = 50 has_guaranteed = FROM } modifier = { add = 50 is_ally_with = FROM } } } #Abstain option = { name = recognition.12.c if = { limit = { has_global_flag = current_ongoing_sc_vote } add_to_array = { global.security_council_vote_abstain = THIS } } log = "[GetDateText]: [THIS.GetName] has abstained from voting" international_systems_update = yes ai_chance = { base = 1 modifier = { factor = 0 is_in_array = { recognised_countries = FROM.FROM } } } } } #Scoping Events to prompt UN GA votes for International Recog country_event = { id = recognition.13 is_triggered_only = yes hidden = yes immediate = { news_event = recognition.121 set_temp_variable = { recog_owner_found = 0 } random_scope_in_array = { array = global.UN_general_assembly limit = { exists = yes has_country_flag = original_owner_@PREV } country_event = recognition.14 PREV = { set_temp_variable = { recog_owner_found = 1 } } } if = { limit = { check_variable = { recog_owner_found = 0 } } random_scope_in_array = { array = global.UN_general_assembly limit = { exists = yes } country_event = recognition.14 } } } } country_event = { id = recognition.20 is_triggered_only = yes hidden = yes immediate = { var:recog_requester = { country_event = recognition.25 } clear_variable = recog_requester } } country_event = { id = recognition.25 is_triggered_only = yes hidden = yes immediate = { FROM = { country_event = recognition.16 } } } country_event = { id = recognition.30 is_triggered_only = yes hidden = yes immediate = { var:prev_owner = { country_event = recognition.31 } } } country_event = { id = recognition.31 title = recognition.31.t desc = recognition.31.d picture = GFX_treaty is_triggered_only = yes #Don't recognize option option = { name = recognition.31.a ai_chance = { base = 1 } } #Recognize option option = { name = recognition.31.b log = "[GetDateText]: [This.GetName]: recognition.31.b" if = { limit = { NOT = { is_in_array = { recognised_countries = FROM } } } add_to_array = { recognised_countries = FROM } } FROM = { country_event = recognition.16 } ai_chance = { base = 0 modifier = { add = 5 has_opinion = { target = FROM value > 75 } } modifier = { add = 15 FROM = { check_variable = { Granted_Recognition > 70 } } } modifier = { add = 10 has_war = yes } modifier = { add = 10 NOT = { has_stability > 0.3 } } } } } country_event = { id = recognition.16 title = recognition.16.t desc = recognition.16.d picture = GFX_treaty is_triggered_only = yes #Don't recognize option option = { name = recognition.16.a ai_chance = { base = 1 # Negative opinion of requester modifier = { add = 3 has_opinion = { target = FROM value < -25 } } # Strong dislike of requester modifier = { add = 5 has_opinion = { target = FROM value < -50 } } # Good relations with the original owner modifier = { add = 4 # TODO: Replace this with a check for a "if original_owner_from var is defined apply this" any_country = { has_country_flag = original_owner_@FROM ROOT = { has_opinion = { target = PREV value > 25 } } } } # Same faction as original owner — strong refusal modifier = { add = 8 any_country = { has_country_flag = original_owner_@FROM is_in_faction_with = ROOT } } # Ideologically aligned with original owner modifier = { add = 3 any_country = { has_country_flag = original_owner_@FROM has_government = ROOT } } # Opposing ideology to requester modifier = { add = 2 NOT = { has_government = FROM } } } } #Recognize option option = { name = recognition.16.b log = "[GetDateText]: [This.GetName]: recognition.16.b executed" add_political_power = -25 if = { limit = { NOT = { is_in_array = { recognised_countries = FROM } } } add_to_array = { recognised_countries = FROM } } custom_effect_tooltip = TT_ALL_UN_MEMBERS every_collection_element = { input = { input = collection:un_general_assembly_members_collection } if = { limit = { NOT = { tag = ROOT } is_in_array = { recognised_countries = FROM } } add_opinion_modifier = { target = ROOT modifier = supporting_recognized_ally } } else_if = { limit = { NOT = { tag = ROOT } has_country_flag = supports_original_owner_@FROM } add_opinion_modifier = { target = ROOT modifier = recognises_them } } } random_country = { limit = { has_country_flag = original_owner_@FROM NOT = { is_in_array = { recognised_countries = FROM } } } add_opinion_modifier = { target = ROOT modifier = recognises_them } country_event = recognition.1 } FROM = { add_opinion_modifier = { target = ROOT modifier = recognises_us } recognition_grant_increment = yes } international_systems_update = yes ai_chance = { base = 0 # Warm relations modifier = { add = 1 has_opinion = { target = FROM value > 25 } } # Good relations modifier = { add = 2 has_opinion = { target = FROM value > 50 } } # Strong relations modifier = { add = 5 has_opinion = { target = FROM value > 75 } } # Same faction — strong push modifier = { add = 8 is_in_faction_with = FROM } # Same ideology group modifier = { add = 3 has_government = FROM } # Rival of the original owner — opportunistic recognition modifier = { add = 4 any_country = { has_country_flag = original_owner_@FROM ROOT = { has_opinion = { target = PREV value < -25 } } } } # Already recognized by many — bandwagon effect modifier = { add = 2 FROM = { check_variable = { Granted_Recognition > 10 } } } } } } country_event = { id = recognition.17 is_triggered_only = yes hidden = yes immediate = { every_collection_element = { input = { input = collection:un_general_assembly_members_collection } if = { limit = { NOT = { tag = ROOT } NOT = { is_in_array = { recognised_countries = ROOT } } NOT = { has_country_flag = original_owner_@ROOT } } country_event = recognition.18 } } } } country_event = { id = recognition.18 title = recognition.18.t desc = recognition.18.d picture = GFX_EventCountry_Template is_triggered_only = yes option = { name = recognition.18.a ai_chance = { base = 0 modifier = { add = 100 has_country_flag = original_owner_@FROM } modifier = { add = 25 has_country_flag = supports_original_owner_@FROM } } } option = { name = recognition.18.b log = "[GetDateText]: [This.GetName]: recognition.18.b" add_to_array = { recognised_countries = FROM } random_country = { limit = { has_country_flag = original_owner_@FROM NOT = { is_in_array = { recognised_countries = FROM } } } add_opinion_modifier = { target = ROOT modifier = recognises_them } country_event = recognition.1 } FROM = { every_allied_country = { add_opinion_modifier = { target = ROOT modifier = supporting_recognized_ally } } add_opinion_modifier = { target = ROOT modifier = recognises_us } recognition_grant_increment = yes } ai_chance = { base = 5 modifier = { add = 15 has_opinion = { target = FROM value > 50 } } modifier = { add = 25 is_ally_with = FROM } modifier = { add = 20 has_guaranteed = FROM } modifier = { add = 15 is_in_faction_with = FROM } modifier = { factor = 0 has_country_flag = original_owner_@FROM } modifier = { factor = 0 has_country_flag = supports_original_owner_@FROM } } } } ### [FROM.GetName] gets SC recomendation news_event = { id = recognition.121 title = recognition.121.t desc = recognition.121.d picture = GFX_UN_event_global_2 is_triggered_only = yes option = { name = recognition.121.a } } #Fails to pass the SC news_event = { id = recognition.122 title = recognition.122.t desc = recognition.122.d picture = GFX_UN_event_global_2 is_triggered_only = yes option = { name = recognition.122.a } } # Fired once when recognition first reaches the UN-ascension threshold (40% of GA) country_event = { id = recognition.45 title = recognition.45.t desc = recognition.45.d picture = GFX_political_deal is_triggered_only = yes option = { name = recognition.45.a } } country_event = { id = recognition.14 is_triggered_only = yes hidden = yes immediate = { random_scope_in_array = { array = global.UN_general_assembly # A dead holder never completes the mission, so the ongoing flag leaks and voting stalls forever. limit = { exists = yes } set_global_flag = current_ongoing_ga_vote set_country_flag = has_ga_mission activate_mission = UN_GA_voting_mission } for_each_scope_loop = { array = global.UN_general_assembly if = { limit = { NOT = { has_auto_ga_vote = yes } } country_event = recognition.15 } else = { process_auto_ga_vote = yes } if = { limit = { NOT = { has_country_flag = has_ga_mission } } activate_mission = UN_GA_voting_mission_result_timer } } } } #General Assembly Vote country_event = { id = recognition.15 title = recognition.15.t desc = recognition.15.d picture = GFX_UN_gen_assembly is_triggered_only = yes #Yes option = { name = recognition.15.a log = "[GetDateText]: [THIS.GetName] has voted yes" if = { limit = { has_global_flag = current_ongoing_ga_vote } add_to_array = { global.general_assembly_vote_yes = THIS } } international_systems_update = yes ai_chance = { base = 1 modifier = { factor = 50 is_in_array = { recognised_countries = FROM.FROM } } modifier = { factor = 10 check_variable = { opinion@FROM.FROM > opinion@FROM } } modifier = { add = 15 check_variable = { opinion@FROM.FROM > 0 } } modifier = { add = 50 has_guaranteed = FROM.FROM } modifier = { add = 50 is_ally_with = FROM.FROM } } } #No option = { name = recognition.15.b if = { limit = { has_global_flag = current_ongoing_ga_vote } add_to_array = { global.general_assembly_vote_no = THIS } } log = "[GetDateText]: [THIS.GetName] has voted no" international_systems_update = yes ai_chance = { base = 1 modifier = { factor = 10 check_variable = { opinion@FROM.FROM < opinion@FROM } } modifier = { add = 15 check_variable = { opinion@FROM > 0 } } modifier = { add = 50 has_guaranteed = FROM } modifier = { add = 50 is_ally_with = FROM } modifier = { factor = 0 is_in_array = { recognised_countries = FROM.FROM } } } } #Abstain option = { name = recognition.15.c if = { limit = { has_global_flag = current_ongoing_ga_vote } add_to_array = { global.general_assembly_vote_abstain = THIS } } log = "[GetDateText]: [THIS.GetName] has abstained from voting" international_systems_update = yes ai_chance = { base = 1 modifier = { factor = 0 is_in_array = { recognised_countries = FROM.FROM } } } } }