Official Doc: Triggers | 官方文档:触发器
Table of Content
Triggers for scope ACE
Triggers for scope CHARACTER
- attack_skill_level
- average_stats
- can_be_country_leader
- can_select_trait
- defense_skill_level
- has_ability
- has_air_ledger
- has_army_ledger
- has_character_flag
- has_dynamic_modifier
- has_id
- has_ideology
- has_ideology_group
- has_nationality
- has_navy_ledger
- has_trait
- has_unit_leader_flag
- hidden_trigger
- is_advisor
- is_air_chief
- is_army_chief
- is_army_leader
- is_assigned
- is_border_war
- is_character
- is_character_slot
- is_corps_commander
- is_country_leader
- is_exiled_leader
- is_exiled_leader_from
- is_female
- is_field_marshal
- is_high_command
- is_leading_army
- is_leading_army_group
- is_leading_volunteer_group
- is_leading_volunteer_group_with_original_country
- is_navy_chief
- is_navy_leader
- is_operative
- is_operative_captured
- is_political_advisor
- is_theorist
- is_unit_leader
- logistics_skill_level
- meta_trigger
- not_already_hired_except_as
- num_units
- operative_leader_mission
- operative_leader_operation
- planning_skill_level
- skill
Triggers for scope COMBATANT
- armor
- attack_skill_level
- average_stats
- can_select_trait
- defense_skill_level
- dig_in
- fastest_unit
- frontage_full
- hardness
- has_carrier_airwings_in_own_combat
- has_carrier_airwings_on_mission
- has_cavalry_ratio
- has_combat_modifier
- has_flanked_opponent
- has_max_planning
- has_reserves
- has_trait
- hidden_trigger
- is_amphibious_invasion
- is_attacker
- is_border_war
- is_defender
- is_fighting_air_units
- is_fighting_in_terrain
- is_fighting_in_weather
- is_leading_volunteer_group
- is_leading_volunteer_group_with_original_country
- is_winning
- less_combat_width_than_opponent
- logistics_skill_level
- meta_trigger
- min_planning
- night
- phase
- planning_skill_level
- recon_advantage
- reserves
- skill
- skill_advantage
- tag
- temperature
Triggers for scope COUNTRY
- Official Doc: Triggers | 官方文档:触发器
- Table of Content
- Triggers for scope ACE
- Triggers for scope CHARACTER
- Triggers for scope COMBATANT
- Triggers for scope COUNTRY
- Triggers for scope OPERATION
- Triggers for scope STATE
- Triggers for scope STRATEGIC_REGION
- Triggers for scope any
- All Triggers
- add_to_temp_array
- add_to_temp_variable
- agency_upgrade_number
- ai_has_role_division
- ai_has_role_template
- ai_irrationality
- ai_liberate_desire
- ai_wants_divisions
- all_allied_country
- all_army_leader
- all_character
- all_controlled_state
- all_core_state
- all_country
- all_country_with_original_tag
- all_enemy_country
- all_guaranteed_country
- all_navy_leader
- all_neighbor_country
- all_neighbor_state
- all_occupied_country
- all_of
- all_of_scopes
- all_operative_leader
- all_other_country
- all_owned_state
- all_state
- all_subject_countries
- all_unit_leader
- alliance_naval_strength_ratio
- alliance_strength_ratio
- always
- amount_manpower_in_deployment_queue
- amount_research_slots
- amount_taken_ideas
- and
- any_allied_country
- any_army_leader
- any_character
- any_claim
- any_controlled_state
- any_core_state
- any_country
- any_country_with_original_tag
- any_enemy_country
- any_guaranteed_country
- any_home_area_neighbor_country
- any_navy_leader
- any_neighbor_country
- any_neighbor_state
- any_occupied_country
- any_of
- any_of_scopes
- any_operative_leader
- any_other_country
- any_owned_state
- any_province_building_level
- any_state
- any_subject_country
- any_unit_leader
- any_war_score
- area
- armor
- army_manpower_in_state
- attack_skill_level
- average_stats
- can_be_country_leader
- can_build_railway
- can_declare_war_on
- can_research
- can_select_trait
- casualties
- casualties_inflicted_by
- casualties_k
- check_variable
- civilwar_target
- clamp_temp_variable
- clear_temp_array
- command_power
- command_power_daily
- compare_autonomy_progress_ratio
- compare_autonomy_state
- compare_intel_with
- compliance
- compliance_speed
- conscription_ratio
- controls_province
- controls_state
- convoy_threat
- core_compliance
- core_resistance
- count_triggers
- country_exists
- current_conscription_amount
- custom_trigger_tooltip
- date
- days_since_capitulated
- days_since_last_strategic_bombing
- decryption_progress
- defense_skill_level
- difficulty
- dig_in
- distance_to
- divide_temp_variable
- divisions_in_border_state
- divisions_in_state
- enemies_naval_strength_ratio
- enemies_strength_ratio
- estimated_intel_max_armor
- estimated_intel_max_piercing
- exists
- fastest_unit
- find_highest_in_array
- find_lowest_in_array
- focus_progress
- foreign_manpower
- free_building_slots
- frontage_full
- fuel_ratio
- game_rules_allow_achievements
- garrison_manpower_need
- get_highest_scored_country_temp
- get_sorted_scored_countries_temp
- gives_military_access_to
- hardness
- has_ability
- has_active_mission
- has_active_resistance
- has_added_tension_amount
- has_air_experience
- has_air_ledger
- has_allowed_idea_with_traits
- has_annex_war_goal
- has_any_custom_difficulty_setting
- has_any_license
- has_army_experience
- has_army_ledger
- has_army_manpower
- has_army_size
- has_attache
- has_attache_from
- has_autonomy_state
- has_available_idea_with_traits
- has_border_war
- has_border_war_between
- has_border_war_with
- has_built
- has_capitulated
- has_captured_operative
- has_carrier_airwings_in_own_combat
- has_carrier_airwings_on_mission
- has_cavalry_ratio
- has_character
- has_character_flag
- has_civil_war
- has_claimed_state_in_peace_conference
- has_collaboration
- has_combat_modifier
- has_completed_focus
- has_core_occupation_modifier
- has_cosmetic_tag
- has_country_custom_difficulty_setting
- has_country_flag
- has_country_leader
- has_country_leader_ideology
- has_country_leader_with_trait
- has_custom_difficulty_setting
- has_damaged_buildings
- has_decision
- has_defensive_war
- has_defensive_war_with
- has_deployed_air_force_size
- has_design_based_on
- has_dlc
- has_done_agency_upgrade
- has_dynamic_modifier
- has_elections
- has_equipment
- has_event_target
- has_finished_collecting_for_operation
- has_flanked_opponent
- has_focus_tree
- has_fuel
- has_full_control_of_state
- has_game_rule
- has_global_flag
- has_government
- has_guaranteed
- has_id
- has_idea
- has_idea_with_trait
- has_ideology
- has_ideology_group
- has_intelligence_agency
- has_legitimacy
- has_license
- has_manpower
- has_manpower_for_recruit_change_to
- has_max_planning
- has_military_access_to
- has_mined
- has_mines
- has_nationality
- has_navy_experience
- has_navy_ledger
- has_navy_size
- has_non_aggression_pact_with
- has_occupation_modifier
- has_offensive_war
- has_offensive_war_with
- has_operation_token
- has_opinion
- has_opinion_modifier
- has_political_power
- has_railway_connection
- has_railway_level
- has_relation_modifier
- has_reserves
- has_resistance
- has_resources_amount
- has_rule
- has_stability
- has_start_date
- has_state_category
- has_state_flag
- has_subject
- has_tech
- has_tech_bonus
- has_template
- has_template_ai_majority_unit
- has_template_containing_unit
- has_template_majority_unit
- has_terrain
- has_trait
- has_unit_leader
- has_unit_leader_flag
- has_variable
- has_volunteers_amount_from
- has_war
- has_war_support
- has_war_together_with
- has_war_with
- has_wargoal_against
- hidden_trigger
- ic_ratio
- if
- impassable
- intel_level_over
- is_active_decryption_bonuses_enabled
- is_advisor
- is_ai
- is_air_chief
- is_ally_with
- is_amphibious_invasion
- is_army_chief
- is_army_leader
- is_assigned
- is_attacker
- is_border_conflict
- is_border_war
- is_capital
- is_character
- is_character_slot
- is_claimed_by
- is_coastal
- is_controlled_by
- is_core_of
- is_corps_commander
- is_country_leader
- is_cryptology_department_active
- is_debug
- is_decrypting
- is_defender
- is_demilitarized_zone
- is_dynamic_country
- is_exile_host
- is_exiled_in
- is_exiled_leader
- is_exiled_leader_from
- is_faction_leader
- is_female
- is_field_marshal
- is_fighting_air_units
- is_fighting_in_terrain
- is_fighting_in_weather
- is_fully_controlled_by
- is_fully_decrypted
- is_government_in_exile
- is_guaranteed_by
- is_high_command
- is_historical_focus_on
- is_hosting_exile
- is_in_array
- is_in_faction
- is_in_faction_with
- is_in_home_area
- is_in_peace_conference
- is_in_tech_sharing_group
- is_ironman
- is_island_state
- is_justifying_wargoal_against
- is_leading_army
- is_leading_army_group
- is_leading_volunteer_group
- is_leading_volunteer_group_with_original_country
- is_lend_leasing
- is_licensing_any_to
- is_licensing_to
- is_major
- is_navy_chief
- is_navy_leader
- is_neighbor_of
- is_on_continent
- is_operation_type
- is_operative
- is_operative_captured
- is_owned_and_controlled_by
- is_owned_by
- is_owner_neighbor_of
- is_political_advisor
- is_preparing_operation
- is_puppet
- is_puppet_of
- is_researching_technology
- is_running_operation
- is_spymaster
- is_staging_coup
- is_subject
- is_subject_of
- is_target_of_coup
- is_theorist
- is_tutorial
- is_unit_leader
- is_winning
- land_doctrine_level
- less_combat_width_than_opponent
- log
- logistics_skill_level
- manpower_per_military_factory
- meta_trigger
- min_planning
- mine_threat
- modulo_temp_variable
- multiply_temp_variable
- naval_strength_comparison
- naval_strength_ratio
- network_national_coverage
- network_strength
- night
- non_damaged_building_level
- not
- not_already_hired_except_as
- num_claimed_peace_conference_neighbour_states
- num_divisions
- num_faction_members
- num_fake_intel_divisions
- num_finished_operations
- num_free_operative_slots
- num_occupied_states
- num_of_available_civilian_factories
- num_of_available_military_factories
- num_of_available_naval_factories
- num_of_civilian_factories
- num_of_civilian_factories_available_for_projects
- num_of_controlled_factories
- num_of_controlled_states
- num_of_factories
- num_of_military_factories
- num_of_naval_factories
- num_of_nukes
- num_of_operatives
- num_of_owned_factories
- num_of_supply_nodes
- num_operative_slots
- num_owned_neighbour_states
- num_researched_technologies
- num_subjects
- num_tech_sharing_groups
- num_units
- occupation_law
- occupied_country_tag
- operative_leader_mission
- operative_leader_operation
- or
- original_research_slots
- original_tag
- owns_state
- phase
- planning_skill_level
- political_power_daily
- political_power_growth
- print_variables
- received_expeditionary_forces
- recon_advantage
- region
- remove_from_temp_array
- reserves
- resistance
- resistance_speed
- resistance_target
- resize_temp_array
- round_temp_variable
- set_temp_variable
- set_temp_variable_to_random
- ships_in_area
- ships_in_state_ports
- skill
- skill_advantage
- state
- state_and_terrain_strategic_value
- state_population
- state_population_k
- state_strategic_value
- stockpile_ratio
- strength_ratio
- subtract_from_temp_variable
- surrender_progress
- tag
- target_conscription_amount
- temperature
- threat
Triggers for scope OPERATION
Triggers for scope STATE
- all_neighbor_state
- any_neighbor_state
- any_province_building_level
- area
- compliance
- compliance_speed
- days_since_last_strategic_bombing
- distance_to
- free_building_slots
- has_active_resistance
- has_border_war
- has_border_war_with
- has_claimed_state_in_peace_conference
- has_dynamic_modifier
- has_occupation_modifier
- has_resistance
- has_resources_amount
- has_state_category
- has_state_flag
- hidden_trigger
- impassable
- is_border_conflict
- is_capital
- is_claimed_by
- is_coastal
- is_controlled_by
- is_core_of
- is_demilitarized_zone
- is_fully_controlled_by
- is_in_home_area
- is_island_state
- is_on_continent
- is_owned_and_controlled_by
- is_owned_by
- meta_trigger
- non_damaged_building_level
- num_claimed_peace_conference_neighbour_states
- num_owned_neighbour_states
- occupation_law
- occupied_country_tag
- region
- resistance
- resistance_speed
- resistance_target
- state
- state_and_terrain_strategic_value
- state_population
- state_population_k
- state_strategic_value
Triggers for scope STRATEGIC_REGION
Triggers for scope any
- add_to_temp_array
- add_to_temp_variable
- all_country
- all_country_with_original_tag
- all_of
- all_of_scopes
- all_other_country
- all_state
- always
- and
- any_country
- any_country_with_original_tag
- any_of
- any_of_scopes
- any_other_country
- any_state
- can_build_railway
- check_variable
- clamp_temp_variable
- clear_temp_array
- count_triggers
- country_exists
- custom_trigger_tooltip
- date
- difficulty
- divide_temp_variable
- find_highest_in_array
- find_lowest_in_array
- game_rules_allow_achievements
- has_any_custom_difficulty_setting
- has_border_war_between
- has_custom_difficulty_setting
- has_dlc
- has_event_target
- has_game_rule
- has_global_flag
- has_railway_connection
- has_railway_level
- has_rule
- has_start_date
- has_variable
- if
- is_debug
- is_historical_focus_on
- is_in_array
- is_ironman
- is_tutorial
- log
- modulo_temp_variable
- multiply_temp_variable
- not
- or
- print_variables
- remove_from_temp_array
- resize_temp_array
- round_temp_variable
- set_temp_variable
- set_temp_variable_to_random
- subtract_from_temp_variable
- threat
All Triggers
add_to_temp_array
- Supported Scopes: any
- Supported Targets: none
Adds an element to a temporary array
Example: add_to_temp_array = {
array = array_name
value = 42 #optional, if not defined adds scope
index = 3 #optional, default is end. otherwise elements are shifted
}
#shorter usage: add_to_temp_array = { array_name = 42 }
add_to_temp_variable
- Supported Scopes: any
- Supported Targets: none
Adds a value or a variable to a temporary variable
Example: add_to_temp_variable = {
var = num_dogs
value = 42
tooltip = loc_str_id_with_LEFT_and_RIGHT #localized text with LEFT and RIGHT tokens in it, tokens will replaced by values. _NOT is added to end for negative trigger
}