calculate_expected_spending = { resolve_gdp_c_deltas = yes calculate_expected_spending_totals = yes calculate_expected_welfare_spending = yes calculate_expected_healthcare_spending = yes calculate_expected_education_spending = yes calculate_expected_police_spending = yes calculate_expected_adm_spending = yes calculate_expected_military_spending = yes md_check_spending_alerts = yes refresh_expected_spending_frames = yes update_protest_dirty_var = yes } refresh_expected_spending_frames = { if = { limit = { is_ai = no } calculate_expected_spending_frames = yes } } calculate_expected_spending_frames = { set_temp_variable = { current_spending = bureau_law } set_temp_variable = { expected_spending = expected_adm_spending } for_loop_effect = { start = 1 end = 6 value = spending_level calculate_expected_spending_frame = yes set_variable = { adm_spending_frames^spending_level = spending_frame } } set_temp_variable = { current_spending = police_law } set_temp_variable = { expected_spending = expected_police_spending } for_loop_effect = { start = 1 end = 6 value = spending_level calculate_expected_spending_frame = yes set_variable = { police_spending_frames^spending_level = spending_frame } } set_temp_variable = { current_spending = education_law } set_temp_variable = { expected_spending = expected_edu_spending } for_loop_effect = { start = 1 end = 6 value = spending_level calculate_expected_spending_frame = yes set_variable = { edu_spending_frames^spending_level = spending_frame } } set_temp_variable = { current_spending = health_law } set_temp_variable = { expected_spending = expected_health_spending } for_loop_effect = { start = 1 end = 7 value = spending_level calculate_expected_spending_frame = yes set_variable = { health_spending_frames^spending_level = spending_frame } } set_temp_variable = { current_spending = social_law } set_temp_variable = { expected_spending = expected_welfare_spending } for_loop_effect = { start = 1 end = 7 value = spending_level calculate_expected_spending_frame = yes set_variable = { welfare_spending_frames^spending_level = spending_frame } } set_temp_variable = { current_spending = military_law } set_temp_variable = { expected_spending = expected_military_sp } for_loop_effect = { start = 1 end = 11 value = spending_level calculate_expected_spending_frame = yes set_variable = { military_spending_frames^spending_level = spending_frame } } } calculate_expected_spending_frame = { if = { limit = { check_variable = { var = current_spending value = spending_level compare = greater_than_or_equals } check_variable = { spending_level > expected_spending } } set_temp_variable = { spending_frame = 3 } } else_if = { limit = { check_variable = { var = current_spending value = spending_level compare = greater_than_or_equals } } set_temp_variable = { spending_frame = 2 } } else_if = { limit = { check_variable = { var = expected_spending value = spending_level compare = greater_than_or_equals } } set_temp_variable = { spending_frame = 4 } } else = { set_temp_variable = { spending_frame = 1 } } } calculate_expected_spending_totals = { set_variable = { expected_welfare_spending = 0 } set_variable = { expected_health_spending = 0 } set_variable = { expected_edu_spending = 0 } set_variable = { expected_police_spending = 0 } set_variable = { expected_adm_spending = 0 } set_variable = { expected_military_sp = 0 } for_loop_effect = { end = party_pop_array^num value = v add_to_variable = { expected_welfare_spending = { value = global.expected_social_sp^v add = gdp_c_delta multiply = party_pop_array^v } } add_to_variable = { expected_health_spending = { value = global.expected_med_sp^v add = gdp_c_delta multiply = party_pop_array^v } } add_to_variable = { expected_edu_spending = { value = global.expected_ed_sp^v add = gdp_c_delta_lvl5 multiply = party_pop_array^v } } add_to_variable = { expected_police_spending = { value = global.expected_police_sp^v add = gdp_c_delta_lvl5 multiply = party_pop_array^v } } add_to_variable = { expected_adm_spending = { value = global.expected_adm_sp^v add = gdp_c_delta_lvl5 multiply = party_pop_array^v } } add_to_variable = { expected_military_sp = { value = global.expected_military_sp^v add = gdp_c_delta_mil multiply = party_pop_array^v } } } } calculate_expected_welfare_spending = { if = { limit = { THIS = { has_war = yes } } subtract_from_variable = { expected_welfare_spending = 1 } } add_to_variable = { expected_welfare_spending = modifier@expected_welfare_modifier } add_to_variable = { expected_welfare_spending = social_desire_offset } round_variable = expected_welfare_spending if = { limit = { is_debug = yes } log = "[GetDateText]: [THIS.GetName]: Expected welfare spending: [?THIS.expected_welfare_spending]" } clamp_variable = { var = expected_welfare_spending min = 1 max = 6 } } calculate_expected_healthcare_spending = { if = { limit = { THIS = { has_war = yes } } subtract_from_variable = { expected_health_spending = 1 } } add_to_variable = { expected_health_spending = modifier@expected_healthcare_modifier } add_to_variable = { expected_health_spending = health_desire_offset } round_variable = expected_health_spending if = { limit = { is_debug = yes } log = "[GetDateText]: [THIS.GetName]: Expected healthcare spending: [?THIS.expected_health_spending]" } clamp_variable = { var = expected_health_spending min = 1 max = 6 } } calculate_expected_education_spending = { if = { limit = { THIS = { has_war = yes } } subtract_from_variable = { expected_edu_spending = 1 } } add_to_variable = { expected_edu_spending = modifier@expected_education_modifier } add_to_variable = { expected_edu_spending = education_desire_offset } round_variable = expected_edu_spending if = { limit = { is_debug = yes } log = "[GetDateText]: [THIS.GetName]: Expected education spending: [?THIS.expected_edu_spending]" } clamp_variable = { var = expected_edu_spending min = 1 max = 5 } } calculate_expected_police_spending = { if = { limit = { THIS = { has_war = yes } } subtract_from_variable = { expected_police_spending = 1 } } add_to_variable = { expected_police_spending = modifier@expected_police_modifier } add_to_variable = { expected_police_spending = police_desire_offset } round_variable = expected_police_spending if = { limit = { is_debug = yes } log = "[GetDateText]: [THIS.GetName]: Expected police spending: [?THIS.expected_police_spending]" } clamp_variable = { var = expected_police_spending min = 1 max = 5 } } calculate_expected_adm_spending = { if = { limit = { THIS = { has_war = yes } } subtract_from_variable = { expected_adm_spending = 1 } } add_to_variable = { expected_adm_spending = modifier@expected_adm_modifier } add_to_variable = { expected_adm_spending = bureau_desire_offset } round_variable = expected_adm_spending if = { limit = { is_debug = yes } log = "[GetDateText]: [THIS.GetName]: Expected administrative spending: [?THIS.expected_adm_spending]" } clamp_variable = { var = expected_adm_spending min = 1 max = 5 } } calculate_expected_military_spending = { if = { limit = { THIS = { has_war = yes } } add_to_variable = { expected_military_sp = 3 } } add_to_variable = { expected_military_sp = modifier@expected_mil_modifier } add_security_pressure_to_expected_military = yes add_to_variable = { expected_military_sp = defence_desire_offset } round_variable = expected_military_sp if = { limit = { OR = { THIS = { has_idea = non_power } THIS = { has_idea = no_military } } } set_variable = { expected_military_sp = 1 } } if = { limit = { is_debug = yes } log = "[GetDateText]: [THIS.GetName]: Expected military spending: [?THIS.expected_military_sp]" } if = { limit = { THIS = { has_war = no } } clamp_variable = { var = expected_military_sp min = 1 max = 5 } } else = { clamp_variable = { var = expected_military_sp min = 1 max = 8 } } } # Read off the engine-maintained hostility arrays, so it lapses on its own once they empty. add_security_pressure_to_expected_military = { if = { limit = { NOT = { OR = { has_idea = no_military ai_has_major_economic_problems = yes ai_has_moderate_economic_problems = yes } } } if = { limit = { OR = { has_idea = intervention_neo_imperialism has_idea = intervention_global_interventionism } } add_to_variable = { expected_military_sp = 2 } } if = { limit = { check_variable = { potential_and_current_enemies^num > 0 } } add_to_variable = { expected_military_sp = 1 } } if = { limit = { check_variable = { potential_and_current_enemies^num > 2 } } add_to_variable = { expected_military_sp = 1 } } if = { limit = { we_are_being_justified_against_or_wargoal_against_us = yes } add_to_variable = { expected_military_sp = 1 } } if = { limit = { threat > 0.35 } add_to_variable = { expected_military_sp = 1 } } if = { limit = { OR = { threat > 0.6 any_neighbor_country = { has_war = yes } } } add_to_variable = { expected_military_sp = 1 } } if = { limit = { manpower_per_military_factory < 450 } add_to_variable = { expected_military_sp = 1 } } } } resolve_gdp_c_deltas = { if = { limit = { check_variable = { gdp_per_capita < 1 } } set_temp_variable = { gdp_c_tier = 0 } } else_if = { limit = { check_variable = { gdp_per_capita < 2.5 } } set_temp_variable = { gdp_c_tier = 1 } } else_if = { limit = { check_variable = { gdp_per_capita < 5 } } set_temp_variable = { gdp_c_tier = 2 } } else_if = { limit = { check_variable = { gdp_per_capita < 10 } } set_temp_variable = { gdp_c_tier = 3 } } else_if = { limit = { check_variable = { gdp_per_capita < 15 } } set_temp_variable = { gdp_c_tier = 4 } } else_if = { limit = { check_variable = { gdp_per_capita < 20 } } set_temp_variable = { gdp_c_tier = 5 } } else_if = { limit = { check_variable = { gdp_per_capita < 30 } } set_temp_variable = { gdp_c_tier = 6 } } else_if = { limit = { check_variable = { gdp_per_capita < 40 } } set_temp_variable = { gdp_c_tier = 7 } } else = { set_temp_variable = { gdp_c_tier = 8 } } set_temp_variable = { gdp_c_delta = global.gdp_c_delta_table^gdp_c_tier } set_temp_variable = { gdp_c_delta_lvl5 = global.gdp_c_delta_lvl5_table^gdp_c_tier } set_temp_variable = { gdp_c_delta_mil = global.gdp_c_delta_mil_table^gdp_c_tier } # Economy size only offsets a poverty penalty, so the clamp stops it adding to wealth. if = { limit = { check_variable = { gdp_c_tier < 5 } } resolve_gdp_scale_delta = yes add_to_temp_variable = { gdp_c_delta = gdp_scale_delta } add_to_temp_variable = { gdp_c_delta_lvl5 = gdp_scale_delta } add_to_temp_variable = { gdp_c_delta_mil = gdp_scale_delta } clamp_temp_variable = { var = gdp_c_delta max = 0 } clamp_temp_variable = { var = gdp_c_delta_lvl5 max = 0 } clamp_temp_variable = { var = gdp_c_delta_mil max = 0 } } } resolve_gdp_scale_delta = { if = { limit = { check_variable = { gdp_total < 10 } } set_temp_variable = { gdp_scale_delta = -0.2 } } else_if = { limit = { check_variable = { gdp_total < 50 } } set_temp_variable = { gdp_scale_delta = 0 } } else_if = { limit = { check_variable = { gdp_total < 150 } } set_temp_variable = { gdp_scale_delta = 0.1 } } else_if = { limit = { check_variable = { gdp_total < 500 } } set_temp_variable = { gdp_scale_delta = 0.2 } } else_if = { limit = { check_variable = { gdp_total < 1500 } } set_temp_variable = { gdp_scale_delta = 0.3 } } else = { set_temp_variable = { gdp_scale_delta = 0.4 } } } setup_initial_expected_spending_by_party = { if = { limit = { is_debug = yes } log = "[GetDateText]: Setup for expected spending started" } clear_array = global.gdp_c_delta_table add_to_array = { global.gdp_c_delta_table = -1.5 } add_to_array = { global.gdp_c_delta_table = -1.2 } add_to_array = { global.gdp_c_delta_table = -0.9 } add_to_array = { global.gdp_c_delta_table = -0.6 } add_to_array = { global.gdp_c_delta_table = -0.3 } add_to_array = { global.gdp_c_delta_table = -0.1 } add_to_array = { global.gdp_c_delta_table = 0.4 } add_to_array = { global.gdp_c_delta_table = 0.9 } add_to_array = { global.gdp_c_delta_table = 1.4 } clear_array = global.gdp_c_delta_lvl5_table add_to_array = { global.gdp_c_delta_lvl5_table = -1.3 } add_to_array = { global.gdp_c_delta_lvl5_table = -1 } add_to_array = { global.gdp_c_delta_lvl5_table = -0.8 } add_to_array = { global.gdp_c_delta_lvl5_table = -0.5 } add_to_array = { global.gdp_c_delta_lvl5_table = -0.2 } add_to_array = { global.gdp_c_delta_lvl5_table = 0.1 } add_to_array = { global.gdp_c_delta_lvl5_table = 0.4 } add_to_array = { global.gdp_c_delta_lvl5_table = 0.8 } add_to_array = { global.gdp_c_delta_lvl5_table = 1.2 } clear_array = global.gdp_c_delta_mil_table add_to_array = { global.gdp_c_delta_mil_table = -1.3 } add_to_array = { global.gdp_c_delta_mil_table = -1 } add_to_array = { global.gdp_c_delta_mil_table = -0.8 } add_to_array = { global.gdp_c_delta_mil_table = -0.5 } add_to_array = { global.gdp_c_delta_mil_table = -0.3 } add_to_array = { global.gdp_c_delta_mil_table = 0 } add_to_array = { global.gdp_c_delta_mil_table = 0.2 } add_to_array = { global.gdp_c_delta_mil_table = 0.6 } add_to_array = { global.gdp_c_delta_mil_table = 1 } add_to_array = { global.expected_adm_sp = 2.5 } add_to_array = { global.expected_adm_sp = 2.5 } add_to_array = { global.expected_adm_sp = 1.5 } add_to_array = { global.expected_adm_sp = 2 } add_to_array = { global.expected_adm_sp = 3 } add_to_array = { global.expected_adm_sp = 1 } add_to_array = { global.expected_adm_sp = 2 } add_to_array = { global.expected_adm_sp = 3 } add_to_array = { global.expected_adm_sp = 2 } add_to_array = { global.expected_adm_sp = 3.5 } add_to_array = { global.expected_adm_sp = 2 } add_to_array = { global.expected_adm_sp = 2 } add_to_array = { global.expected_adm_sp = 1.5 } add_to_array = { global.expected_adm_sp = 3.5 } add_to_array = { global.expected_adm_sp = 2 } add_to_array = { global.expected_adm_sp = 3 } add_to_array = { global.expected_adm_sp = 1.5 } add_to_array = { global.expected_adm_sp = 2.5 } add_to_array = { global.expected_adm_sp = 2.5 } add_to_array = { global.expected_adm_sp = 3 } add_to_array = { global.expected_adm_sp = 1.5 } add_to_array = { global.expected_adm_sp = 2.5 } add_to_array = { global.expected_adm_sp = 2.5 } add_to_array = { global.expected_adm_sp = 3 } add_to_array = { global.expected_police_sp = 3.5 } add_to_array = { global.expected_police_sp = 3.5 } add_to_array = { global.expected_police_sp = 2 } add_to_array = { global.expected_police_sp = 1 } add_to_array = { global.expected_police_sp = 2.5 } add_to_array = { global.expected_police_sp = 2 } add_to_array = { global.expected_police_sp = 3 } add_to_array = { global.expected_police_sp = 4 } add_to_array = { global.expected_police_sp = 3 } add_to_array = { global.expected_police_sp = 3 } add_to_array = { global.expected_police_sp = 4 } add_to_array = { global.expected_police_sp = 4 } add_to_array = { global.expected_police_sp = 3 } add_to_array = { global.expected_police_sp = 3.5 } add_to_array = { global.expected_police_sp = 3 } add_to_array = { global.expected_police_sp = 3 } add_to_array = { global.expected_police_sp = 2 } add_to_array = { global.expected_police_sp = 1.5 } add_to_array = { global.expected_police_sp = 1.5 } add_to_array = { global.expected_police_sp = 2.5 } add_to_array = { global.expected_police_sp = 4 } add_to_array = { global.expected_police_sp = 3.5 } add_to_array = { global.expected_police_sp = 3 } add_to_array = { global.expected_police_sp = 3 } add_to_array = { global.expected_ed_sp = 2 } add_to_array = { global.expected_ed_sp = 2 } add_to_array = { global.expected_ed_sp = 4 } add_to_array = { global.expected_ed_sp = 3 } add_to_array = { global.expected_ed_sp = 2 } add_to_array = { global.expected_ed_sp = 4 } add_to_array = { global.expected_ed_sp = 2 } add_to_array = { global.expected_ed_sp = 2 } add_to_array = { global.expected_ed_sp = 2 } add_to_array = { global.expected_ed_sp = 2 } add_to_array = { global.expected_ed_sp = 2 } add_to_array = { global.expected_ed_sp = 1.5 } add_to_array = { global.expected_ed_sp = 2.5 } add_to_array = { global.expected_ed_sp = 2 } add_to_array = { global.expected_ed_sp = 2 } add_to_array = { global.expected_ed_sp = 2.5 } add_to_array = { global.expected_ed_sp = 3.5 } add_to_array = { global.expected_ed_sp = 4 } add_to_array = { global.expected_ed_sp = 3 } add_to_array = { global.expected_ed_sp = 2 } add_to_array = { global.expected_ed_sp = 1.5 } add_to_array = { global.expected_ed_sp = 1.5 } add_to_array = { global.expected_ed_sp = 2 } add_to_array = { global.expected_ed_sp = 2 } add_to_array = { global.expected_med_sp = 2 } add_to_array = { global.expected_med_sp = 1.5 } add_to_array = { global.expected_med_sp = 2.5 } add_to_array = { global.expected_med_sp = 3 } add_to_array = { global.expected_med_sp = 3 } add_to_array = { global.expected_med_sp = 3 } add_to_array = { global.expected_med_sp = 2 } add_to_array = { global.expected_med_sp = 1.5 } add_to_array = { global.expected_med_sp = 2 } add_to_array = { global.expected_med_sp = 2 } add_to_array = { global.expected_med_sp = 2 } add_to_array = { global.expected_med_sp = 1.5 } add_to_array = { global.expected_med_sp = 2.5 } add_to_array = { global.expected_med_sp = 2 } add_to_array = { global.expected_med_sp = 2 } add_to_array = { global.expected_med_sp = 2 } add_to_array = { global.expected_med_sp = 3 } add_to_array = { global.expected_med_sp = 2.5 } add_to_array = { global.expected_med_sp = 3 } add_to_array = { global.expected_med_sp = 2.5 } add_to_array = { global.expected_med_sp = 2 } add_to_array = { global.expected_med_sp = 1.5 } add_to_array = { global.expected_med_sp = 2 } add_to_array = { global.expected_med_sp = 2 } add_to_array = { global.expected_social_sp = 2 } add_to_array = { global.expected_social_sp = 2 } add_to_array = { global.expected_social_sp = 2 } add_to_array = { global.expected_social_sp = 3 } add_to_array = { global.expected_social_sp = 3 } add_to_array = { global.expected_social_sp = 3 } add_to_array = { global.expected_social_sp = 2.5 } add_to_array = { global.expected_social_sp = 1.5 } add_to_array = { global.expected_social_sp = 2.5 } add_to_array = { global.expected_social_sp = 2 } add_to_array = { global.expected_social_sp = 2 } add_to_array = { global.expected_social_sp = 1.5 } add_to_array = { global.expected_social_sp = 3 } add_to_array = { global.expected_social_sp = 2 } add_to_array = { global.expected_social_sp = 2.5 } add_to_array = { global.expected_social_sp = 2 } add_to_array = { global.expected_social_sp = 3 } add_to_array = { global.expected_social_sp = 2.5 } add_to_array = { global.expected_social_sp = 3 } add_to_array = { global.expected_social_sp = 2.5 } add_to_array = { global.expected_social_sp = 2 } add_to_array = { global.expected_social_sp = 1.5 } add_to_array = { global.expected_social_sp = 2 } add_to_array = { global.expected_social_sp = 2 } add_to_array = { global.expected_military_sp = 2 } add_to_array = { global.expected_military_sp = 2.5 } add_to_array = { global.expected_military_sp = 2 } add_to_array = { global.expected_military_sp = 2 } add_to_array = { global.expected_military_sp = 1.5 } add_to_array = { global.expected_military_sp = 1 } add_to_array = { global.expected_military_sp = 2.5 } add_to_array = { global.expected_military_sp = 3 } add_to_array = { global.expected_military_sp = 2.5 } add_to_array = { global.expected_military_sp = 2 } add_to_array = { global.expected_military_sp = 3 } add_to_array = { global.expected_military_sp = 4 } add_to_array = { global.expected_military_sp = 2.5 } add_to_array = { global.expected_military_sp = 2 } add_to_array = { global.expected_military_sp = 2.5 } add_to_array = { global.expected_military_sp = 2.5 } add_to_array = { global.expected_military_sp = 1.5 } add_to_array = { global.expected_military_sp = 2 } add_to_array = { global.expected_military_sp = 2 } add_to_array = { global.expected_military_sp = 2.5 } add_to_array = { global.expected_military_sp = 4 } add_to_array = { global.expected_military_sp = 4 } add_to_array = { global.expected_military_sp = 3.5 } add_to_array = { global.expected_military_sp = 2 } if = { limit = { is_debug = yes } log = "[GetDateText]: Setup for expected spending finished" } } give_in_to_protestors_effect = { set_temp_variable = { pp_loss = 0 } if = { limit = { check_variable = { expected_adm_spending > bureau_law } } set_temp_variable = { buf = expected_adm_spending } subtract_from_temp_variable = { buf = bureau_law } set_temp_variable = { diff = buf } multiply_temp_variable = { buf = 50 } add_to_temp_variable = { pp_loss = buf } if = { limit = { check_variable = { diff = 1 } } increase_centralization = yes } else_if = { limit = { check_variable = { diff = 2 } } increase_centralization_2 = yes } else_if = { limit = { check_variable = { diff = 3 } } increase_centralization_3 = yes } else = { increase_centralization_4 = yes } block_bureau_decrease = yes } if = { limit = { check_variable = { expected_police_spending > police_law } } set_temp_variable = { buf = expected_police_spending } subtract_from_temp_variable = { buf = police_law } set_temp_variable = { diff = buf } multiply_temp_variable = { buf = 50 } add_to_temp_variable = { pp_loss = buf } if = { limit = { check_variable = { diff = 1 } } increase_policing_budget = yes } else_if = { limit = { check_variable = { diff = 2 } } increase_policing_budget_2 = yes } else_if = { limit = { check_variable = { diff = 3 } } increase_policing_budget_3 = yes } else = { increase_policing_budget_4 = yes } block_police_decrease = yes } if = { limit = { check_variable = { expected_edu_spending > education_law } } set_temp_variable = { buf = expected_edu_spending } subtract_from_temp_variable = { buf = education_law } set_temp_variable = { diff = buf } multiply_temp_variable = { buf = 50 } add_to_temp_variable = { pp_loss = buf } if = { limit = { check_variable = { diff = 1 } } increase_education_budget = yes } else_if = { limit = { check_variable = { diff = 2 } } increase_education_budget_2 = yes } else_if = { limit = { check_variable = { diff = 3 } } increase_education_budget_3 = yes } else = { increase_education_budget_4 = yes } block_edu_decrease = yes } if = { limit = { check_variable = { expected_health_spending > health_law } } set_temp_variable = { buf = expected_health_spending } subtract_from_temp_variable = { buf = health_law } set_temp_variable = { diff = buf } multiply_temp_variable = { buf = 50 } add_to_temp_variable = { pp_loss = buf } if = { limit = { check_variable = { diff = 1 } } increase_healthcare_budget = yes } else_if = { limit = { check_variable = { diff = 2 } } increase_healthcare_budget_2 = yes } else_if = { limit = { check_variable = { diff = 3 } } increase_healthcare_budget_3 = yes } else = { increase_healthcare_budget_4 = yes } block_health_decrease = yes } if = { limit = { check_variable = { expected_welfare_spending > social_law } } set_temp_variable = { buf = expected_welfare_spending } subtract_from_temp_variable = { buf = social_law } set_temp_variable = { diff = buf } multiply_temp_variable = { buf = 50 } add_to_temp_variable = { pp_loss = buf } if = { limit = { check_variable = { diff = 1 } } increase_social_spending = yes } else_if = { limit = { check_variable = { diff = 2 } } increase_social_spending_2 = yes } else_if = { limit = { check_variable = { diff = 3 } } increase_social_spending_3 = yes } else = { increase_social_spending_4 = yes } block_social_decrease = yes } if = { limit = { check_variable = { expected_military_sp > military_law } } set_temp_variable = { buf = expected_military_sp } subtract_from_temp_variable = { buf = military_law } set_temp_variable = { diff = buf } multiply_temp_variable = { buf = 50 } add_to_temp_variable = { pp_loss = buf } # im tired for_loop_effect = { end = diff value = v increase_military_spending = yes } block_defence_decrease = yes } set_temp_variable = { party_popularity_increase = -0.05 } set_temp_variable = { temp_outlook_increase = -0.05 } change_relative_party_popularity = yes multiply_temp_variable = { pp_loss = -1 } add_political_power = pp_loss set_variable = { protest_strength = 0 } set_variable = { protest_radicalisation = 0 } if = { limit = { fuel_ratio < 0.1 } medium_expenditure = yes set_fuel_ratio = 0.7 } # AI helper to not overspend if = { limit = { is_ai = yes } if = { limit = { check_variable = { expected_adm_spending < bureau_law } } decrease_centralization = yes } if = { limit = { check_variable = { expected_police_spending < police_law } } decrease_policing_budget = yes } if = { limit = { check_variable = { expected_edu_spending < education_law } } decrease_education_budget = yes } if = { limit = { check_variable = { expected_health_spending < health_law } } decrease_healthcare_budget = yes } if = { limit = { check_variable = { expected_welfare_spending < social_law } } decrease_social_spending = yes } if = { limit = { check_variable = { expected_military_sp < military_law } } decrease_military_spending = yes } } }