CAN_update_french_happiness = { # Clear the Ideas first if = { limit = { OR = { has_idea = CAN_extremely_high_french_happiness has_idea = CAN_very_high_french_happiness has_idea = CAN_high_french_happiness has_idea = CAN_medium_french_happiness has_idea = CAN_low_french_happiness has_idea = CAN_very_low_french_happiness has_idea = CAN_extremely_low_french_happiness } } custom_effect_tooltip = CAN_remove_french_happiness_tt hidden_effect = { remove_ideas = { CAN_extremely_high_french_happiness CAN_very_high_french_happiness CAN_high_french_happiness CAN_medium_french_happiness CAN_low_french_happiness CAN_very_low_french_happiness CAN_extremely_low_french_happiness } } } # Add French Happiness Idea if = { limit = { check_variable = { french_happiness_var > 95 } } add_ideas = CAN_extremely_high_french_happiness } else_if = { limit = { check_variable = { french_happiness_var < 96 } check_variable = { french_happiness_var > 80 } } add_ideas = CAN_very_high_french_happiness } else_if = { limit = { check_variable = { french_happiness_var < 81 } check_variable = { french_happiness_var > 70 } } add_ideas = CAN_high_french_happiness } else_if = { limit = { check_variable = { french_happiness_var < 71 } check_variable = { french_happiness_var > 50 } } add_ideas = CAN_medium_french_happiness } else_if = { limit = { check_variable = { french_happiness_var < 51 } check_variable = { french_happiness_var > 25 } } add_ideas = CAN_low_french_happiness } else_if = { limit = { check_variable = { french_happiness_var < 26 } check_variable = { french_happiness_var > 5 } } add_ideas = CAN_very_low_french_happiness } else = { add_ideas = CAN_extremely_low_french_happiness # Triggers very low opinion event CAN = { country_event = { id = canada.5 days = 7 } } } clamp_variable = { var = french_happiness_var min = 0 max = 100 } } # set_temp_variable = { modify_que_happy = +- } CAN_modify_french_happiness = { add_to_variable = { french_happiness_var = modify_que_happy } custom_effect_tooltip = CAN_modify_french_happiness_tt CAN_update_french_happiness = yes } # set_temp_variable = { subsidy_change_tmp = +- } CAN_modify_subsidy_changes = { add_to_variable = { CAN_subsidy_total = subsidy_change_tmp } clamp_variable = { var = CAN_subsidy_total min = 0 } custom_effect_tooltip = CAN_modify_subsidy_changes_tt ingame_update_setup = yes } # Updating CAN_overburdened_economy CAN_update_overburdened_economy = { if = { limit = { has_idea = CAN_overburdened_economy } swap_ideas = { remove_idea = CAN_overburdened_economy add_idea = CAN_overburdened_economy1 } } else_if = { limit = { has_idea = CAN_overburdened_economy1 } swap_ideas = { remove_idea = CAN_overburdened_economy1 add_idea = CAN_overburdened_economy2 } } else_if = { limit = { has_idea = CAN_overburdened_economy2 } remove_ideas = CAN_overburdened_economy2 } } # ATI/AMD corporate history. The terminal milestone grants one of two mutually # exclusive national ideas; earlier milestones set the route that leads there. CAN_ati_apply_integrated_compute_engine = { if = { limit = { NOT = { has_idea = CAN_ati_integrated_amd_compute_engine } NOT = { has_idea = CAN_ati_canadian_graphics_research_compact } } add_ideas = CAN_ati_integrated_amd_compute_engine } } CAN_ati_apply_research_compact = { if = { limit = { NOT = { has_idea = CAN_ati_integrated_amd_compute_engine } NOT = { has_idea = CAN_ati_canadian_graphics_research_compact } } add_ideas = CAN_ati_canadian_graphics_research_compact } } # One entry point per milestone, called from the yearly pulse. Full presents the # choice; Outcomes Only writes the historical route silently and grants nothing. CAN_ati_milestone_2002 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } country_event = { id = canada.310 days = 198 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } set_country_flag = CAN_ati_r300_architecture } } CAN_ati_milestone_2003 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } country_event = { id = canada.311 days = 225 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } set_country_flag = CAN_ati_xbox_semicustom } } CAN_ati_milestone_2007 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } country_event = { id = canada.312 days = 297 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } set_country_flag = CAN_ati_amd_integrated } } CAN_ati_milestone_2013 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } country_event = { id = canada.313 days = 318 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } set_country_flag = CAN_ati_console_semicustom } } CAN_ati_milestone_2019 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } country_event = { id = canada.314 days = 187 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } CAN_ati_apply_integrated_compute_engine = yes } } # Matrox corporate history. Five milestones set the route; the closing milestone # resolves it into one of four futures for Canadian graphics engineering. CAN_matrox_apply_secure_vision_stack = { if = { limit = { CAN_matrox_outcome_settled = no } add_timed_idea = { idea = CAN_matrox_secure_vision_stack days = 365 } } } CAN_matrox_apply_certified_visual_systems = { if = { limit = { CAN_matrox_outcome_settled = no } add_timed_idea = { idea = CAN_matrox_certified_visual_systems days = 365 } } } CAN_matrox_apply_sovereign_visual_compute = { if = { limit = { CAN_matrox_outcome_settled = no } add_ideas = CAN_matrox_sovereign_visual_compute } } CAN_matrox_apply_open_graphics_commonwealth = { if = { limit = { CAN_matrox_outcome_settled = no } add_timed_idea = { idea = CAN_matrox_open_graphics_commonwealth days = 365 } } } # One entry point per milestone, called from the yearly pulse. Full presents the # choice; Outcomes Only writes the historical route silently and grants nothing. CAN_matrox_milestone_2001 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } country_event = { id = canada.320 days = 119 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } set_country_flag = CAN_matrox_professional_niche } } CAN_matrox_milestone_2003 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } country_event = { id = canada.321 days = 89 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } set_country_flag = CAN_matrox_parhelia_cancelled } } CAN_matrox_milestone_2006 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } country_event = { id = canada.322 days = 329 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } set_country_flag = CAN_matrox_independent_path } } CAN_matrox_milestone_2012 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } country_event = { id = canada.323 days = 304 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } set_country_flag = CAN_matrox_vision_pivot } } CAN_matrox_milestone_2022 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } country_event = { id = canada.324 days = 165 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } set_country_flag = CAN_matrox_divisions_split } } CAN_matrox_milestone_2026 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } country_event = { id = canada.325 days = 144 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } CAN_matrox_apply_secure_vision_stack = yes } } # BlackBerry corporate history. Five milestones set the route; the closing # milestone resolves it into one of four futures for Canadian mobile computing. CAN_blackberry_apply_embedded_sovereign = { if = { limit = { CAN_blackberry_outcome_settled = no } add_ideas = CAN_blackberry_embedded_sovereign } } CAN_blackberry_apply_secure_systems_holding = { if = { limit = { CAN_blackberry_outcome_settled = no } add_timed_idea = { idea = CAN_blackberry_secure_systems_holding days = 365 } } } CAN_blackberry_apply_software_pivot = { if = { limit = { CAN_blackberry_outcome_settled = no } add_timed_idea = { idea = CAN_blackberry_software_pivot days = 365 } } } CAN_blackberry_apply_waterloo_holdout = { if = { limit = { CAN_blackberry_outcome_settled = no } add_timed_idea = { idea = CAN_blackberry_waterloo_holdout days = 365 } } } # One entry point per milestone, called from the yearly pulse. Full presents the # choice; Outcomes Only writes the historical route silently and grants nothing. CAN_blackberry_milestone_2002 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } country_event = { id = canada.330 days = 70 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } set_country_flag = CAN_blackberry_private_expansion } } CAN_blackberry_milestone_2006 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } country_event = { id = canada.331 days = 61 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } set_country_flag = CAN_blackberry_ntp_settled } } CAN_blackberry_milestone_2007 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } country_event = { id = canada.332 days = 179 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } set_country_flag = CAN_blackberry_enterprise_hardware } } CAN_blackberry_milestone_2010 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } country_event = { id = canada.333 days = 98 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } set_country_flag = CAN_blackberry_qnx_embedded } } CAN_blackberry_milestone_2013 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } country_event = { id = canada.334 days = 29 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } set_country_flag = CAN_blackberry_enterprise_services } } CAN_blackberry_milestone_2026 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } country_event = { id = canada.335 days = 144 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } CAN_blackberry_apply_embedded_sovereign = yes } } CAN_corporate_history_2001 = { CAN_matrox_milestone_2001 = yes } CAN_corporate_history_2002 = { CAN_blackberry_milestone_2002 = yes CAN_ati_milestone_2002 = yes } CAN_corporate_history_2003 = { CAN_matrox_milestone_2003 = yes CAN_ati_milestone_2003 = yes } CAN_corporate_history_2006 = { CAN_blackberry_milestone_2006 = yes CAN_matrox_milestone_2006 = yes } CAN_corporate_history_2007 = { CAN_blackberry_milestone_2007 = yes CAN_ati_milestone_2007 = yes } CAN_corporate_history_2010 = { CAN_blackberry_milestone_2010 = yes } CAN_corporate_history_2012 = { CAN_matrox_milestone_2012 = yes } CAN_corporate_history_2013 = { CAN_blackberry_milestone_2013 = yes CAN_ati_milestone_2013 = yes } CAN_corporate_history_2019 = { CAN_ati_milestone_2019 = yes } CAN_corporate_history_2022 = { CAN_matrox_milestone_2022 = yes } CAN_corporate_history_2026 = { CAN_blackberry_milestone_2026 = yes CAN_matrox_milestone_2026 = yes }