#List of Scripted Effects liberal_policy_effect = { if = { limit = { check_expr = { value = 0 add = party_pop_array^2 add = party_pop_array^3 add = party_pop_array^4 add = party_pop_array^5 add = party_pop_array^16 add = party_pop_array^17 add = party_pop_array^18 add = party_pop_array^19 greater_than = { value = 0.5 } } } custom_effect_tooltip = good_liberal_policy_effect_tt set_temp_variable = { party_popularity_increase = 0.05 } change_relative_party_popularity = yes } else = { custom_effect_tooltip = bad_liberal_policy_effect_tt set_temp_variable = { party_popularity_increase = -0.05 } change_relative_party_popularity = yes } } liberal_policy_effect_small = { if = { limit = { check_expr = { value = 0 add = party_pop_array^2 add = party_pop_array^3 add = party_pop_array^4 add = party_pop_array^5 add = party_pop_array^16 add = party_pop_array^17 add = party_pop_array^18 add = party_pop_array^19 greater_than = { value = 0.5 } } } custom_effect_tooltip = good_liberal_policy_effect_small_tt set_temp_variable = { party_popularity_increase = 0.02 } change_relative_party_popularity = yes } else = { custom_effect_tooltip = bad_liberal_policy_effect_small_tt set_temp_variable = { party_popularity_increase = -0.02 } change_relative_party_popularity = yes } } conservative_policy_effect = { if = { limit = { check_expr = { value = 0 add = party_pop_array^1 add = party_pop_array^6 add = party_pop_array^7 add = party_pop_array^8 add = party_pop_array^9 add = party_pop_array^10 add = party_pop_array^11 add = party_pop_array^12 add = party_pop_array^13 add = party_pop_array^14 add = party_pop_array^15 add = party_pop_array^20 add = party_pop_array^21 add = party_pop_array^22 add = party_pop_array^23 greater_than = { value = 0.5 } } } custom_effect_tooltip = good_conservative_policy_effect_tt set_temp_variable = { party_popularity_increase = 0.05 } change_relative_party_popularity = yes } else = { custom_effect_tooltip = bad_conservative_policy_effect_tt set_temp_variable = { party_popularity_increase = -0.05 } change_relative_party_popularity = yes } } social_conservative_policy_effect = { if = { limit = { check_expr = { value = 0 add = party_pop_array^3 multiply = 0.5 add = party_pop_array^1 add = party_pop_array^2 add = party_pop_array^4 add = party_pop_array^6 add = party_pop_array^7 add = party_pop_array^8 add = party_pop_array^9 add = party_pop_array^10 add = party_pop_array^11 add = party_pop_array^12 add = party_pop_array^13 add = party_pop_array^14 add = party_pop_array^15 add = party_pop_array^16 add = party_pop_array^20 add = party_pop_array^21 add = party_pop_array^22 add = party_pop_array^23 greater_than = { value = 0.5 } } } custom_effect_tooltip = good_social_conservative_policy_effect_tt set_temp_variable = { party_popularity_increase = 0.05 } change_relative_party_popularity = yes } else = { custom_effect_tooltip = bad_social_conservative_policy_effect_tt set_temp_variable = { party_popularity_increase = -0.05 } change_relative_party_popularity = yes } } progressive_policy_effect = { if = { limit = { check_expr = { value = 0 add = party_pop_array^3 multiply = 0.5 add = party_pop_array^5 add = party_pop_array^17 add = party_pop_array^18 add = party_pop_array^19 greater_than = { value = 0.5 } } } custom_effect_tooltip = good_progressive_policy_effect_tt set_temp_variable = { party_popularity_increase = 0.05 } change_relative_party_popularity = yes } else = { custom_effect_tooltip = bad_progressive_policy_effect_tt set_temp_variable = { party_popularity_increase = -0.05 } change_relative_party_popularity = yes } } support_for_reunification_2 = { custom_effect_tooltip = support_for_reunification_2_tt add_to_variable = { SFR = 2 } clamp_variable = { var = SFR min = 0 max = 100 } add_to_variable = { var = global.NKO_korean_reunion_gui_dirty value = 1 } } support_for_reunification_1 = { custom_effect_tooltip = support_for_reunification_1_tt add_to_variable = { SFR = 1 } clamp_variable = { var = SFR min = 0 max = 100 } add_to_variable = { var = global.NKO_korean_reunion_gui_dirty value = 1 } } support_for_reunification_5_less = { custom_effect_tooltip = support_for_reunification_5_less_tt subtract_from_variable = { SFR = 5 } clamp_variable = { var = SFR min = 0 max = 100 } add_to_variable = { var = global.NKO_korean_reunion_gui_dirty value = 1 } } support_for_reunification_2_less = { custom_effect_tooltip = support_for_reunification_2_less_tt subtract_from_variable = { SFR = 2 } clamp_variable = { var = SFR min = 0 max = 100 } add_to_variable = { var = global.NKO_korean_reunion_gui_dirty value = 1 } } support_for_reunification_1_less = { custom_effect_tooltip = support_for_reunification_1_less_tt subtract_from_variable = { SFR = 1 } clamp_variable = { var = SFR min = 0 max = 100 } add_to_variable = { var = global.NKO_korean_reunion_gui_dirty value = 1 } } weaken_NIS = { if = { limit = { has_idea = KOR_politicized_spy_agency } swap_ideas = { remove_idea = KOR_politicized_spy_agency add_idea = KOR_politicized_spy_agency1 } } else_if = { limit = { has_idea = KOR_politicized_spy_agency1 } swap_ideas = { remove_idea = KOR_politicized_spy_agency1 add_idea = KOR_politicized_spy_agency2 } } else_if = { limit = { has_idea = KOR_politicized_spy_agency2 } swap_ideas = { remove_idea = KOR_politicized_spy_agency2 add_idea = KOR_politicized_spy_agency3 } } else_if = { limit = { has_idea = KOR_politicized_spy_agency3 } remove_ideas = KOR_politicized_spy_agency3 } } strengthen_NIS = { if = { limit = { has_idea = KOR_politicized_spy_agency4 } swap_ideas = { remove_idea = KOR_politicized_spy_agency4 add_idea = KOR_politicized_spy_agency5 } } if = { limit = { has_idea = KOR_politicized_spy_agency } swap_ideas = { remove_idea = KOR_politicized_spy_agency add_idea = KOR_politicized_spy_agency4 } } else_if = { limit = { has_idea = KOR_politicized_spy_agency1 } swap_ideas = { remove_idea = KOR_politicized_spy_agency1 add_idea = KOR_politicized_spy_agency } } else_if = { limit = { has_idea = KOR_politicized_spy_agency2 } swap_ideas = { remove_idea = KOR_politicized_spy_agency2 add_idea = KOR_politicized_spy_agency1 } } else_if = { limit = { has_idea = KOR_politicized_spy_agency3 } remove_ideas = KOR_politicized_spy_agency2 } else = { add_ideas = KOR_politicized_spy_agency3 } } increase_chaebol_dependence = { if = { limit = { has_idea = KOR_chaebol_dependence2 } swap_ideas = { remove_idea = KOR_chaebol_dependence2 add_idea = KOR_chaebol_dependence6 } } else_if = { limit = { has_idea = KOR_chaebol_dependence1 } swap_ideas = { remove_idea = KOR_chaebol_dependence1 add_idea = KOR_chaebol_dependence2 } } else_if = { limit = { has_idea = KOR_chaebol_dependence } swap_ideas = { remove_idea = KOR_chaebol_dependence add_idea = KOR_chaebol_dependence1 } } else_if = { limit = { has_idea = KOR_chaebol_dependence3 } swap_ideas = { remove_idea = KOR_chaebol_dependence3 add_idea = KOR_chaebol_dependence } } else_if = { limit = { has_idea = KOR_chaebol_dependence4 } swap_ideas = { remove_idea = KOR_chaebol_dependence4 add_idea = KOR_chaebol_dependence3 } } else_if = { limit = { has_idea = KOR_chaebol_dependence5 } swap_ideas = { remove_idea = KOR_chaebol_dependence5 add_idea = KOR_chaebol_dependence4 } } else = { add_ideas = KOR_chaebol_dependence5 } } decrease_chaebol_dependence = { if = { limit = { has_idea = KOR_chaebol_dependence6 } swap_ideas = { remove_idea = KOR_chaebol_dependence6 add_idea = KOR_chaebol_dependence2 } } else_if = { limit = { has_idea = KOR_chaebol_dependence2 } swap_ideas = { remove_idea = KOR_chaebol_dependence2 add_idea = KOR_chaebol_dependence1 } } else_if = { limit = { has_idea = KOR_chaebol_dependence1 } swap_ideas = { remove_idea = KOR_chaebol_dependence1 add_idea = KOR_chaebol_dependence } } else_if = { limit = { has_idea = KOR_chaebol_dependence } swap_ideas = { remove_idea = KOR_chaebol_dependence add_idea = KOR_chaebol_dependence3 } } else_if = { limit = { has_idea = KOR_chaebol_dependence3 } swap_ideas = { remove_idea = KOR_chaebol_dependence3 add_idea = KOR_chaebol_dependence4 } } else_if = { limit = { has_idea = KOR_chaebol_dependence4 } swap_ideas = { remove_idea = KOR_chaebol_dependence4 add_idea = KOR_chaebol_dependence5 } } else = { remove_ideas = KOR_chaebol_dependence5 } } increase_sanctions_NPT = { if = { limit = { has_idea = Massive_International_Sanctions } add_political_power = 50 } if = { limit = { has_idea = international_sanctions } swap_ideas = { remove_idea = international_sanctions add_idea = Massive_International_Sanctions } } if = { limit = { has_idea = Western_Sanctions } swap_ideas = { remove_idea = Western_Sanctions add_idea = Massive_International_Sanctions } } if = { limit = { has_idea = Reduced_Western_Sanctions } swap_ideas = { remove_idea = Reduced_Western_Sanctions add_idea = Massive_International_Sanctions } } } KOR_inherit_aerospace_tech = { if = { limit = { tag = KOR country_exists = NKO } if = { limit = { NKO = { has_tech = gen_3_light } } set_technology = { gen_3_light = 1 } } if = { limit = { NKO = { has_tech = gen_4_light } } set_technology = { gen_4_light = 1 } } if = { limit = { NKO = { has_tech = gen_3_medium } } set_technology = { gen_3_medium = 1 } } if = { limit = { NKO = { has_tech = gen_4_medium } } set_technology = { gen_4_medium = 1 } } if = { limit = { NKO = { has_tech = gen_3_large } } set_technology = { gen_3_large = 1 } } if = { limit = { NKO = { has_tech = gen_4_large } } set_technology = { gen_4_large = 1 } } if = { limit = { NKO = { has_tech = flying_wing_design } } set_technology = { flying_wing_design = 1 } } if = { limit = { NKO = { has_tech = variable_wing_design } } set_technology = { variable_wing_design = 1 } } if = { limit = { NKO = { has_tech = delta_wing_design } } set_technology = { delta_wing_design = 1 } } if = { limit = { NKO = { has_tech = engines_3 } } set_technology = { engines_3 = 1 } } if = { limit = { NKO = { has_tech = engines_4 } } set_technology = { engines_4 = 1 } } if = { limit = { NKO = { has_tech = avionics_2 } } set_technology = { avionics_2 = 1 } } if = { limit = { NKO = { has_tech = awacs_1 } } set_technology = { awacs_1 = 1 } } if = { limit = { NKO = { has_tech = awacs_2 } } set_technology = { awacs_2 = 1 } } if = { limit = { NKO = { has_tech = redundant_2 } } set_technology = { redundant_2 = 1 } } if = { limit = { NKO = { has_tech = air_weapons_2 } } set_technology = { air_weapons_2 = 1 } } if = { limit = { NKO = { has_tech = countermeasures_2 } } set_technology = { countermeasures_2 = 1 } } if = { limit = { NKO = { has_tech = ag_weapons_2 } } set_technology = { ag_weapons_2 = 1 } } if = { limit = { NKO = { has_tech = naval_weapons_2 } } set_technology = { naval_weapons_2 = 1 } } if = { limit = { NKO = { has_tech = special_mad_2 } } set_technology = { special_mad_2 = 1 } } if = { limit = { NKO = { has_tech = tgp_recon_2 } } set_technology = { tgp_recon_2 = 1 } } } if = { limit = { tag = NKO country_exists = KOR } if = { limit = { KOR = { has_tech = gen_3_light } } set_technology = { gen_3_light = 1 } } if = { limit = { KOR = { has_tech = gen_4_light } } set_technology = { gen_4_light = 1 } } if = { limit = { KOR = { has_tech = gen_3_medium } } set_technology = { gen_3_medium = 1 } } if = { limit = { KOR = { has_tech = gen_4_medium } } set_technology = { gen_4_medium = 1 } } if = { limit = { KOR = { has_tech = gen_3_large } } set_technology = { gen_3_large = 1 } } if = { limit = { KOR = { has_tech = gen_4_large } } set_technology = { gen_4_large = 1 } } if = { limit = { KOR = { has_tech = flying_wing_design } } set_technology = { flying_wing_design = 1 } } if = { limit = { KOR = { has_tech = variable_wing_design } } set_technology = { variable_wing_design = 1 } } if = { limit = { KOR = { has_tech = delta_wing_design } } set_technology = { delta_wing_design = 1 } } if = { limit = { KOR = { has_tech = engines_3 } } set_technology = { engines_3 = 1 } } if = { limit = { KOR = { has_tech = engines_4 } } set_technology = { engines_4 = 1 } } if = { limit = { KOR = { has_tech = avionics_2 } } set_technology = { avionics_2 = 1 } } if = { limit = { KOR = { has_tech = awacs_1 } } set_technology = { awacs_1 = 1 } } if = { limit = { KOR = { has_tech = awacs_2 } } set_technology = { awacs_2 = 1 } } if = { limit = { KOR = { has_tech = redundant_2 } } set_technology = { redundant_2 = 1 } } if = { limit = { KOR = { has_tech = air_weapons_2 } } set_technology = { air_weapons_2 = 1 } } if = { limit = { KOR = { has_tech = countermeasures_2 } } set_technology = { countermeasures_2 = 1 } } if = { limit = { KOR = { has_tech = ag_weapons_2 } } set_technology = { ag_weapons_2 = 1 } } if = { limit = { KOR = { has_tech = naval_weapons_2 } } set_technology = { naval_weapons_2 = 1 } } if = { limit = { KOR = { has_tech = special_mad_2 } } set_technology = { special_mad_2 = 1 } } if = { limit = { KOR = { has_tech = tgp_recon_2 } } set_technology = { tgp_recon_2 = 1 } } } } KOR_inherit_special_projects_from_south = { if = { limit = { NOT = { is_special_project_completed = sp:sp_microchip_production } KOR = { is_special_project_completed = sp:sp_microchip_production } } complete_special_project = sp:sp_microchip_production } if = { limit = { NOT = { is_special_project_completed = sp:sp_composite_production } KOR = { is_special_project_completed = sp:sp_composite_production } } complete_special_project = sp:sp_composite_production } if = { limit = { NOT = { is_special_project_completed = sp:sp_smart_grid } KOR = { is_special_project_completed = sp:sp_smart_grid } } complete_special_project = sp:sp_smart_grid } if = { limit = { NOT = { is_special_project_completed = sp:sp_solar_engines } KOR = { is_special_project_completed = sp:sp_solar_engines } } complete_special_project = sp:sp_solar_engines } if = { limit = { NOT = { is_special_project_completed = sp:sp_nuclear_engines } KOR = { is_special_project_completed = sp:sp_nuclear_engines } } complete_special_project = sp:sp_nuclear_engines } if = { limit = { NOT = { is_special_project_completed = sp:sp_awacs_project } KOR = { is_special_project_completed = sp:sp_awacs_project } } complete_special_project = sp:sp_awacs_project } if = { limit = { NOT = { is_special_project_completed = sp:sp_stealth_technology } KOR = { is_special_project_completed = sp:sp_stealth_technology } } complete_special_project = sp:sp_stealth_technology } if = { limit = { NOT = { is_special_project_completed = sp:sp_active_camouflage } KOR = { is_special_project_completed = sp:sp_active_camouflage } } complete_special_project = sp:sp_active_camouflage } if = { limit = { NOT = { is_special_project_completed = sp:sp_tank_electric_engine } KOR = { is_special_project_completed = sp:sp_tank_electric_engine } } complete_special_project = sp:sp_tank_electric_engine } if = { limit = { NOT = { is_special_project_completed = sp:sp_double_shot_rifle } KOR = { is_special_project_completed = sp:sp_double_shot_rifle } } complete_special_project = sp:sp_double_shot_rifle } if = { limit = { NOT = { is_special_project_completed = sp:sp_experimental_exoskeleton } KOR = { is_special_project_completed = sp:sp_experimental_exoskeleton } } complete_special_project = sp:sp_experimental_exoskeleton } if = { limit = { NOT = { is_special_project_completed = sp:sp_tactical_augmented_reality } KOR = { is_special_project_completed = sp:sp_tactical_augmented_reality } } complete_special_project = sp:sp_tactical_augmented_reality } if = { limit = { NOT = { is_special_project_completed = sp:sp_fire_support_land_drone } KOR = { is_special_project_completed = sp:sp_fire_support_land_drone } } complete_special_project = sp:sp_fire_support_land_drone } if = { limit = { NOT = { is_special_project_completed = sp:sp_ground_fireandforget } KOR = { is_special_project_completed = sp:sp_ground_fireandforget } } complete_special_project = sp:sp_ground_fireandforget } if = { limit = { NOT = { is_special_project_completed = sp:sp_stealth_frigate } KOR = { is_special_project_completed = sp:sp_stealth_frigate } } complete_special_project = sp:sp_stealth_frigate } if = { limit = { NOT = { is_special_project_completed = sp:sp_stealth_corvette } KOR = { is_special_project_completed = sp:sp_stealth_corvette } } complete_special_project = sp:sp_stealth_corvette } if = { limit = { NOT = { is_special_project_completed = sp:sp_stealth_destroyer } KOR = { is_special_project_completed = sp:sp_stealth_destroyer } } complete_special_project = sp:sp_stealth_destroyer } if = { limit = { NOT = { is_special_project_completed = sp:sp_rail_gun_naval_cannons } KOR = { is_special_project_completed = sp:sp_rail_gun_naval_cannons } } complete_special_project = sp:sp_rail_gun_naval_cannons } if = { limit = { NOT = { is_special_project_completed = sp:sp_medium_naval_nuclear_engines } KOR = { is_special_project_completed = sp:sp_medium_naval_nuclear_engines } } complete_special_project = sp:sp_medium_naval_nuclear_engines } } # Samsung Corporate History KOR_samsung_initialize_state = { if = { limit = { NOT = { has_country_flag = KOR_samsung_state_initialized } } set_variable = { KOR_samsung_memory_leadership = 7 } set_variable = { KOR_samsung_foundry_capability = 4 } set_variable = { KOR_samsung_consumer_ecosystem = 5 } set_variable = { KOR_samsung_supply_resilience = 4 } set_variable = { KOR_samsung_governance_trust = 3 } set_country_flag = KOR_samsung_state_initialized } KOR_samsung_clamp_state = yes } KOR_samsung_clamp_state = { clamp_variable = { var = KOR_samsung_memory_leadership min = 0 max = 10 } clamp_variable = { var = KOR_samsung_foundry_capability min = 0 max = 10 } clamp_variable = { var = KOR_samsung_consumer_ecosystem min = 0 max = 10 } clamp_variable = { var = KOR_samsung_supply_resilience min = 0 max = 10 } clamp_variable = { var = KOR_samsung_governance_trust min = 0 max = 10 } } KOR_samsung_record_asml_coinvestment = { if = { limit = { original_tag = KOR NOT = { has_country_flag = collapsed_nation } NOT = { has_country_flag = KOR_samsung_asml_coinvestment } } set_country_flag = KOR_samsung_asml_coinvestment add_to_variable = { KOR_samsung_foundry_capability = 1 } add_to_variable = { KOR_samsung_supply_resilience = 1 } KOR_samsung_clamp_state = yes if = { limit = { country_exists = HOL } HOL = { HOL_asml_register_samsung_tool_order = yes } } } } KOR_samsung_receive_asml_tool_delivery = { if = { limit = { original_tag = KOR NOT = { has_country_flag = collapsed_nation } } if = { limit = { NOT = { has_country_flag = KOR_samsung_first_tool_delivery } } set_country_flag = KOR_samsung_first_tool_delivery add_to_variable = { KOR_samsung_foundry_capability = 1 } add_to_variable = { KOR_samsung_supply_resilience = 1 } KOR_samsung_clamp_state = yes } } } KOR_samsung_receive_secondary_supplier_delivery = { if = { limit = { original_tag = KOR NOT = { has_country_flag = collapsed_nation } } if = { limit = { NOT = { has_country_flag = KOR_samsung_first_secondary_delivery } } set_country_flag = KOR_samsung_first_secondary_delivery add_to_variable = { KOR_samsung_supply_resilience = 1 } KOR_samsung_clamp_state = yes } } } KOR_samsung_update_market_pressure = { remove_ideas = { KOR_samsung_market_pressure_light KOR_samsung_market_pressure_moderate KOR_samsung_market_pressure_severe } if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } set_variable = { KOR_samsung_market_pressure = global.semiconductor_market_demand } add_to_variable = { KOR_samsung_market_pressure = global.semiconductor_market_tool_backlog } add_to_variable = { KOR_samsung_market_pressure = global.semiconductor_market_access_tension } add_to_variable = { KOR_samsung_market_pressure = 10 } subtract_from_variable = { KOR_samsung_market_pressure = KOR_samsung_foundry_capability } subtract_from_variable = { KOR_samsung_market_pressure = KOR_samsung_supply_resilience } divide_variable = { KOR_samsung_market_pressure = 3 } clamp_variable = { var = KOR_samsung_market_pressure min = 0 max = 10 } if = { limit = { check_variable = { KOR_samsung_market_pressure > 6 } } add_ideas = KOR_samsung_market_pressure_severe } else_if = { limit = { check_variable = { KOR_samsung_market_pressure > 3 } } add_ideas = KOR_samsung_market_pressure_moderate } else_if = { limit = { check_variable = { KOR_samsung_market_pressure > 0 } } add_ideas = KOR_samsung_market_pressure_light } } } KOR_samsung_record_nand_leadership = { set_country_flag = KOR_samsung_nand_system_lsi add_to_variable = { KOR_samsung_memory_leadership = 1 } add_to_variable = { KOR_samsung_foundry_capability = 1 } KOR_samsung_clamp_state = yes } KOR_samsung_record_s1_investment = { set_country_flag = KOR_samsung_s1_investment add_to_variable = { KOR_samsung_foundry_capability = 2 } add_to_variable = { KOR_samsung_supply_resilience = 1 } KOR_samsung_clamp_state = yes } KOR_samsung_record_governance_reform = { set_country_flag = KOR_samsung_2008_governance_reform add_to_variable = { KOR_samsung_governance_trust = 2 } KOR_samsung_clamp_state = yes } KOR_samsung_record_galaxy_launch = { set_country_flag = KOR_samsung_galaxy_launch add_to_variable = { KOR_samsung_consumer_ecosystem = 2 } KOR_samsung_clamp_state = yes } KOR_samsung_record_vnand = { set_country_flag = KOR_samsung_vnand_mass_production add_to_variable = { KOR_samsung_memory_leadership = 2 } add_to_variable = { KOR_samsung_supply_resilience = 1 } KOR_samsung_clamp_state = yes } KOR_samsung_transfer_techwin_to_hanwha = { if = { limit = { NOT = { has_country_flag = KOR_samsung_techwin_transferred } } set_country_flag = KOR_samsung_techwin_transferred } } KOR_samsung_record_note7_reform = { set_country_flag = KOR_samsung_note7_quality_reform add_to_variable = { KOR_samsung_governance_trust = 2 } add_to_variable = { KOR_samsung_supply_resilience = 1 } KOR_samsung_clamp_state = yes } KOR_samsung_record_foundry_organization = { set_country_flag = KOR_samsung_dedicated_foundry add_to_variable = { KOR_samsung_foundry_capability = 2 } KOR_samsung_clamp_state = yes } KOR_samsung_record_7lpp_euv = { set_country_flag = KOR_samsung_7lpp_euv add_to_variable = { KOR_samsung_foundry_capability = 1 } add_to_variable = { KOR_samsung_supply_resilience = 1 } KOR_samsung_clamp_state = yes } KOR_samsung_record_fold_relaunch = { set_country_flag = KOR_samsung_fold_relaunched add_to_variable = { KOR_samsung_consumer_ecosystem = 1 } add_to_variable = { KOR_samsung_governance_trust = 1 } KOR_samsung_clamp_state = yes } KOR_samsung_record_v1_line = { set_country_flag = KOR_samsung_v1_euv_line add_to_variable = { KOR_samsung_foundry_capability = 1 } add_to_variable = { KOR_samsung_supply_resilience = 1 } KOR_samsung_clamp_state = yes } KOR_samsung_record_taylor_investment = { set_country_flag = KOR_samsung_taylor_investment add_to_variable = { KOR_samsung_foundry_capability = 1 } add_to_variable = { KOR_samsung_supply_resilience = 1 } KOR_samsung_clamp_state = yes } KOR_samsung_record_3nm_gaa = { set_country_flag = KOR_samsung_3nm_gaa add_to_variable = { KOR_samsung_foundry_capability = 1 } add_to_variable = { KOR_samsung_memory_leadership = 1 } KOR_samsung_clamp_state = yes } KOR_samsung_record_hbm_ai = { add_to_variable = { KOR_samsung_memory_leadership = 1 } add_to_variable = { KOR_samsung_supply_resilience = 1 } KOR_samsung_clamp_state = yes } KOR_samsung_clear_capstone_outcome = { remove_ideas = { KOR_samsung_integrated_ai_semiconductor_stack KOR_samsung_merchant_foundry_challenger KOR_samsung_memory_ai_infrastructure_champion KOR_samsung_global_galaxy_ecosystem KOR_samsung_disciplined_diversified_champion } clr_country_flag = KOR_samsung_capstone_resolved } KOR_samsung_apply_integrated_ai_semiconductor_stack = { KOR_samsung_clear_capstone_outcome = yes add_ideas = KOR_samsung_integrated_ai_semiconductor_stack set_country_flag = KOR_samsung_capstone_resolved } KOR_samsung_apply_merchant_foundry_challenger = { KOR_samsung_clear_capstone_outcome = yes add_ideas = KOR_samsung_merchant_foundry_challenger set_country_flag = KOR_samsung_capstone_resolved } KOR_samsung_apply_memory_ai_infrastructure_champion = { KOR_samsung_clear_capstone_outcome = yes add_ideas = KOR_samsung_memory_ai_infrastructure_champion set_country_flag = KOR_samsung_capstone_resolved } KOR_samsung_apply_global_galaxy_ecosystem = { KOR_samsung_clear_capstone_outcome = yes add_ideas = KOR_samsung_global_galaxy_ecosystem set_country_flag = KOR_samsung_capstone_resolved } KOR_samsung_apply_disciplined_diversified_champion = { KOR_samsung_clear_capstone_outcome = yes add_ideas = KOR_samsung_disciplined_diversified_champion set_country_flag = KOR_samsung_capstone_resolved } KOR_samsung_resolve_capstone = { KOR_samsung_initialize_state = yes KOR_samsung_clear_capstone_outcome = yes if = { limit = { has_country_flag = KOR_samsung_integrated_stack_strategy check_variable = { KOR_samsung_memory_leadership > 8 } check_variable = { KOR_samsung_foundry_capability > 7 } check_variable = { KOR_samsung_consumer_ecosystem > 7 } check_variable = { KOR_samsung_supply_resilience > 6 } } KOR_samsung_apply_integrated_ai_semiconductor_stack = yes } else_if = { limit = { has_country_flag = KOR_samsung_merchant_foundry_strategy check_variable = { KOR_samsung_foundry_capability > 8 } check_variable = { KOR_samsung_supply_resilience > 6 } } KOR_samsung_apply_merchant_foundry_challenger = yes } else_if = { limit = { has_country_flag = KOR_samsung_galaxy_ecosystem_strategy check_variable = { KOR_samsung_consumer_ecosystem > 8 } check_variable = { KOR_samsung_governance_trust > 4 } } KOR_samsung_apply_global_galaxy_ecosystem = yes } else_if = { limit = { check_variable = { KOR_samsung_memory_leadership > 8 } check_variable = { KOR_samsung_supply_resilience > 5 } } KOR_samsung_apply_memory_ai_infrastructure_champion = yes } else = { KOR_samsung_apply_disciplined_diversified_champion = yes } KOR_samsung_clamp_state = yes } KOR_samsung_milestone_2002 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } KOR_samsung_initialize_state = yes country_event = { id = KOR_samsung_events.1 days = 243 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } KOR_samsung_initialize_state = yes KOR_samsung_record_nand_leadership = yes } } KOR_samsung_milestone_2005 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } KOR_samsung_initialize_state = yes country_event = { id = KOR_samsung_events.2 days = 151 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } KOR_samsung_initialize_state = yes KOR_samsung_record_s1_investment = yes } } KOR_samsung_milestone_2008 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } KOR_samsung_initialize_state = yes country_event = { id = KOR_samsung_events.3 days = 112 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } KOR_samsung_initialize_state = yes KOR_samsung_record_governance_reform = yes } } KOR_samsung_milestone_2010 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } KOR_samsung_initialize_state = yes country_event = { id = KOR_samsung_events.4 days = 154 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } KOR_samsung_initialize_state = yes KOR_samsung_record_galaxy_launch = yes } } KOR_samsung_milestone_2012 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } KOR_samsung_initialize_state = yes KOR_samsung_record_asml_coinvestment = yes } } KOR_samsung_milestone_2013 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } KOR_samsung_initialize_state = yes country_event = { id = KOR_samsung_events.6 days = 217 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } KOR_samsung_initialize_state = yes KOR_samsung_record_vnand = yes } } KOR_samsung_milestone_2015 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } KOR_samsung_initialize_state = yes country_event = { id = KOR_samsung_events.7 days = 179 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } KOR_samsung_initialize_state = yes KOR_samsung_transfer_techwin_to_hanwha = yes } } KOR_samsung_milestone_2016 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } KOR_samsung_initialize_state = yes country_event = { id = KOR_samsung_events.8 days = 245 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } KOR_samsung_initialize_state = yes KOR_samsung_record_note7_reform = yes } } KOR_samsung_milestone_2017 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } KOR_samsung_initialize_state = yes country_event = { id = KOR_samsung_events.9 days = 131 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } KOR_samsung_initialize_state = yes KOR_samsung_record_foundry_organization = yes } } KOR_samsung_milestone_2018 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } KOR_samsung_initialize_state = yes country_event = { id = KOR_samsung_events.10 days = 290 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } KOR_samsung_initialize_state = yes KOR_samsung_record_7lpp_euv = yes } } KOR_samsung_milestone_2019 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } KOR_samsung_initialize_state = yes country_event = { id = KOR_samsung_events.11 days = 248 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } KOR_samsung_initialize_state = yes KOR_samsung_record_fold_relaunch = yes } } KOR_samsung_milestone_2020 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } KOR_samsung_initialize_state = yes country_event = { id = KOR_samsung_events.12 days = 50 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } KOR_samsung_initialize_state = yes KOR_samsung_record_v1_line = yes } } KOR_samsung_milestone_2021 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } KOR_samsung_initialize_state = yes country_event = { id = KOR_samsung_events.13 days = 326 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } KOR_samsung_initialize_state = yes KOR_samsung_record_taylor_investment = yes } } KOR_samsung_milestone_2022 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } KOR_samsung_initialize_state = yes country_event = { id = KOR_samsung_events.14 days = 180 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } KOR_samsung_initialize_state = yes KOR_samsung_record_3nm_gaa = yes } } KOR_samsung_milestone_2024 = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } KOR_samsung_initialize_state = yes country_event = { id = KOR_samsung_events.15 days = 335 } } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = outcomes_only } } KOR_samsung_initialize_state = yes KOR_samsung_record_hbm_ai = yes KOR_samsung_resolve_capstone = yes } } # Semiconductor Market semiconductor_market_initialize_state = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } NOT = { has_global_flag = GLOBAL_semiconductor_market_state_initialized } } set_variable = { global.semiconductor_market_demand = 5 } set_variable = { global.semiconductor_market_tool_backlog = 0 } set_variable = { global.semiconductor_market_access_tension = 2 } set_global_flag = GLOBAL_semiconductor_market_state_initialized } } semiconductor_market_clamp_state = { clamp_variable = { var = global.semiconductor_market_demand min = 0 max = 10 } clamp_variable = { var = global.semiconductor_market_tool_backlog min = 0 max = 10 } clamp_variable = { var = global.semiconductor_market_access_tension min = 0 max = 10 } } # Owner callbacks call these shared effects instead of writing market state. semiconductor_market_register_tool_order = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } } semiconductor_market_initialize_state = yes add_to_variable = { global.semiconductor_market_tool_backlog = 1 } semiconductor_market_clamp_state = yes } } semiconductor_market_complete_tool_order = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } has_global_flag = GLOBAL_semiconductor_market_state_initialized } subtract_from_variable = { global.semiconductor_market_tool_backlog = 1 } semiconductor_market_clamp_state = yes } } semiconductor_market_update_demand = { # Historical dates set targets; the values themselves are gameplay abstractions. if = { limit = { date < 2001.1.1 } set_temp_variable = { semiconductor_market_demand_target = 5 } } else_if = { limit = { date < 2003.1.1 } set_temp_variable = { semiconductor_market_demand_target = 3 } } else_if = { limit = { date < 2008.1.1 } set_temp_variable = { semiconductor_market_demand_target = 5 } } else_if = { limit = { date < 2010.1.1 } set_temp_variable = { semiconductor_market_demand_target = 3 } } else_if = { limit = { date < 2017.1.1 } set_temp_variable = { semiconductor_market_demand_target = 5 } } else_if = { limit = { date < 2020.1.1 } set_temp_variable = { semiconductor_market_demand_target = 6 } } else_if = { limit = { date < 2023.1.1 } set_temp_variable = { semiconductor_market_demand_target = 9 } } else_if = { limit = { date < 2024.1.1 } set_temp_variable = { semiconductor_market_demand_target = 6 } } else = { set_temp_variable = { semiconductor_market_demand_target = 8 } } if = { limit = { country_exists = KOR KOR = { OR = { check_variable = { resource@microchips < 0 } has_idea = gpu_accelerator_demand } } } add_to_temp_variable = { semiconductor_market_demand_target = 1 } } else_if = { limit = { country_exists = KOR KOR = { check_variable = { resource@microchips > 100 } check_variable = { microchip_plant_total > 9 } NOT = { has_idea = gpu_accelerator_demand } } } subtract_from_temp_variable = { semiconductor_market_demand_target = 1 } } clamp_temp_variable = { var = semiconductor_market_demand_target min = 0 max = 10 } if = { limit = { check_variable = { var = global.semiconductor_market_demand value = semiconductor_market_demand_target compare = less_than } } add_to_variable = { global.semiconductor_market_demand = 1 } } else_if = { limit = { check_variable = { var = global.semiconductor_market_demand value = semiconductor_market_demand_target compare = greater_than } } subtract_from_variable = { global.semiconductor_market_demand = 1 } } } semiconductor_market_update_access_tension = { if = { limit = { date < 2019.1.1 } set_temp_variable = { semiconductor_market_access_target = 2 } } else_if = { limit = { date < 2023.1.1 } set_temp_variable = { semiconductor_market_access_target = 4 } } else = { set_temp_variable = { semiconductor_market_access_target = 6 } } if = { limit = { country_exists = HOL HOL = { NOT = { has_country_flag = collapsed_nation } has_country_flag = HOL_asml_open_customer_allocation } } subtract_from_temp_variable = { semiconductor_market_access_target = 1 } } else_if = { limit = { country_exists = HOL HOL = { NOT = { has_country_flag = collapsed_nation } has_country_flag = HOL_asml_strategic_licensing } } add_to_temp_variable = { semiconductor_market_access_target = 1 } } clamp_temp_variable = { var = semiconductor_market_access_target min = 0 max = 10 } if = { limit = { check_variable = { var = global.semiconductor_market_access_tension value = semiconductor_market_access_target compare = less_than } } add_to_variable = { global.semiconductor_market_access_tension = 1 } } else_if = { limit = { check_variable = { var = global.semiconductor_market_access_tension value = semiconductor_market_access_target compare = greater_than } } subtract_from_variable = { global.semiconductor_market_access_tension = 1 } } } semiconductor_market_deliver_tools = { if = { limit = { check_variable = { global.semiconductor_market_tool_backlog > 0 } country_exists = HOL HOL = { NOT = { has_country_flag = collapsed_nation } has_country_flag = HOL_asml_samsung_tool_order_pending } } HOL = { HOL_asml_complete_samsung_tool_order = yes } if = { limit = { country_exists = KOR } KOR = { KOR_samsung_receive_asml_tool_delivery = yes } } # A mature, resilient ASML clears a second unit of backlog in the same quarter. if = { limit = { check_variable = { global.semiconductor_market_tool_backlog > 0 } HOL = { check_variable = { var = HOL_asml_euv_maturity value = 7 compare = greater_than_or_equals } check_variable = { var = HOL_asml_supplier_resilience value = 7 compare = greater_than_or_equals } } } subtract_from_variable = { global.semiconductor_market_tool_backlog = 1 } } } else_if = { limit = { check_variable = { global.semiconductor_market_tool_backlog > 0 } country_exists = KOR KOR = { NOT = { has_country_flag = collapsed_nation } } } subtract_from_variable = { global.semiconductor_market_tool_backlog = 1 } KOR = { KOR_samsung_receive_secondary_supplier_delivery = yes } } } semiconductor_market_refresh_owner_pressure = { if = { limit = { country_exists = KOR KOR = { NOT = { has_country_flag = collapsed_nation } } } KOR = { KOR_samsung_update_market_pressure = yes } } if = { limit = { country_exists = HOL HOL = { NOT = { has_country_flag = collapsed_nation } } } HOL = { HOL_asml_update_market_pressure = yes } } } semiconductor_market_quarterly_update = { semiconductor_market_initialize_state = yes semiconductor_market_update_demand = yes semiconductor_market_update_access_tension = yes semiconductor_market_deliver_tools = yes semiconductor_market_clamp_state = yes semiconductor_market_refresh_owner_pressure = yes } # KOR and HOL both call this from their native monthly hosts. Timed global guards # make the update idempotent without a global poll or country iteration. semiconductor_market_quarterly_driver = { if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } NOT = { has_country_flag = collapsed_nation } check_variable = { global.month = 1 } NOT = { has_global_flag = GLOBAL_semiconductor_market_q1_processed } } set_global_flag = { flag = GLOBAL_semiconductor_market_q1_processed value = 1 days = 80 } semiconductor_market_quarterly_update = yes } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } NOT = { has_country_flag = collapsed_nation } check_variable = { global.month = 4 } NOT = { has_global_flag = GLOBAL_semiconductor_market_q2_processed } } set_global_flag = { flag = GLOBAL_semiconductor_market_q2_processed value = 1 days = 80 } semiconductor_market_quarterly_update = yes } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } NOT = { has_country_flag = collapsed_nation } check_variable = { global.month = 7 } NOT = { has_global_flag = GLOBAL_semiconductor_market_q3_processed } } set_global_flag = { flag = GLOBAL_semiconductor_market_q3_processed value = 1 days = 80 } semiconductor_market_quarterly_update = yes } else_if = { limit = { has_game_rule = { rule = rule_corporate_history option = full } NOT = { has_country_flag = collapsed_nation } check_variable = { global.month = 10 } NOT = { has_global_flag = GLOBAL_semiconductor_market_q4_processed } } set_global_flag = { flag = GLOBAL_semiconductor_market_q4_processed value = 1 days = 80 } semiconductor_market_quarterly_update = yes } }