MD_protests_forming = { MD_incoming_protest_movement = { activation = { always = no } available = { hidden_trigger = { NOT = { has_country_flag = disabled_protests_system } } if = { limit = { OR = { hidden_trigger = { check_variable = { government_coalition_strength < 0.3 } } interest_rate_higher_than_8 = yes has_idea = stagnation has_idea = recession has_idea = depression has_idea = corruption_level_10 has_idea = corruption_level_09 has_idea = corruption_level_08 has_idea = corruption_level_07 has_idea = corruption_level_06 has_idea = corruption_level_05 } } MD_has_fixed_econ = yes } if = { limit = { OR = { has_elections = no AND = { hidden_trigger = { check_variable = { months_at_war > 36 } } has_war_support < 0.30 } hidden_trigger = { check_variable = { government_coalition_strength < 0.3 } } has_idea = corruption_level_10 has_idea = corruption_level_09 has_idea = corruption_level_08 has_idea = corruption_level_07 has_idea = corruption_level_06 has_idea = corruption_level_05 } } MD_has_fixed_political = yes } } days_mission_timeout = 180 is_good = no complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision timeout MD_incoming_protest_movement" add_stability = 0.02 } timeout_effect = { log = "[GetDateText]: [Root.GetName]: Decision timeout MD_incoming_protest_movement" if = { limit = { NOT = { has_country_flag = MD_protest_cooldown } NOT = { tag = ZOM } NOT = { tag = ALN } NOT = { has_war_with = ZOM } NOT = { has_war_with = ALN } } if = { limit = { any_owned_state = { is_capital = no is_core_of = ROOT is_controlled_by = ROOT has_resistance = no } } set_country_flag = MD_protest_revolt_pending country_event = protests.100 } else = { hidden_effect = { MD_cleanup_protest_revolt = yes } country_event = protests.103 } } } } MD_incoming_revolt = { activation = { always = no } available = { custom_trigger_tooltip = { tooltip = MD_incoming_revolt_available_tt NOT = { any_owned_state = { is_capital = no is_core_of = ROOT is_controlled_by = ROOT has_state_flag = MD_protests_active@ROOT has_resistance = yes OR = { compliance < 50 resistance > 39 } } } } } days_mission_timeout = 850 is_good = no complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision complete MD_incoming_revolt" hidden_effect = { remove_mission = MD_zero_strength_recovery MD_cleanup_protest_revolt = yes } country_event = protests.103 } timeout_effect = { log = "[GetDateText]: [Root.GetName]: Decision timeout MD_incoming_revolt" MD_resolve_pacified_protest_states = yes if = { limit = { OR = { check_variable = { protest_strength < 1 } NOT = { any_owned_state = { is_capital = no is_core_of = ROOT is_controlled_by = ROOT has_state_flag = MD_protests_active@ROOT has_resistance = yes } } } } hidden_effect = { remove_mission = MD_zero_strength_recovery MD_cleanup_protest_revolt = yes } country_event = protests.103 } else = { hidden_effect = { remove_mission = MD_zero_strength_recovery MD_calculate_protest_civil_war_size = yes MD_cleanup_protest_revolt = yes } MD_start_scaled_protest_civil_war = yes } } } MD_zero_strength_recovery = { activation = { has_active_mission = MD_incoming_revolt check_variable = { protest_strength < 1 } } available = { always = no } cancel_trigger = { OR = { NOT = { has_active_mission = MD_incoming_revolt } check_variable = { protest_strength > 0 } } } days_mission_timeout = 60 is_good = yes timeout_effect = { log = "[GetDateText]: [Root.GetName]: Decision timeout MD_zero_strength_recovery" hidden_effect = { remove_mission = MD_incoming_revolt MD_cleanup_protest_revolt = yes } country_event = protests.103 } } # Decisions MD_appease_protesters = { days_re_enable = 700 cost = 100 visible = { OR = { has_active_mission = MD_incoming_protest_movement has_active_mission = MD_incoming_revolt } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision MD_appease_protesters" if = { limit = { has_active_mission = MD_incoming_protest_movement } custom_effect_tooltip = MD_appease_warning_timer_tt add_days_mission_timeout = { mission = MD_incoming_protest_movement days = 60 } } if = { limit = { has_active_mission = MD_incoming_revolt } custom_effect_tooltip = MD_appease_revolt_timer_tt add_days_mission_timeout = { mission = MD_incoming_revolt days = 280 } } } ai_will_do = { base = 20 } } MD_preemptive_reform = { days_re_enable = 365 cost = 75 visible = { has_active_mission = MD_incoming_protest_movement } available = { custom_trigger_tooltip = { tooltip = MD_preemptive_reform_available_tt check_variable = { protest_strength > 30 } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision MD_preemptive_reform" custom_effect_tooltip = MD_preemptive_reform_strength_tt subtract_from_variable = { protest_strength = 20 } clamp_variable = { var = protest_strength min = 0 max = 100 } add_stability = 0.02 } ai_will_do = { base = 10 } } MD_hearts_and_minds_campaign = { days_remove = 60 days_re_enable = 30 visible = { has_active_mission = MD_incoming_revolt } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision MD_hearts_and_minds_campaign" add_stability = 0.01 random_owned_controlled_state = { limit = { is_capital = no is_core_of = ROOT has_state_flag = MD_protests_active@ROOT has_resistance = yes } add_compliance = 10 add_resistance = -10 } } modifier = { political_power_factor = -0.25 conscription_factor = 0.05 compliance_growth = 0.15 } ai_will_do = { base = 10 } } MD_extended_crackdown = { days_remove = 60 days_re_enable = 30 visible = { has_active_mission = MD_incoming_revolt } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision MD_extended_crackdown" add_stability = 0.01 } modifier = { political_power_factor = -0.25 resistance_damage_to_garrison = -0.50 resistance_growth = -0.25 } ai_will_do = { base = 10 } } MD_activate_riot_police = { days_remove = 30 visible = { has_active_mission = MD_incoming_revolt NOT = { has_idea = protests_garrison_damage } } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision MD_activate_riot_police" add_ideas = protests_garrison_damage } ai_will_do = { base = 10 } } MD_deactivate_riot_police = { days_remove = 30 visible = { has_active_mission = MD_incoming_revolt has_idea = protests_garrison_damage } remove_effect = { log = "[GetDateText]: [Root.GetName]: Decision MD_deactivate_riot_police" remove_ideas = protests_garrison_damage } ai_will_do = { base = 10 } } MD_emergency_police_funding = { days_re_enable = 350 cost = 50 visible = { OR = { has_active_mission = MD_incoming_protest_movement has_active_mission = MD_incoming_revolt } NOT = { has_country_flag = MD_police_funding_active } } available = { treasury_higher_than_2 = yes } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision MD_emergency_police_funding" custom_effect_tooltip = MD_promise_police_start_tt custom_effect_tooltip = MD_promise_police_reward_tt set_temp_variable = { treasury_change = -2 } modify_treasury_effect = yes set_country_flag = MD_police_funding_active set_variable = { MD_police_target_strength = protest_strength } subtract_from_variable = { MD_police_target_strength = 10 } clamp_variable = { var = MD_police_target_strength min = 0 } add_timed_idea = { idea = MD_emergency_police_funding_idea days = 200 } activate_mission = MD_police_funding_mission } ai_will_do = { base = 8 modifier = { factor = 0 check_variable = { treasury < 4 } } modifier = { factor = 0 OR = { has_country_flag = MD_tax_relief_active has_country_flag = MD_jobs_program_active } } } } MD_police_funding_mission = { activation = { always = no } is_good = yes days_mission_timeout = 200 available = { custom_trigger_tooltip = { tooltip = MD_police_funding_mission_available_tt check_variable = { protest_strength < MD_police_target_strength } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Mission MD_police_funding_mission completed" if = { limit = { has_active_mission = MD_incoming_revolt } add_days_mission_timeout = { mission = MD_incoming_revolt days = 75 } } if = { limit = { has_active_mission = MD_incoming_protest_movement } add_days_mission_timeout = { mission = MD_incoming_protest_movement days = 40 } } subtract_from_variable = { protest_radicalisation = 1 } clamp_variable = { var = protest_radicalisation min = 0 max = 10 } add_stability = 0.02 clr_country_flag = MD_police_funding_active } timeout_effect = { log = "[GetDateText]: [Root.GetName]: Mission MD_police_funding_mission timed out" add_to_variable = { protest_strength = 3 } clamp_variable = { var = protest_strength min = 0 max = 100 } clr_country_flag = MD_police_funding_active } } MD_tax_relief_promise = { days_re_enable = 500 cost = 75 visible = { OR = { has_active_mission = MD_incoming_protest_movement has_active_mission = MD_incoming_revolt } NOT = { has_country_flag = MD_tax_relief_active } } available = { treasury_higher_than_3 = yes } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision MD_tax_relief_promise" custom_effect_tooltip = MD_promise_tax_start_tt custom_effect_tooltip = MD_promise_tax_reward_tt set_temp_variable = { treasury_change = -3 } modify_treasury_effect = yes set_country_flag = MD_tax_relief_active set_variable = { MD_tax_relief_target_stability = stability } add_to_variable = { MD_tax_relief_target_stability = 0.05 } clamp_variable = { var = MD_tax_relief_target_stability min = 0 max = 1 } add_timed_idea = { idea = MD_tax_relief_promise_idea days = 300 } activate_mission = MD_tax_relief_mission } ai_will_do = { base = 8 modifier = { factor = 0 check_variable = { treasury < 5 } } modifier = { factor = 0 OR = { has_country_flag = MD_police_funding_active has_country_flag = MD_jobs_program_active } } } } MD_tax_relief_mission = { activation = { always = no } is_good = yes days_mission_timeout = 300 available = { custom_trigger_tooltip = { tooltip = MD_tax_relief_mission_available_tt check_variable = { stability > MD_tax_relief_target_stability } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Mission MD_tax_relief_mission completed" if = { limit = { has_active_mission = MD_incoming_revolt } add_days_mission_timeout = { mission = MD_incoming_revolt days = 100 } } if = { limit = { has_active_mission = MD_incoming_protest_movement } add_days_mission_timeout = { mission = MD_incoming_protest_movement days = 50 } } subtract_from_variable = { protest_strength = 10 } clamp_variable = { var = protest_strength min = 0 max = 100 } subtract_from_variable = { protest_radicalisation = 1 } clamp_variable = { var = protest_radicalisation min = 0 max = 10 } add_to_variable = { government_coalition_strength = 0.03 } clamp_variable = { var = government_coalition_strength min = 0 max = 1 } clr_country_flag = MD_tax_relief_active } timeout_effect = { log = "[GetDateText]: [Root.GetName]: Mission MD_tax_relief_mission timed out" add_to_variable = { protest_strength = 5 } clamp_variable = { var = protest_strength min = 0 max = 100 } clr_country_flag = MD_tax_relief_active } } MD_jobs_for_unemployed = { days_re_enable = 500 cost = 75 visible = { OR = { has_active_mission = MD_incoming_protest_movement has_active_mission = MD_incoming_revolt } NOT = { has_country_flag = MD_jobs_program_active } } available = { treasury_higher_than_3 = yes } complete_effect = { log = "[GetDateText]: [Root.GetName]: Decision MD_jobs_for_unemployed" custom_effect_tooltip = MD_promise_jobs_start_tt custom_effect_tooltip = MD_promise_jobs_reward_tt set_temp_variable = { treasury_change = -3 } modify_treasury_effect = yes set_country_flag = MD_jobs_program_active set_variable = { MD_jobs_target_unemployment = total_unemployed_percentage_display } subtract_from_variable = { MD_jobs_target_unemployment = 0.015 } clamp_variable = { var = MD_jobs_target_unemployment min = 0 } add_timed_idea = { idea = MD_jobs_for_unemployed_idea days = 350 } activate_mission = MD_jobs_program_mission } ai_will_do = { base = 8 modifier = { factor = 0 check_variable = { treasury < 5 } } modifier = { factor = 0 OR = { has_country_flag = MD_police_funding_active has_country_flag = MD_tax_relief_active } } } } MD_jobs_program_mission = { activation = { always = no } is_good = yes days_mission_timeout = 350 available = { custom_trigger_tooltip = { tooltip = MD_jobs_program_mission_available_tt check_variable = { total_unemployed_percentage_display < MD_jobs_target_unemployment } } } complete_effect = { log = "[GetDateText]: [Root.GetName]: Mission MD_jobs_program_mission completed" if = { limit = { has_active_mission = MD_incoming_revolt } add_days_mission_timeout = { mission = MD_incoming_revolt days = 120 } } if = { limit = { has_active_mission = MD_incoming_protest_movement } add_days_mission_timeout = { mission = MD_incoming_protest_movement days = 60 } } subtract_from_variable = { protest_strength = 10 } clamp_variable = { var = protest_strength min = 0 max = 100 } subtract_from_variable = { protest_radicalisation = 1 } clamp_variable = { var = protest_radicalisation min = 0 max = 10 } add_stability = 0.05 clr_country_flag = MD_jobs_program_active } timeout_effect = { log = "[GetDateText]: [Root.GetName]: Mission MD_jobs_program_mission timed out" add_to_variable = { protest_strength = 5 } clamp_variable = { var = protest_strength min = 0 max = 100 } clr_country_flag = MD_jobs_program_active } } }