### Environmental Imperialism EU_environmental_imperialism_category = { EU_POTEF_environmental_imperialism_decision = { cost = 100 target_root_trigger = { has_idea = EU_president has_country_flag = environmental_imperialism } target_trigger = { FROM = { NOT = { has_country_flag = EU_POTEF_environmental_imperialism_target } NOT = { has_idea = USoE_environmental_sanctions } NOT = { has_country_flag = fossil_energy_pact } NOT = { has_country_flag = break_environmental_sanctions } renewable_energy_infra < num_owned_states OR = { AND = { ROOT = { has_country_flag = environmental_imperialism_europe } capital_scope = { is_on_continent = europe } } AND = { ROOT = { has_country_flag = environmental_imperialism_north_america } capital_scope = { is_on_continent = north_america } } AND = { ROOT = { has_country_flag = environmental_imperialism_south_america } capital_scope = { is_on_continent = south_america } } AND = { ROOT = { has_country_flag = environmental_imperialism_africa } capital_scope = { is_on_continent = africa } } AND = { ROOT = { has_country_flag = environmental_imperialism_asia } capital_scope = { is_on_continent = asia } } AND = { ROOT = { has_country_flag = environmental_imperialism_middle_east } capital_scope = { is_on_continent = middle_east } } AND = { ROOT = { has_country_flag = environmental_imperialism_pacific } capital_scope = { is_on_continent = pacific } } AND = { ROOT = { has_country_flag = environmental_imperialism_oceania } capital_scope = { is_on_continent = australia } } } } } target_array = global.PR_regional_or_greater_powers complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision EU_POTEF_environmental_imperialism_decision" FROM = { activate_mission = EU_POTEF_environmental_imperialism_mission set_country_flag = EU_POTEF_environmental_imperialism_target custom_effect_tooltip = tooltip_EU_no_mission_complete show_ideas_tooltip = USoE_environmental_sanctions } } ai_will_do = { base = 1 } } EU_POTEF_environmental_imperialism_mission = { allowed = { always = yes } available = { set_temp_variable = { var = a value = { value = num_owned_states subtract = 1 } } renewable_energy_infra > a } activation = { always = no } days_mission_timeout = 30 is_good = no selectable_mission = yes fire_only_once = yes complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision EU_POTEF_environmental_imperialism_mission" set_temp_variable = { party_index = 17 } set_temp_variable = { party_popularity_increase = 0.05 } set_temp_variable = { temp_outlook_increase = 0.05 } change_relative_party_popularity = yes var:global.eupresfederation = { country_event = USoEevent.5 } clr_country_flag = EU_POTEF_environmental_imperialism_target } timeout_effect = { log = "[GetDateText]: [Root.GetName]: Decision EU_POTEF_environmental_imperialism_mission" add_ideas = USoE_environmental_sanctions clr_country_flag = EU_POTEF_environmental_imperialism_target var:global.eupresfederation = { country_event = USoEevent.6 } } ai_will_do = { base = 1 } } #Green Energy Reconstruction EU_POTEF_environmental_imperialism_restructure_industry_decision = { cost = 100 available = { has_country_flag = EU_POTEF_environmental_imperialism_target } visible = { has_country_flag = EU_POTEF_environmental_imperialism_target any_owned_state = { renewable_energy_infra < 2 industrial_complex > 0 } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision EU_POTEF_environmental_imperialism_restructure_industry_decision" set_temp_variable = { temp1 = 0 } every_owned_state = { limit = { renewable_energy_infra < 2 industrial_complex > 0 } remove_building = { type = industrial_complex level = 1 } add_building_construction = { type = renewable_energy_infra level = 1 instant_build = yes } add_to_temp_variable = { temp1 = 1 } } subtract_from_variable = { treasury = temp1 } custom_effect_tooltip = tooltip_green_energy_reconstruction for_loop_effect = { end = temp1 if = { limit = { check_variable = { party_pop_array^17 < 0.50 } } set_temp_variable = { party_index = 17 } set_temp_variable = { party_popularity_increase = 0.05 } set_temp_variable = { temp_outlook_increase = 0.05 } change_relative_party_popularity = yes } } } ai_will_do = { base = 1 } } EU_POTEF_break_environmental_sanctions_decision = { cost = 100 target_array = global.EU_member target_root_trigger = { has_idea = USoE_environmental_sanctions } target_trigger = { FROM = { has_idea = EU_president } } war_with_on_complete = ROOT complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision EU_POTEF_break_environmental_sanctions_decision" remove_ideas = USoE_environmental_sanctions set_country_flag = break_environmental_sanctions FROM = { add_opinion_modifier = { target = ROOT modifier = betrayed_our_cause } reverse_add_opinion_modifier = { target = ROOT modifier = betrayed_our_cause } set_temp_variable = { wargoal_on = ROOT } set_temp_variable = { wargoal_type = 1 } add_threat_from_wargoal_effect = yes create_wargoal = { type = topple_government target = ROOT } country_event = USoEevent.7 } if = { limit = { NOT = { has_global_flag = fossil_energy_pact } NOT = { is_in_faction = yes } } create_faction_from_template = faction_template_fep set_global_flag = fossil_energy_pact set_country_flag = fossil_energy_pact add_to_array = { global.fossil_energy_pact_members = THIS } } else_if = { limit = { has_global_flag = fossil_energy_pact NOT = { is_in_faction = yes } NOT = { is_in_array = { global.fossil_energy_pact_members = THIS } } } random_scope_in_array = { array = global.fossil_energy_pact_members limit = { has_country_flag = fossil_energy_pact is_faction_leader = yes } add_to_faction = ROOT } set_country_flag = fossil_energy_pact add_to_array = { global.fossil_energy_pact_members = THIS } } } ai_will_do = { base = 0 modifier = { add = 1 strength_ratio = { tag = FROM ratio > 0.7 } } modifier = { add = 1 any_of_scopes = { array = global.fossil_energy_pact_members exists = yes NOT = { tag = ROOT } has_country_flag = fossil_energy_pact is_faction_leader = yes strength_ratio = { tag = FROM ratio > 0.5 } } strength_ratio = { tag = FROM ratio > 0.1 } } modifier = { add = 1 any_of_scopes = { array = global.fossil_energy_pact_members exists = yes has_country_flag = fossil_energy_pact is_faction_leader = yes strength_ratio = { tag = FROM ratio > 0.7 } } } modifier = { add = 1 ic_ratio = { tag = FROM ratio > 0.6 } } } } } ####################### ### POTEF elections ### ####################### EU_office_category = { EU_POTEF_call_election = { available = { NOT = { has_global_flag = EU_POTEF_taken_flag } NOT = { has_global_flag = ongoing_potef_election } } visible = { has_global_flag = european_federation } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision EU_POTEF_call_election" activate_mission = EU_POTEF_election_campaign election_POTEF_in_member_state = yes set_global_flag = ongoing_potef_election } ai_will_do = { base = 0 } } EU_POTEF_election_campaign = { allowed = { always = no } available = { tag = EUU } activation = { always = no } days_mission_timeout = 90 selectable_mission = yes timeout_effect = { log = "[GetDateText]: [Root.GetName]: mission EU_POTEF_election_campaign" POTEF_election = yes set_POTEF_elect = yes } ai_will_do = { base = 0 } } EU_POTEF_term = { allowed = { always = no } available = { tag = EUU } activation = { always = no } days_mission_timeout = POTEF_time_to_camp selectable_mission = yes timeout_effect = { log = "[GetDateText]: [Root.GetName]: mission EU_POTEF_term" set_global_flag = ongoing_potef_election activate_mission = EU_POTEF_election_campaign } ai_will_do = { base = 0 } } EU_POTEF_nominee = { visible = { has_global_flag = european_federation has_idea = EU_member } available = { has_global_flag = ongoing_potef_election NOT = { has_country_flag = POTEF_has_nominated } custom_trigger_tooltip = { tooltip = tooltip_EU_POTEF_nominee_trigger set_temp_variable = { temp_idx = ruling_party } OR = { NOT = { any_of_scopes = { array = global.EU_member exists = yes has_variable = ruling_party check_variable = { ruling_party = ROOT.temp_idx } NOT = { tag = ROOT } NOT = { is_top3_influencer = yes } } } is_ai = yes } } custom_trigger_tooltip = { tooltip = tooltip_EU_POTEF_nominee_trigger_2 set_temp_variable = { temp_idx = ruling_party } NOT = { check_variable = { global.POTEF_nominee_country^temp_idx > 0 } } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: decision EU_POTEF_nominee" set_variable = { var_gov_index = ruling_party } set_country_flag = POTEF_has_nominated # Index = subideology, value = nominee country id (read by EU_POTEF_party_N_nominee gate + display loc) set_variable = { global.POTEF_nominee_country^var_gov_index = THIS.id } for_each_scope_loop = { array = global.EU_member tooltip = TT_ALL_EU_MEMBER_NATIONS_GAIN news_event = EU_POTEF_news.1 } } ai_will_do = { base = 1 } } EU_POTEF_show_election_polls = { visible = { has_global_flag = european_federation NOT = { has_country_flag = POTEF_polls } } complete_effect = { log = "[GetDateText]: [Root.GetName]: decision EU_POTEF_show_election_polls" set_country_flag = POTEF_polls } ai_will_do = { base = 0 } } EU_POTEF_hide_election_polls = { visible = { has_global_flag = european_federation has_country_flag = POTEF_polls } complete_effect = { log = "[GetDateText]: [Root.GetName]: decision EU_POTEF_hide_election_polls" clr_country_flag = POTEF_polls } ai_will_do = { base = 0 } } EU_POTEF_campaign_in_member_state = { allowed = { EU_is_potential = yes } target_root_trigger = { has_idea = EU_member has_country_flag = POTEF_has_nominated } target_array = global.EU_member cost = 200 days_remove = 30 fixed_random_seed = no visible = { any_of_scopes = { array = global.EU_member has_active_mission = EU_POTEF_election_campaign } } complete_effect = { custom_effect_tooltip = tooltip_EU_POTEF_campaign_in_member_state_effect hidden_effect = { log = "[GetDateText]: [Root.GetName]: decision EU_POTEF_campaign_in_member_state" if = { limit = { has_variable = ruling_party } set_variable = { var_gov_index = ruling_party } } random_list = { 3 = { modifier = { add = 1 FROM = { has_variable = ruling_party check_variable = { ruling_party = var_gov_index } } } modifier = { add = 1 FROM = { influence_higher_5 = yes } } modifier = { add = 1 FROM = { influence_higher_10 = yes } } modifier = { add = 1 FROM = { influence_higher_20 = yes } } modifier = { add = -1 check_variable = { FROM.europeanism < 0.90 } } modifier = { add = -1 check_variable = { FROM.europeanism < 0.80 } } FROM = { set_temp_variable = { party_index = PREV.var_gov_index } set_temp_variable = { party_popularity_increase = 0.05 } set_temp_variable = { temp_outlook_increase = 0.05 } change_relative_party_popularity = yes } for_each_scope_loop = { array = global.EU_member tooltip = TT_ALL_EU_MEMBER_NATIONS_GAIN news_event = EU_POTEF_news.5 } } 1 = { modifier = { factor = 0 FROM = { has_variable = ruling_party check_variable = { ruling_party = var_gov_index } } check_variable = { FROM.europeanism > 0.90 } FROM = { influence_higher_20 = yes } } modifier = { add = 5 FROM = { has_country_flag = POTEF_has_nominated } } for_each_scope_loop = { array = global.EU_member tooltip = TT_ALL_EU_MEMBER_NATIONS_GAIN news_event = EU_POTEF_news.6 } } } } } ai_will_do = { base = 1 } } } ########################### ########################### ### EU_defense_category ### ########################### ########################### EU_defense_category = { EU_POTEF_call_all_major_non_EU_ally = { available = { has_defensive_war = yes } visible = { has_global_flag = EDU is_faction_leader = yes } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision EU_POTEF_call_all_major_non_EU_ally" for_each_scope_loop = { array = global.non_EU_EDU_ally tooltip = TT_ALL_NON_EU_EDU_ALLY_NATIONS_GAIN ROOT = { add_to_faction = PREV } add_ai_strategy = { type = alliance id = ROOT value = 200 } } } ai_will_do = { base = 0 } } EU_POTEF_call_major_non_EU_ally = { allowed = { EU_is_potential = yes } target_root_trigger = { has_idea = EU_member has_global_flag = EDU is_faction_leader = yes } target_trigger = { FROM = { has_idea = EDU_major_non_EU_ally } } target_array = global.non_EU_EDU_ally cost = 100 available = { is_faction_leader = yes FROM = { influence_higher_5 = yes } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision EU_POTEF_call_major_non_EU_ally" ROOT = { add_to_faction = FROM } add_ai_strategy = { type = alliance id = ROOT value = 200 } } ai_will_do = { base = 1 } } }