# Hong Kong scripted triggers — LegCo motion gating # Standard policy motion triggers were removed with their motion clocks pending # the GUI buttons that set the legco__motion country flags. legco_has_a_special_active_motion = { OR = { has_country_flag = HKG_electoral_reform_mainland_a has_country_flag = HKG_electoral_reform_mainland_b has_country_flag = HKG_electoral_reform_mainland_c } } HKG_contract_can_build_ships = { has_tech = tech_diesel_power_systems_1 has_tech = tech_light_guns_1 has_tech = tech_turret_missiles_surface_1 has_tech = tech_torpedoes_1 has_tech = tech_combat_sonar_1 has_tech = tech_combat_radar_1 } HKG_contract_can_build_any = { OR = { has_tech = destroyer_hull_1 has_tech = frigate_hull_1 } } HKG_contract_china_naval_drive = { CHI = { OR = { has_war = yes num_of_naval_factories > 15 } } } HKG_contract_has_active_contract = { has_country_flag = HKG_contract_active check_variable = { HKG_contract_count > 0 } } HKG_contract_can_solicit = { has_country_flag = HKG_contract_active NOT = { has_country_flag = HKG_contract_offer_pending } check_variable = { HKG_contract_count < HKG_contract_max_slots } } # AI-only confidence gate: only solicit a new contract when Hong Kong can # realistically build and deliver the ships before the deadline, so the AI # never eats the Beijing displeasure penalty for a missed slot. HKG_contract_can_finish_in_time = { # Must be able to lay down an escort hull at all. HKG_contract_can_build_any = yes # Dockyard capacity to actually produce within the 365-730 day deadlines. num_of_naval_factories > 3 # Wartime diverts/blockades the yards; deliveries slip and the slot is missed. has_war = no # Don't stack contracts beyond what the yards can run in parallel: # require one free yard's worth of slack per active contract. custom_trigger_tooltip = { tooltip = HKG_contract_yard_slack_tt check_variable = { HKG_contract_count < num_of_naval_factories } } } HKG_contract_destroyer_active = { OR = { AND = { check_variable = { HKG_contract_occupied_array^0 = 1 } check_variable = { HKG_contract_class_array^0 = 1 } check_variable = { HKG_contract_quota_array^0 > 0 } } AND = { check_variable = { HKG_contract_occupied_array^1 = 1 } check_variable = { HKG_contract_class_array^1 = 1 } check_variable = { HKG_contract_quota_array^1 > 0 } } AND = { check_variable = { HKG_contract_occupied_array^2 = 1 } check_variable = { HKG_contract_class_array^2 = 1 } check_variable = { HKG_contract_quota_array^2 > 0 } } } } HKG_contract_frigate_active = { OR = { AND = { check_variable = { HKG_contract_occupied_array^0 = 1 } check_variable = { HKG_contract_class_array^0 = 2 } check_variable = { HKG_contract_quota_array^0 > 0 } } AND = { check_variable = { HKG_contract_occupied_array^1 = 1 } check_variable = { HKG_contract_class_array^1 = 2 } check_variable = { HKG_contract_quota_array^1 > 0 } } AND = { check_variable = { HKG_contract_occupied_array^2 = 1 } check_variable = { HKG_contract_class_array^2 = 2 } check_variable = { HKG_contract_quota_array^2 > 0 } } } } HKG_contract_submarine_active = { OR = { AND = { check_variable = { HKG_contract_occupied_array^0 = 1 } check_variable = { HKG_contract_class_array^0 = 3 } check_variable = { HKG_contract_quota_array^0 > 0 } } AND = { check_variable = { HKG_contract_occupied_array^1 = 1 } check_variable = { HKG_contract_class_array^1 = 3 } check_variable = { HKG_contract_quota_array^1 > 0 } } AND = { check_variable = { HKG_contract_occupied_array^2 = 1 } check_variable = { HKG_contract_class_array^2 = 3 } check_variable = { HKG_contract_quota_array^2 > 0 } } } } HKG_contract_cruiser_active = { OR = { AND = { check_variable = { HKG_contract_occupied_array^0 = 1 } check_variable = { HKG_contract_class_array^0 = 4 } check_variable = { HKG_contract_quota_array^0 > 0 } } AND = { check_variable = { HKG_contract_occupied_array^1 = 1 } check_variable = { HKG_contract_class_array^1 = 4 } check_variable = { HKG_contract_quota_array^1 > 0 } } AND = { check_variable = { HKG_contract_occupied_array^2 = 1 } check_variable = { HKG_contract_class_array^2 = 4 } check_variable = { HKG_contract_quota_array^2 > 0 } } } } HKG_contract_carrier_active = { OR = { AND = { check_variable = { HKG_contract_occupied_array^0 = 1 } check_variable = { HKG_contract_class_array^0 = 5 } check_variable = { HKG_contract_quota_array^0 > 0 } } AND = { check_variable = { HKG_contract_occupied_array^1 = 1 } check_variable = { HKG_contract_class_array^1 = 5 } check_variable = { HKG_contract_quota_array^1 > 0 } } AND = { check_variable = { HKG_contract_occupied_array^2 = 1 } check_variable = { HKG_contract_class_array^2 = 5 } check_variable = { HKG_contract_quota_array^2 > 0 } } } } HKG_contract_carrier_branch_done = { has_completed_focus = HKG_carrier_home has_completed_focus = HKG_carrier_construction has_completed_focus = HKG_carrier_construction2 has_completed_focus = HKG_carrier_modules has_completed_focus = HKG_flight_deck_limitations has_completed_focus = HKG_carrier_special_airwing has_completed_focus = HKG_carrier_defensive_weapons has_completed_focus = HKG_carrier_logistics } HKG_contract_capstone_ready = { has_country_flag = HKG_contract_carrier_milestone HKG_contract_carrier_branch_done = yes NOT = { has_country_flag = HKG_contract_capstone_done } } HKG_ai_historical_path = { OR = { is_historical_focus_on = yes has_global_flag = HKG_HISTORICAL_FOCUS_PATH } } HKG_ai_not_historical_path = { OR = { has_global_flag = HKG_INDEPENDENCE_FOCUS_PATH has_global_flag = HKG_BRITISH_FOCUS_PATH has_global_flag = HKG_CITY_STATE_FOCUS_PATH } } HKG_ai_not_alt_path = { NOT = { HKG_ai_not_historical_path = yes } OR = { is_historical_focus_on = yes has_global_flag = HKG_HISTORICAL_FOCUS_PATH } } HKG_ai_free_hong_kong_path = { OR = { has_global_flag = HKG_BRITISH_FOCUS_PATH has_global_flag = HKG_CITY_STATE_FOCUS_PATH } } HKG_ai_not_free_hong_kong_path = { NOT = { HKG_ai_free_hong_kong_path = yes } OR = { is_historical_focus_on = yes has_global_flag = HKG_HISTORICAL_FOCUS_PATH has_global_flag = HKG_INDEPENDENCE_FOCUS_PATH } } HKG_ai_not_independence_path = { NOT = { has_global_flag = HKG_INDEPENDENCE_FOCUS_PATH } OR = { is_historical_focus_on = yes has_global_flag = HKG_HISTORICAL_FOCUS_PATH HKG_ai_free_hong_kong_path = yes } } HKG_ai_not_british_path = { NOT = { has_global_flag = HKG_BRITISH_FOCUS_PATH } OR = { is_historical_focus_on = yes has_global_flag = HKG_HISTORICAL_FOCUS_PATH has_global_flag = HKG_INDEPENDENCE_FOCUS_PATH has_global_flag = HKG_CITY_STATE_FOCUS_PATH } } HKG_ai_not_city_state_path = { NOT = { has_global_flag = HKG_CITY_STATE_FOCUS_PATH } OR = { is_historical_focus_on = yes has_global_flag = HKG_HISTORICAL_FOCUS_PATH has_global_flag = HKG_INDEPENDENCE_FOCUS_PATH has_global_flag = HKG_BRITISH_FOCUS_PATH } } HKG_ai_no_focus_path = { NOT = { has_global_flag = HKG_HISTORICAL_FOCUS_PATH } NOT = { has_global_flag = HKG_INDEPENDENCE_FOCUS_PATH } NOT = { has_global_flag = HKG_BRITISH_FOCUS_PATH } NOT = { has_global_flag = HKG_CITY_STATE_FOCUS_PATH } }