AU_monthly_update = { AU_release_stale_branch_reservations = yes if = { limit = { check_variable = { global.AU_member^num > 0 } } if = { limit = { NOT = { has_global_flag = African_Union_united } has_global_flag = African_Union_formed } random_scope_in_array = { array = global.AU_member african_union_update_outlook_popularities = yes } } if = { limit = { check_variable = { global.month = 6 } NOT = { has_global_flag = african_union_summit_held } } random_scope_in_array = { array = global.AU_member random_list = { seed = random 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.1 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.2 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.3 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.4 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.5 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.6 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.7 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.8 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.9 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.10 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.11 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.12 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.13 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.14 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.15 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.16 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.17 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.18 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.19 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.20 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.21 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.22 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.23 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.24 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.25 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.26 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.27 } } 10 = { for_each_scope_loop = { array = global.AU_member country_event = AfricanUnionSummit.28 } } } set_global_flag = { flag = african_union_summit_held days = 60 value = 1 } } } } } african_union_update_outlook_popularities = { set_variable = { global.african_union_population = 0 } set_variable = { global.african_union_western_outlook = 0 } set_variable = { global.african_union_emerging_outlook = 0 } set_variable = { global.african_union_salafist_outlook = 0 } set_variable = { global.african_union_nonaligned_outlook = 0 } set_variable = { global.african_union_nationalist_outlook = 0 } set_variable = { global.average_gdp_of_africa = 0 } for_each_scope_loop = { array = global.is_african_nation if = { limit = { country_exists = THIS } add_to_variable = { global.african_union_population = THIS.population_total_m } if = { limit = { THIS = { has_government = democratic } } add_to_variable = { global.african_union_western_outlook = THIS.population_total_m } } if = { limit = { THIS = { has_government = communism } } add_to_variable = { global.african_union_emerging_outlook = THIS.population_total_m } } if = { limit = { THIS = { has_government = fascism } } add_to_variable = { global.african_union_salafist_outlook = THIS.population_total_m } } if = { limit = { THIS = { has_government = neutrality } } add_to_variable = { global.african_union_nonaligned_outlook = THIS.population_total_m } } if = { limit = { THIS = { has_government = nationalist } } add_to_variable = { global.african_union_nationalist_outlook = THIS.population_total_m } } add_to_variable = { global.average_gdp_of_africa = THIS.gdp_total } } } if = { limit = { check_variable = { global.african_union_population > 0 } } set_variable = { global.african_union_western_outlook_share = global.african_union_western_outlook } divide_variable = { global.african_union_western_outlook_share = global.african_union_population } set_variable = { global.african_union_emerging_outlook_share = global.african_union_emerging_outlook } divide_variable = { global.african_union_emerging_outlook_share = global.african_union_population } set_variable = { global.african_union_salafist_outlook_share = global.african_union_salafist_outlook } divide_variable = { global.african_union_salafist_outlook_share = global.african_union_population } set_variable = { global.african_union_nonaligned_outlook_share = global.african_union_nonaligned_outlook } divide_variable = { global.african_union_nonaligned_outlook_share = global.african_union_population } set_variable = { global.african_union_nationalist_outlook_share = global.african_union_nationalist_outlook } divide_variable = { global.african_union_nationalist_outlook_share = global.african_union_population } divide_variable = { global.average_gdp_of_africa = global.african_union_population } } } african_union_give_mandate = { if = { limit = { NOT = { has_global_flag = African_Union_united } NOT = { has_global_flag = african_union_mandate_granted } } set_global_flag = african_union_mandate_granted custom_effect_tooltip = african_union_give_mandate_tt } } african_union_use_mandate = { if = { limit = { NOT = { has_global_flag = African_Union_united } NOT = { has_global_flag = african_union_extra_mandate_granted } } clr_global_flag = african_union_mandate_granted custom_effect_tooltip = african_union_use_mandate_tt } else = { custom_effect_tooltip = african_union_use_mandate_extra_tt clr_global_flag = african_union_extra_mandate_granted } } african_union_give_extra_mandate = { if = { limit = { NOT = { has_global_flag = African_Union_united } NOT = { has_global_flag = african_union_extra_mandate_granted } } set_global_flag = african_union_extra_mandate_granted custom_effect_tooltip = african_union_give_extra_mandate_tt } } AU_release_stale_branch_reservations = { if = { limit = { OR = { has_global_flag = AU_stock_exchange_reserved has_global_flag = AU_common_currency_reserved has_global_flag = AU_nuclear_policy_reserved has_global_flag = AU_defence_doctrine_reserved has_global_flag = AU_headquarters_reserved has_global_flag = AU_official_language_reserved has_global_flag = AU_corruption_policy_reserved has_global_flag = AU_legislature_reserved has_global_flag = AU_unification_model_reserved has_global_flag = AU_create_investment_bank_reserved has_global_flag = AU_create_monetary_fund_reserved has_global_flag = AU_create_oil_fund_reserved has_global_flag = AU_create_central_bank_reserved has_global_flag = AU_create_african_free_trade_area_reserved has_global_flag = AU_coastal_protection_reserved has_global_flag = AU_form_defence_council_reserved has_global_flag = AU_create_african_space_agency_reserved has_global_flag = AU_include_african_diaspora_reserved has_global_flag = AU_african_energy_commission_reserved has_global_flag = AU_common_disease_fight_reserved has_global_flag = AU_pan_african_university_reserved has_global_flag = AU_unite_africa_reserved } } if = { limit = { has_global_flag = AU_stock_exchange_reserved NOT = { any_of_scopes = { array = global.AU_member OR = { focus_progress = { focus = AFRICAN_UNION_shared_focus_create_stock_exchange_egypt progress > 0 } focus_progress = { focus = AFRICAN_UNION_shared_focus_create_stock_exchange_our_country progress > 0 } focus_progress = { focus = AFRICAN_UNION_shared_focus_create_stock_exchange_south_africa progress > 0 } } } } } clr_global_flag = AU_stock_exchange_reserved } if = { limit = { has_global_flag = AU_common_currency_reserved NOT = { any_of_scopes = { array = global.AU_member OR = { focus_progress = { focus = AFRICAN_UNION_shared_focus_common_afriq progress > 0 } focus_progress = { focus = AFRICAN_UNION_shared_focus_common_central_african_franc progress > 0 } focus_progress = { focus = AFRICAN_UNION_shared_focus_common_currency_dinar progress > 0 } focus_progress = { focus = AFRICAN_UNION_shared_focus_common_currency_south_african_rand progress > 0 } focus_progress = { focus = AFRICAN_UNION_shared_focus_common_currency_west_african_franc progress > 0 } } } } } clr_global_flag = AU_common_currency_reserved } if = { limit = { has_global_flag = AU_nuclear_policy_reserved NOT = { any_of_scopes = { array = global.AU_member OR = { focus_progress = { focus = AFRICAN_UNION_shared_focus_nuclear_armament progress > 0 } focus_progress = { focus = AFRICAN_UNION_shared_focus_sign_treaty_of_pelindaba progress > 0 } } } } } clr_global_flag = AU_nuclear_policy_reserved } if = { limit = { has_global_flag = AU_defence_doctrine_reserved NOT = { any_of_scopes = { array = global.AU_member OR = { focus_progress = { focus = AFRICAN_UNION_shared_focus_employ_local_defence progress > 0 } focus_progress = { focus = AFRICAN_UNION_shared_focus_rapid_deployment_forces progress > 0 } } } } } clr_global_flag = AU_defence_doctrine_reserved } if = { limit = { has_global_flag = AU_headquarters_reserved NOT = { any_of_scopes = { array = global.AU_member OR = { focus_progress = { focus = AFRICAN_UNION_shared_focus_hq_in_ethiopia progress > 0 } focus_progress = { focus = AFRICAN_UNION_shared_focus_hq_in_nigeria progress > 0 } focus_progress = { focus = AFRICAN_UNION_shared_focus_hq_in_our_country progress > 0 } } } } } clr_global_flag = AU_headquarters_reserved } if = { limit = { has_global_flag = AU_official_language_reserved NOT = { any_of_scopes = { array = global.AU_member OR = { focus_progress = { focus = AFRICAN_UNION_shared_focus_speak_arabic progress > 0 } focus_progress = { focus = AFRICAN_UNION_shared_focus_speak_english progress > 0 } focus_progress = { focus = AFRICAN_UNION_shared_focus_speak_french progress > 0 } focus_progress = { focus = AFRICAN_UNION_shared_focus_speak_swahili progress > 0 } } } } } clr_global_flag = AU_official_language_reserved } if = { limit = { has_global_flag = AU_corruption_policy_reserved NOT = { any_of_scopes = { array = global.AU_member OR = { focus_progress = { focus = AFRICAN_UNION_shared_focus_embrace_corruption progress > 0 } focus_progress = { focus = AFRICAN_UNION_shared_focus_fight_corruption progress > 0 } } } } } clr_global_flag = AU_corruption_policy_reserved } if = { limit = { has_global_flag = AU_legislature_reserved NOT = { any_of_scopes = { array = global.AU_member OR = { focus_progress = { focus = AFRICAN_UNION_shared_focus_empower_assembly progress > 0 } focus_progress = { focus = AFRICAN_UNION_shared_focus_empower_parliament progress > 0 } } } } } clr_global_flag = AU_legislature_reserved } if = { limit = { has_global_flag = AU_unification_model_reserved NOT = { any_of_scopes = { array = global.AU_member OR = { focus_progress = { focus = AFRICAN_UNION_shared_focus_federation_of_africa progress > 0 } focus_progress = { focus = AFRICAN_UNION_shared_focus_united_states_of_africa progress > 0 } } } } } clr_global_flag = AU_unification_model_reserved } if = { limit = { has_global_flag = AU_create_investment_bank_reserved NOT = { any_of_scopes = { array = global.AU_member focus_progress = { focus = AFRICAN_UNION_shared_focus_create_investment_bank progress > 0 } } } } clr_global_flag = AU_create_investment_bank_reserved } if = { limit = { has_global_flag = AU_create_monetary_fund_reserved NOT = { any_of_scopes = { array = global.AU_member focus_progress = { focus = AFRICAN_UNION_shared_focus_create_monetary_fund progress > 0 } } } } clr_global_flag = AU_create_monetary_fund_reserved } if = { limit = { has_global_flag = AU_create_oil_fund_reserved NOT = { any_of_scopes = { array = global.AU_member focus_progress = { focus = AFRICAN_UNION_shared_focus_create_oil_fund progress > 0 } } } } clr_global_flag = AU_create_oil_fund_reserved } if = { limit = { has_global_flag = AU_create_central_bank_reserved NOT = { any_of_scopes = { array = global.AU_member focus_progress = { focus = AFRICAN_UNION_shared_focus_create_central_bank progress > 0 } } } } clr_global_flag = AU_create_central_bank_reserved } if = { limit = { has_global_flag = AU_create_african_free_trade_area_reserved NOT = { any_of_scopes = { array = global.AU_member focus_progress = { focus = AFRICAN_UNION_shared_focus_create_african_free_trade_area progress > 0 } } } } clr_global_flag = AU_create_african_free_trade_area_reserved } if = { limit = { has_global_flag = AU_coastal_protection_reserved NOT = { any_of_scopes = { array = global.AU_member focus_progress = { focus = AFRICAN_UNION_shared_focus_coastal_protection progress > 0 } } } } clr_global_flag = AU_coastal_protection_reserved } if = { limit = { has_global_flag = AU_form_defence_council_reserved NOT = { any_of_scopes = { array = global.AU_member focus_progress = { focus = AFRICAN_UNION_shared_focus_form_defence_council progress > 0 } } } } clr_global_flag = AU_form_defence_council_reserved } if = { limit = { has_global_flag = AU_create_african_space_agency_reserved NOT = { any_of_scopes = { array = global.AU_member focus_progress = { focus = AFRICAN_UNION_shared_focus_create_african_space_agency progress > 0 } } } } clr_global_flag = AU_create_african_space_agency_reserved } if = { limit = { has_global_flag = AU_include_african_diaspora_reserved NOT = { any_of_scopes = { array = global.AU_member focus_progress = { focus = AFRICAN_UNION_shared_focus_include_african_diaspora progress > 0 } } } } clr_global_flag = AU_include_african_diaspora_reserved } if = { limit = { has_global_flag = AU_african_energy_commission_reserved NOT = { any_of_scopes = { array = global.AU_member focus_progress = { focus = AFRICAN_UNION_shared_focus_african_energy_commission progress > 0 } } } } clr_global_flag = AU_african_energy_commission_reserved } if = { limit = { has_global_flag = AU_common_disease_fight_reserved NOT = { any_of_scopes = { array = global.AU_member focus_progress = { focus = AFRICAN_UNION_shared_focus_common_disease_fight progress > 0 } } } } clr_global_flag = AU_common_disease_fight_reserved } if = { limit = { has_global_flag = AU_pan_african_university_reserved NOT = { any_of_scopes = { array = global.AU_member focus_progress = { focus = AFRICAN_UNION_shared_focus_pan_african_university progress > 0 } } } } clr_global_flag = AU_pan_african_university_reserved } if = { limit = { has_global_flag = AU_unite_africa_reserved NOT = { any_of_scopes = { array = global.AU_member focus_progress = { focus = AFRICAN_UNION_shared_focus_unite_africa progress > 0 } } } } clr_global_flag = AU_unite_africa_reserved } } } african_union_remove_summit_buffs = { if = { limit = { has_idea = african_union_common_political_agenda } remove_ideas = african_union_common_political_agenda } if = { limit = { has_idea = african_union_child_welfare } remove_ideas = african_union_child_welfare } if = { limit = { has_idea = african_union_improved_digitalisation } remove_ideas = african_union_improved_digitalisation } if = { limit = { has_idea = african_union_human_rights_good_boy } remove_ideas = african_union_human_rights_good_boy } if = { limit = { has_idea = african_union_human_rights_bad_boy } remove_ideas = african_union_human_rights_bad_boy } if = { limit = { has_idea = african_union_improved_trade_relations } remove_ideas = african_union_improved_trade_relations } if = { limit = { has_idea = african_union_health_research } remove_ideas = african_union_health_research } if = { limit = { has_idea = african_union_cultural_independence } remove_ideas = african_union_cultural_independence } if = { limit = { has_idea = african_union_encourage_domestic_agriculture } remove_ideas = african_union_encourage_domestic_agriculture } if = { limit = { has_idea = african_union_aids_watch_funded } remove_ideas = african_union_aids_watch_funded } if = { limit = { has_idea = african_union_aids_watch_funder } remove_ideas = african_union_aids_watch_funder } if = { limit = { has_idea = african_union_decade_of_education } remove_ideas = african_union_decade_of_education } if = { limit = { has_idea = african_union_declaration_of_fertilizers } remove_ideas = african_union_declaration_of_fertilizers } if = { limit = { has_idea = african_union_research_focus } remove_ideas = african_union_research_focus } if = { limit = { has_idea = african_union_renewable_investments } remove_ideas = african_union_renewable_investments } if = { limit = { has_idea = african_union_industrial_development } remove_ideas = african_union_industrial_development } if = { limit = { has_idea = african_union_health_care_investment } remove_ideas = african_union_health_care_investment } if = { limit = { has_idea = african_union_combat_human_trafficking } remove_ideas = african_union_combat_human_trafficking } if = { limit = { has_idea = african_union_water_and_food_benefits } remove_ideas = african_union_water_and_food_benefits } if = { limit = { has_idea = african_union_coup_defence } remove_ideas = african_union_coup_defence } if = { limit = { has_idea = african_union_energy_investments } remove_ideas = african_union_energy_investments } if = { limit = { has_idea = african_union_infra_investments } remove_ideas = african_union_infra_investments } if = { limit = { has_idea = african_union_peacekeeping_effort } remove_ideas = african_union_peacekeeping_effort } if = { limit = { has_idea = african_union_no_ransom } remove_ideas = african_union_no_ransom } if = { limit = { has_idea = african_union_financial_institutions } remove_ideas = african_union_financial_institutions } if = { limit = { has_idea = african_union_fight_corruption } remove_ideas = african_union_fight_corruption } if = { limit = { has_idea = african_union_fight_colonialism } remove_ideas = african_union_fight_colonialism } if = { limit = { has_idea = african_union_invest_defence } remove_ideas = african_union_invest_defence } if = { limit = { has_idea = african_union_invest_sea_trade } remove_ideas = african_union_invest_sea_trade } } HIV_aids_monthly_mechanic = { if = { limit = { OR = { has_idea = low_level_of_aids has_idea = rising_level_of_aids has_idea = high_level_of_aids has_idea = very_high_level_of_aids has_idea = critical_level_of_aids } } random_list = { seed = random 50 = { modifier = { factor = 0 has_idea = health_06 } modifier = { factor = 0.2 has_idea = health_05 } modifier = { factor = 0.4 has_idea = health_04 } modifier = { factor = 0.6 has_idea = health_03 } modifier = { factor = 0.8 has_idea = health_02 } modifier = { factor = 0.7 has_idea = fully_nationalized_healthcare } modifier = { factor = 0.86 has_idea = partially_nationalized_healthcare } modifier = { factor = 0.7 has_idea = corruption_level_01 } modifier = { factor = 0.8 has_idea = corruption_level_02 } modifier = { factor = 0.9 has_idea = corruption_level_03 } modifier = { factor = 1.2 OR = { has_idea = corruption_level_05 has_idea = corruption_level_06 has_idea = corruption_level_07 has_idea = corruption_level_08 has_idea = corruption_level_09 has_idea = corruption_level_10 } } modifier = { factor = 0.8 has_idea = police_05 } modifier = { factor = 0.9 has_idea = police_04 } country_event = AIDS_events.1 } 50 = { country_event = AIDS_events.2 } 1 = { modifier = { factor = 50 has_idea = health_06 } modifier = { factor = 40 has_idea = health_05 } modifier = { factor = 30 has_idea = health_04 } modifier = { factor = 20 has_idea = health_03 } modifier = { factor = 10 has_idea = health_02 } modifier = { factor = 1.15 has_idea = fully_nationalized_healthcare } modifier = { factor = 1.07 has_idea = partially_nationalized_healthcare } modifier = { factor = 1.15 has_idea = corruption_level_01 } modifier = { factor = 1.1 has_idea = corruption_level_02 } modifier = { factor = 1.05 has_idea = corruption_level_03 } modifier = { factor = 0.83 OR = { has_idea = corruption_level_05 has_idea = corruption_level_06 has_idea = corruption_level_07 has_idea = corruption_level_08 has_idea = corruption_level_09 has_idea = corruption_level_10 } } modifier = { factor = 1.1 has_idea = police_05 } modifier = { factor = 1.05 has_idea = police_04 } country_event = AIDS_events.3 } } } }