on_actions = { on_daily_ITA = { effect = { if = { limit = { has_country_leader_with_trait = western_technocrat check_variable = { party_pop_array^0 > 0 } } set_variable = { party_pop_array^0 = 0 } recalculate_party = yes } if = { limit = { has_dynamic_modifier = { modifier = ITA_party_propaganda_modifier } } set_variable = { party_propaganda_sub_var = { value = fascism_propaganda_var add = communism_propaganda_var add = democratic_propaganda_var add = neutrality_propaganda_var add = nationalist_propaganda_var multiply = 0.01 } } if = { limit = { has_variable = ruling_party } add_to_variable = { party_pop_array^ruling_party = party_propaganda_sub_var } } } if = { limit = { has_dynamic_modifier = { modifier = ITA_party_popularity_drift_modifier } } reform_expectance_from_situation = yes add_to_variable = { ruling_subparty_drift_store = drift_switch_var_base } } if = { limit = { has_idea = ITA_mafia } clamp_variable = { var = cosa_nostra_strength min = 0 max = 1 } clamp_variable = { var = camorra_strength min = 0 max = 1 } clamp_variable = { var = ndrangheta_strength min = 0 max = 1 } clamp_variable = { var = sacra_corona_unita_strength min = 0 max = 1 } update_mafia_strength = yes add_to_variable = { lega_weekly_drift_store = mafia_strength_lega_drift_var } } } } on_weekly_ITA = { effect = { prevent_parties_disappearing = yes if = { limit = { has_dynamic_modifier = { modifier = ITA_party_popularity_drift_modifier } } ruling_subparty_drift_effect = yes set_variable = { ruling_subparty_drift_store = 0 } } if = { limit = { has_idea = ITA_radio_radicale } set_temp_variable = { radicali_weekly_drift = party_popularity@neutrality } multiply_temp_variable = { radicali_weekly_drift = 0.005 } add_to_variable = { party_pop_array^16 = radicali_weekly_drift } } if = { limit = { has_idea = ITA_underdeveloped_south_1 } set_temp_variable = { lega_weekly_drift = party_popularity@neutrality } multiply_temp_variable = { lega_weekly_drift = 0.02 } add_to_variable = { party_pop_array^14 = lega_weekly_drift } } if = { limit = { has_idea = ITA_underdeveloped_south_2 } set_temp_variable = { lega_weekly_drift = party_popularity@neutrality } multiply_temp_variable = { lega_weekly_drift = 0.01 } add_to_variable = { party_pop_array^14 = lega_weekly_drift } } recalculate_party = yes if = { #infiltrations_var increase state construction time limit = { has_idea = ITA_mafia } update_police_effectiveness = yes mafia_event_counters = yes pizzo_decisions_effect = yes multiply_variable = { lega_weekly_drift_store = party_popularity@neutrality } multiply_variable = { lega_weekly_drift_store = 0.035 } #halved for balanced add_to_variable = { party_pop_array^14 = lega_weekly_drift_store } set_variable = { lega_weekly_drift_store = 0 } 83 = { set_variable = { cosa_nostra_infiltrations_var = ROOT.cosa_nostra_strength } multiply_variable = { cosa_nostra_infiltrations_var = -1 } } 82 = { set_variable = { camorra_infiltrations_var = ROOT.camorra_strength } multiply_variable = { camorra_infiltrations_var = -1 } } 956 = { set_variable = { ndrangheta_infiltrations_var = ROOT.ndrangheta_strength } multiply_variable = { ndrangheta_infiltrations_var = -1 } } 957 = { set_variable = { sacra_corona_unita_infiltrations_var = ROOT.sacra_corona_unita_strength } multiply_variable = { sacra_corona_unita_infiltrations_var = -1 } } if = { limit = { has_idea = ITA_war_with_Mafia check_variable = { mafia_strength < 0.1 } } add_to_variable = { mafia_defeat_counter = 1 } } else_if = { limit = { check_variable = { mafia_defeat_counter > 0 } } add_to_variable = { mafia_defeat_counter = -1 } } if = { limit = { check_variable = { mafia_defeat_counter > 99 } } country_event = italy_md.32 clear_variable = mafia_defeat_counter } if = { limit = { has_idea = ITA_war_with_Mafia check_variable = { mafia_strength > 0.6 } } add_to_variable = { mafia_relapse_counter = 1 } } else_if = { limit = { check_variable = { mafia_relapse_counter > 0 } } add_to_variable = { mafia_relapse_counter = -1 } } if = { limit = { check_variable = { mafia_relapse_counter > 99 } } country_event = italy_md.71 clear_variable = mafia_relapse_counter } # Mafia Sabotages if = { limit = { NOT = { has_country_flag = ITA_mafia_sabotages_1 } has_country_flag = ITA_attacked_hideouts any_owned_state = { industrial_complex > 0 } any_owned_state = { infrastructure > 0 } } random = { chance = 50 country_event = { id = italy_md.28 days = 3 random_days = 3 } } } if = { limit = { NOT = { has_country_flag = ITA_mafia_sabotages_2 } has_country_flag = ITA_deployed_army_against_mafia any_owned_state = { arms_factory > 0 } any_owned_state = { industrial_complex > 0 } } random = { chance = 50 country_event = { id = italy_md.29 days = 3 random_days = 3 } } } } if = { limit = { OR = { AND = { has_completed_focus = ITA_dismantle_parliament OR = { has_completed_focus = ITA_repeal_former_government_measures_6 has_completed_focus = ITA_repeal_former_government_measures_7 has_completed_focus = ITA_repeal_former_government_measures_8 has_completed_focus = ITA_repeal_former_government_measures_9 } } NOT = { has_completed_focus = ITA_dismantle_parliament } } } small_parties_leave_coalition = yes } if = { limit = { NOT = { OR = { has_completed_focus = ITA_dismantle_parliament has_completed_focus = ITA_seize_power } } } ITA_calculate_civil_war_size = yes } weekly_stability_dynamic_modifier_update = yes if = { limit = { NOT = { has_country_flag = low_stability_protests_flag } } low_stability_protests_effect = yes else = { lsp_popularity_effect = yes } } } } on_monthly_ITA = { effect = { if = { limit = { has_dynamic_modifier = { modifier = ITA_ageing_population } } set_temp_variable = { ageing_population_drift = modifier@ITA_ageing_population_drift_modifier } multiply_temp_variable = { ageing_population_drift = 0.1 } add_to_variable = { ITA_ageing_population_var = ageing_population_drift } } if = { limit = { has_idea = ITA_euro_partners_debt_assurances } custom_effect_tooltip = { localization_key = modifies_dynamic_modifier_tt MODIFIER = ITA_multipurpose_modifier } add_to_variable = { ITA_interest_rate_multiplier_modifier_var = 0.1 tooltip = interest_rate_multiplier_modifier_tt } } #space stuff if = { limit = { has_completed_focus = ITA_increase_ASI_funding } multiply_variable = { ITA_space_income_var = 0.99 } #decay of space revenue add_to_variable = { ITA_peoples_support = -3 } #space enthusiasm decay over time if = { limit = { has_completed_focus = ITA_fight_scientific_illiteracy } add_to_variable = { ITA_peoples_support = 2 } } } if = { limit = { has_idea = ITA_mafia } mafia_monthly_drift = yes } if = { limit = { has_elections = yes NOT = { has_country_flag = elections_in_progress } } government_crisis_check = yes } if = { limit = { has_dynamic_modifier = { modifier = ITA_party_popularity_drift_modifier } } #monthly reform-expectancy update: M -= (S + k*M)/12, k = 0.4 mean-reversion (item 4a/4b) reform_expectance_from_situation = yes set_temp_variable = { ITA_re_monthly_delta = { value = reform_expectance_drift_display_var add = { value = drift_switch_var_base multiply = 0.4 } divide = 12 } } subtract_from_variable = { drift_switch_var_base = ITA_re_monthly_delta } #surface the true signed change to Reform Expectancy for the meter (item 3) set_variable = { ITA_reform_expectance_change_display_var = { value = ITA_re_monthly_delta multiply = -1 } } #decay the temporary channel toward 0 (item 4e) multiply_variable = { ITA_drift_switch_temp_var = 0.9 } reforme_expectance_government_change_update = yes } if = { limit = { NOT = { has_country_flag = privatized_alitalia } NOT = { has_idea = ITA_privatizations } NOT = { has_country_flag = ITA_alitalia_collapsed } } random = { chance = 50 add_to_variable = { alitalia_crisis_counter = 1 } } if = { limit = { check_variable = { alitalia_crisis_counter > 11 } } set_variable = { alitalia_crisis_counter = 0 } country_event = italy_md.54 } } if = { limit = { has_completed_focus = ITA_befriend_israel } random = { chance = 25 add_to_variable = { ITA_drought_counter_var = 1 } } } else = { random = { chance = 50 add_to_variable = { ITA_drought_counter_var = 1 } } } if = { limit = { check_variable = { ITA_drought_counter_var > 15 } } country_event = italy_md.62 set_variable = { ITA_drought_counter_var = 0 } } } } }