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 }
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
}
"Return true if the character has an advisor role and they can be fired.
Warning: will return false if the character has no advisor role or it does not match the input slot. You should use has_advisor_role trigger first to really test the can_be_fired flag.
Examples:
some_character_scope = {
advisor_can_be_fired = {
slot = political_advisor # mandatory if the character has several advisor role
}
}
some_character_scope = {
advisor_can_be_fired = yes # or no
}"
Checks the number of upgrade done in the intelligence agency.
agency_upgrade_number > 4
check if the ai controlled country has any fielded divisions for a specific role
check if the ai controlled country has any template for a specific role
check the ai irrationality value
check what liberation desire the country has towards a specified country
Will compare towards the amount of divisions an ai wants to have.
"Checks if all active scientists of the Country in scope matches the triggers.
ex: GER = {
all_active_scientists = {
tooltip = my_loc_key # Optional
... Character scope triggers ...
}
}"
Check if all allied countries meet the trigger. Does not include the country itself. tooltip=key can be defined to override title
"Checks if All Army Leader of the Country in scope match the triggers.
tooltip=key can be defined to override title.
ex: GER = {
all_army_leader = {
tooltip = my_loc_key # Optional
include_invisible = yes # Optional - default = no
... character scope triggers ...
}
}"
check if all characters meets the trigger. tooltip=key can be defined to override title
check if all of the states controlled by the scope country meets the trigger. tooltip=key can be defined to override title
Check if all of the country core states for the scope meets the trigger. tooltip=key can be defined to override title
check if all countries meets the trigger. tooltip=key can be defined to override title
check if all country with current scope's original tag meets the trigger. Example:
all_country_with_original_tag = {
original_tag_to_check = ENG # the trigger check all countries that has this original tag
# ... triggers to check
}
check if all enemy countries meet the trigger. tooltip=key can be defined to override title
check if every country with current scoped country guarantees. Example:
all_country_with_original_tag = {
# ... triggers to check
}
"Checks if all Military Industrial Organisations of the Country in scope match the triggers.
tooltip=key can be defined to override title.
ex: GER = {
any_military_industrial_organization = {
tooltip = my_loc_key # Optional
include_invisible = yes # Optional - default = no
... MIO scope triggers ...
}
}"
"Checks if all Navy Leaders of the Country in scope match the triggers.
tooltip=key can be defined to override title.
ex: GER = {
all_navy_leader = {
tooltip = my_loc_key # Optional
include_invisible = yes # Optional - default = no
... character scope triggers ...
}
}"
check if all neighbor countries meet the trigger. tooltip=key can be defined to override title
check if all neighbor states meets the trigger. tooltip=key can be defined to override title
check if all occupied countries meets the trigger. tooltip=key can be defined to override title
Runs a loop on an array and check a trigger for each value, if any false returns false. otherwise returns true
Example: all_of = {
array = array_name
value = value_name #optional (default 'v') current value in array will be stored in this temp variable
index = index_name #optional (default 'i') current index in array will be stored in this temp variable
#trigger 1
#trigger 2 ...
}
Runs a loop on an array and check a trigger for each scope in it, if any false returns false. otherwise returns true
Example: all_of_scopes = {
array = array_name
tooltip = loc #if defined the trigger will output tooltip using this title. loc_NOT will be used if trigger is inside a NOT
#trigger 1
#trigger 2 ...
}
check if all operatives meets the trigger. tooltip=key can be defined to override title
check if all other countries meets the trigger. Excludes current country. tooltip=key can be defined to override title
check if all owned states meets the trigger. tooltip=key can be defined to override title
"Checks if all purchase contracts of the Country in scope matches the triggers.
tooltip=key can be defined to override title.
ex: GER = {
all_purchase_contracts = {
tooltip = my_loc_key # Optional
... Purchase Contract scope triggers ...
}
}"
"Checks if all scientists of the Country in scope matches the triggers.
tooltip=key can be defined to override title.
ex: GER = {
all_scientists = {
tooltip = my_loc_key # Optional
... Character scope triggers ...
}
}"
check if all states meets the trigger. tooltip=key can be defined to override title
check if all subject countries meet the trigger. tooltip=key can be defined to override title
"Checks if all Unit Leaders of the Country in scope match the triggers.
tooltip=key can be defined to override title.
ex: GER = {
all_unit_leader = {
tooltip = my_loc_key # Optional
include_invisible = yes # Optional - default = no
... character scope triggers ...
}
}"
Compares the estimated naval strength between the scope country, his allies and his enemies.
Compares the estimated army strength between the scope country, his allies and his enemies.
always returns specified value
Checks for amount manpower currently in deploymentview. amount_manpower_in_training > 10
check number of research current research slots
amount_research_slots > 2
has current country picked specified amount of ideas. Category and slots is optional.
Excludes national_spirit, hidden, law = yes
amount_taken_ideas = {
amount < <int> (mandatory)
categories = { military_staff } (optional)
slots = { army_chief political_advisor } (optional)
}
all inside trigger must be true
"Checks if at least one active scientist of the Country in scope matches the triggers.
ex: GER = {
any_active_scientist = {
tooltip = my_loc_key # Optional
... Character scope triggers ...
}
}"
Check if any allied country meets the trigger. Does not include the country itself. tooltip=key can be defined to override title
"Checks if at least one Army Leader of the Country in scope matches the triggers.
tooltip=key can be defined to override title.
ex: GER = {
any_army_leader = {
tooltip = my_loc_key # Optional
include_invisible = yes # Optional - default = no
... character scope triggers ...
}
}"
check if any character meets the trigger. tooltip=key can be defined to override title
check if there is a claim between a country and all others
check if any of the states controlled by the scope country meets the trigger. tooltip=key can be defined to override title
Check if any of the country core states for scope meets the trigger. tooltip=key can be defined to override title
check if any country meets the trigger
check if any division meets the trigger. tooltip=key can be defined to override title
check if any country with a core on the scoped state meets the trigger. tooltip=key can be defined to override title
check if any country with current scope's original tag meets the trigger. Example:
any_country_with_original_tag = {
original_tag_to_check = ENG # the trigger check all countries that has this original tag
# ... triggers to check
}
check if any enemy country meets the trigger. tooltip=key can be defined to override title
check if any country with current scoped country guarantees. Example:
any_guaranteed_country = {
# ... triggers to check
}
check if any neighbor country in the home area meets the trigger. tooltip=key can be defined to override title
"Checks if at least one Military Industrial Organisation of the Country in scope matches the triggers.
tooltip=key can be defined to override title.
ex: GER = {
any_military_industrial_organization = {
tooltip = my_loc_key # Optional
include_invisible = yes # Optional - default = no
... MIO scope triggers ...
}
}"
"Checks if at least one Navy Leader of the Country in scope matches the triggers.
tooltip=key can be defined to override title.
ex: GER = {
any_navy_leader = {
tooltip = my_loc_key # Optional
include_invisible = yes # Optional - default = no
... character scope triggers ...
}
}"
check if any neighbor country meets the trigger. tooltip=key can be defined to override title
check if any neighbor state meets the trigger. tooltip=key can be defined to override title
check if any any occupied meets the trigger. tooltip=key can be defined to override title
Runs a loop on an array and check a trigger for each value, if any true returns true. otherwise returns false
Example: any_of = {
array = array_name
value = value_name #optional (default 'value') current value in array will be stored in this temp variable
index = index_name #optional (default 'index') current index in array will be stored in this temp variable
#trigger 1
#trigger 2 ...
}
Runs a loop on an array and check a trigger for each scope in it, if any true returns true. otherwise returns false
Example: any_of_scopes = {
array = array_name
tooltip = loc #if defined the trigger will output tooltip using this title. loc_NOT will be used if trigger is inside a NOT
#trigger 1
#trigger 2 ...
}
check if any operatives meets the trigger. tooltip=key can be defined to override title
check if any other country meets the trigger. Excludes current country. tooltip=key can be defined to override title
check if any owned state meets the trigger. tooltip=key can be defined to override title
In the current state, checks if any province within the specified limit has a building of the specified level.
Example:
any_province_building_level = {
province = {
id = 421 # Only check specific provinces instead of all in state, can specify multiple provinces on multiple lines.
all_provinces = yes # default: no. Mutually exclusive with 'id = xxx']
limit_to_border = yes # default: no. Only border provinces.
limit_to_coastal = yes # default: no. Only coastal provinces.
limit_to_victory_point = yes # default: no. Only provinces with > 0 victory points.
limit_to_naval_base = yes # default: no. Only provinces with a naval base.
}
building = bunker # Building type.
level < 3 # Building level to check.
}
"Checks if at least one Purchase contract of the Country in scope matches the triggers.
tooltip=key can be defined to override title.
ex: GER = {
any_purchase_contract = {
tooltip = my_loc_key # Optional
... Purchase Contract scope triggers ...
}
}"
"Checks if at least one scientist of the Country in scope matches the triggers.
tooltip=key can be defined to override title.
ex: GER = {
any_scientist = {
tooltip = my_loc_key # Optional
... Character scope triggers ...
}
}"
check if any state meets the trigger. tooltip=key can be defined to override title
check if any division meets the trigger. tooltip=key can be defined to override title
check if any state in the given category meets the trigger.
tooltip=key can be defined to override title.
The trigger takes one of the followings:
array: an array of states.
continent: A continent.
ai_area: The id of an area.
strategic_region: The id of an region.
* Note that no default tooltip is available for array and ai_area.
Example:
Check if the trigger is valid in any state in a continent:
any_state_in = { conteinent = europe
FOO_TRIGGER = BAR
}
check if any subject country meets the trigger. tooltip=key can be defined to override title
"Checks if at least one Unit Leader of the Country in scope matches the triggers.
tooltip=key can be defined to override title.
ex: GER = {
any_unit_leader = {
tooltip = my_loc_key # Optional
include_invisible = yes # Optional - default = no
... character scope triggers ...
}
}"
compares the warscore of all wars in a country to see if any fullfills the comparison condition 0-100 - Example: any_war_score > 40
check state's strategic area id
Check that average armor level of combatant is over a certain level
Checks for amount manpower currently the target state with option to specify a type.
Example:
army_manpower_in_state = {
state = <id> (variables supported)
amount < <int> (variables supported)
type > <equipment_type> (armor, infantry, etc.)
Compares attack skill level of a unit leader.
Example: attack_skill_level > 5
Compares the average stats for a unit leader.
Example: average_stats > 10
Checks if the current scope has the specified amount of the specified building.
Usage: <Building> < <int>
Supported buildings: infrastructure, arms_factory, industrial_complex, air_base, supply_node, rail_way, naval_facility, naval_base, bunker, coastal_bunker, stronghold_network, dockyard, anti_air_building, synthetic_refinery, fuel_silo, radar_station, mega_gun_emplacement, rocket_site, nuclear_reactor, nuclear_reactor_heavy_water, commercial_nuclear_reactor, nuclear_facility, air_facility, land_facility, dam, dam_mountain, canal_kiel, canal_panama, landmark_big_ben, landmark_colosseum, landmark_cristo_redentor, landmark_eiffel_tower, landmark_statue_of_liberty, landmark_kremlin, landmark_hofburg_palace, landmark_berlin_reichstag, landmark_berlin_volkshalle, landmark_taj_mahal, landmark_sadabad_complex, landmark_hagia_sophia.
Check the buyer country. Example: buyer = GER
Returns true if specified character has a least one country leader role.
Example:
can_be_country_leader = GER_erwin_rommelGER_erwin_rommel = { can_be_country_leader = yes }
Checks if a railway can be built according to specifications. Example:
can_build_railway = {
build_only_on_allied = yes # No by default. If yes and the effect scope is country, it will only build on allied territories for the country
# You can specify a weight function that will be used in pathing. The scope will be the controller of the province it is trying to path to.
# A negative value will make it not to path to that controller.
# Non-negative values will be used as a path cost for that province.
controller_priority = {
base = 1
modifier = {
tag = MAN
add = 2
}
}
# The following options are used for picking a path. You can specify multiple options and it will pick in following order:
fallback = yes # Default no. If yes, each option will try to fallback to next one.
# option 1: List of provinces to draw railways. If fallback = yes uses start and end provinces of the path as fallback in option 2.
path = { 10 20 30 40 }
# option 2: Specify start & end province IDs. It will pick the shortest path. If provinces are not valid and if fallback = yes it will use states of those provs and use in option 3.
start_province = 42
target_province = 84
# option 3: Specify start & end state IDs. It will pick provinces with the best node (capital > nodes > naval )
start_state = 50
target_state = 100
}
"Checks if the country (as ROOT) and state in scope can build a building in the state.
ex:
GER = {
65 = {
can_construct_building = land_facility
}
}"
checks if the country could potentially declare a war on the target ( according to game rules, relationship, etc... ). Example can_declare_war_on = GER
check if country can research technology
check if leader can select a trait
Checks if the required medal is achieved and collected
Compares the ratio (first/second) of two playthrough values to a number
Compares a playthrough value to a number
Compares a career points value to a number
Compares the ratio (first/second) of two career profile values to a number
Checks if the required ribbon is achieved and collected
Compares a career profile value to a number
Checks if the flag is set for the local player
Sets a temporary variable to a value or another variable
Example: career_profile_set_temp_playthrough_variable = {
var = num_dogs
value = num_dogs_in_career_profile
}
Sets a temporary variable to a value or another variable
Example: career_profile_set_temp_variable = {
var = num_dogs
value = num_dogs_in_career_profile
}
Check the amount of casualties a country has suffered in all of it's wars
Checks the casualties infliced by the speficied country to the scopped country.
E.g. true if Germany has been inflicted more than 200k casualties by Poland:
GER = {
casualties_inflicted_by = {
opponent = POL
thousands > 200
}
}
Check the amount of casualties in thousands a country has suffered in all of it's wars
"Compares a variable to a number or another variable
ex:
check_variable = {
var = varname
value = 12 # accepts variables
compare = equals
# possible values for compare :
# less_than, less_than_or_equals
# greater_than, greater_than_or_equals
# equals, not_equals
tooltip = loc_str_id_with_LEFT_and_RIGHT #localized text with LEFT and/or RIGHT tokens in it
}
# some shorter versions :
check_variable = { varname = 0 }
check_variable = { varname > 12 }
check_variable = { varname < 42 }
check_variable = { varname > another_varname }
"
civilwar target is ( for civil wars checks )
clamps a temp variable between two values/variables
Clears the contents of a temporary array
Example: clear_temp_array = array_name
Checks if available command power is more or less that specified value
command_power > 1.5
Checks if daily command power increase is more or less that specified value
command_power_daily > 1.5
check if autonomy progress ratio is higher than value, example:
compare_autonomy_progress_ratio > 0.5
check if autonomy state is higher than other one, example:
compare_autonomy_state > puppet
Compare the intel of the scoped country with the specified one:
GER = {
# is true if all predicates are satisfied
compare_intel_with = {
target = POL
civilian_intel > 0.5 # GER has at least 0.5 more civ. intel than POL
army_intel = 0 # GER has as much army intel as POL
navy_intel < 0 # POL has more navy intel than GER
# airforce_intel is not specified and thus ignored in the comparison
}
}
Compares the current compliance level of a state to a value. Example: compliance > 50
Compares the current compliance speed of a state to a value. Example: compliance_speed > 50
Checks conscription ratio of the country compared to target conscription ratio.
"Check if contract contains equipment category, equipment archetype or equipment.
Example:
contract_contains_equipment = infantry_equipment"
check controller for province
check controller for state(s)
A trigger to check convoy threat for a country. Controlled by NAVAL_CONVOY_DANGER defines. Returns a value between 0 and 1. Example convoy_threat > 0.5
Compares the core (average of all occupied states) compliance value of occupied_country_tag that is occuppied by the country in current scope.
Example:
core_compliance = {
occupied_country_tag = ITA
value > 35
}
Compares the core (average of all occupied states) resistance value of occupied_country_tag that is occuppied by the country in current scope.
Example:
core_resistance = {
occupied_country_tag = ITA
value > 35
}
Returns true if the specified number of sub-triggers return true
count_triggers = { amount = 2 <trigger> <trigger> <trigger> }
check if the specified country exist
Checks the current conscription amount of the country.
An AND trigger that has an overriden custom tooltip.
A positive tooltip can be set with tooltip and the tooltip to be used inside a NOT can be set with not_tooltip.
If no positive tooltip is provided and the root key is a localization key (not a formatter, see formatted localization),
then a negative tooltip will be generated by appending _NOT to the root localization for the positive tooltip.
Both tooltip and not_tooltip are bindable localizations.
custom_override_tooltip = {
tooltip = MY_TOOLTIP # Simple loc key tooltip
not_tooltip = MY_TOOLTIP_NOT
<other triggers>
}
custom_override_tooltip = {
tooltip = MY_TOOLTIP
# Implicit:
#not_tooltip = MY_TOOLTIP_NOT
<other triggers>
}
custom_override_tooltip = {
tooltip = {
localization_key = MY_TOOLTIP # Root look key
IMPORTANT_QUESTION = { # ID IMPORTANT_QUESTION in MY_TOOLTIP will get value:
localization_key = MEANING_OF_LIFE # Root loc key in IMPORTANT_QUESTION
ANSWER = "42" # ID ANSWER in IMPORTANT_QUESTION will get value 42
}
JUST_AS_IMPORTANT = OR_NOT # ID JUST_AS_IMPORTANT in MY_TOOLTIP will get value OR_NOT
}
# Implicit:
# not_tooltip = {
# localization_key = MY_TOOLTIP_NOT
# IMPORTANT_QUESTION = {
# localization_key = MEANING_OF_LIFE
# ANSWER = "42"
# }
# JUST_AS_IMPORTANT = OR_NOT
#}
<other triggers>
}
Alias for custom_override_tooltip trigger (see that trigger for more info). Kept for backward compatibility. Prefer custom_override_tooltip instead.
checks for a specific date
Checks the number of days since the country last capitulated, even if it is no longer capitulated.
If it has not ever capitulated, the value is extremely large.
It is recommended to combine this with has_capitulated = yes when you specifically want to ignore non-active capitulations.
Examples:
HOL = { has_capitulated = yes days_since_capitulated > 60 } # The Netherlands has been capitulated for more than two months
FRA = { has_capitulated = yes days_since_capitulated < 21 } # France has capitulated sometime within the past three weeks
GER = { OR = { has_capitulated = no days_since_capitulated > 14 } } # Germany is not both actively and recently capitulated
Checks the days since last strategic bombing.
days_since_last_strategic_bombing < 10
Check value of purchase contract completion. Example: deal_completition < 0.6
checks decryption ratio against a country. Example:
decryption_progress = {
target = GER
value > 0.5
}
#or decryption_progress@GER as variable
Compares defense skill level of a unit leader.
Example: defense_skill_level > 5
check if the difficulty is above or below specified value 0-2 (difficulty enum). Example: difficulty > 0 (above easy)
check if we have digin level (lowest)
check distance between two states
Divies a temporary variable by a value or another variable
Example: divide_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
}
checks if division template has the subunit type.
checks if division template has majority of subunit type.
checks for amount of divisions in specified state owned by current country.
checks for amount of divisions in specified state owned by current country.
divisions_in_state = {
state = state_id
size > 42
type = unit type eg. infantry, armor (optional)
unit = specific unit eg. mountaineers, light_tank (optional)
}
Compares the estimated navy strength between the scope country and all its enemies
Compares the estimated army strength between the scope country and all its enemies
Compares estimated max armor based on intel. Example: estimated_intel_max_armor = { tag = ITA value > 1 }
Compares estimated max armor based on intel. Example: estimated_intel_max_piercing = { tag = ITA value > 1 }
Check if the current country exist. The country of the scope you are in. Example: DEN = { exists = yes }
check if fastest unit of combatant is over this limit
Compares the total army fighting strength between the scope country and the one set with 'tag'
Example 1:
fighting_army_strength_ratio = {
tag = TAG
ratio > 0.7 # can be '<','>' or '='
}
Example 2:
fighting_army_strength_ratio = {
tag = TAG
ratio > VARIABLE # can be '<','>' or '='
}
Runs a loop on for each element of an array, finds the highest value and stores result in temp variables
Example: find_highest_in_array = {
array = array_name
value = value_name #optional (default 'v') highest value in array will be stored in this temp variable
index = index_name #optional (default 'i') index of highest value in array will be stored in this temp variable
}
Runs a loop on for each element of an array, finds the lowest value and stores result in temp variables
Example: find_lowest_in_array = {
array = array_name
value = value_name #optional (default 'v') lowest value in array will be stored in this temp variable
index = index_name #optional (default 'i') index of lowest value in array will be stored in this temp variable
}
checks focus progress example:
focus_progress = { focus = id progress > 0.5 }
check the amount of foreign garrison manpower we have
checks building for available construction levels
free_building_slots = {
building = building_type
size > 5
include_locked = yes # Optional - only to be used for buildings using Shared Slots.
province = 42 #will check province buildings if specified
}
check if sides front is full or can get more reinforcements
Compares the fuel ratio to a variable.
Example: fuel_ratio > 0.5
Returns true if all of the active game rule options allow achievements.
check the amount of manpower needed by garrisons
calculates the highest scored country that is defined in a country scorer and sets it to a variable. Example:
get_highest_scored_country_temp = {
scorer = scorer_id
var = var_name # variable name that the result will be stored. default is highest_scored_country
}
calculates & sorts all countries in a country scorer and stores them and their scores in temp arrays. Example:
get_sorted_scored_countries_temp = {
scorer = scorer_id # id that is used in country scorer array = array_name # a name to store sorted countries as a temp array (default to sorted_country_list)
scores = array_name # corresponding score temp array for countries stored in array (default to country_list_scores)
}
sets a temp variable to the number of supply vehicles in stockpile or that are needed. example
get_supply_vehicles_temp = {
var = num_vehicles #variable to set
type = truck #can be truck or train
need = yes #default no. If yes, gets the number of needed vehicles
}
check if country gives military access to specified country
check lowest/highest hardness level on combatant
does unit leader have the abilityCheck if a unit leader has the ability.
Example: has_ability = force_attack
check if country has an active mission with specified ID. has_active_mission = my_test_mission
returns true if state has an active resistance (above zero)
Compare if the country has added above or below the specified ammount of tension
has_advisor_role = 'character_slot_name' - Checks if the character in scope has an advisor role for the given slot
Compares current country's air experience with right side value.
has_air_experience < <value>
has_air_ledger = yes/no - Checks if the current character has an air ledger
Checks if country has allowed ideas with specific traits more than limit. Example:
has_available_idea_with_traits = {
idea = head_of_intelligence # trait names. can be a list of traits in { }
limit = 1
characters = yes/no - only runs this trigger on characters
ignore = generic_head_of_intelligence # if specified, these ideas will be ignored. can be a list of ideas in { }
}
Checks a country has annex war goal on another country
Returns true if the game has any custom difficulty on
Country has any active licenses
Example: has_any_license = yes
checks if country has any active power balance
Example:
has_any_power_balance = yes/no
Compares current country's army experience with right side value.
has_army_experience < <value>
has_army_ledger = yes/no - Checks if the current character has an army ledger
checks for amount of manpower of selected type, additionally of a specified type
checks for amount of divisions, additionally of a specified type
"Check that ratio of atrillery battalions in the composition of a side of combating troops are over a certain level.
For example:
has_artillery_ratio > 0.1"
Has attachΘ from any other country
Has attachΘ from specified country
check if country currently has an autonomy state, example:
has_autonomy_state = puppet
Checks if country has available ideas with specific traits more than limit. Example:
has_available_idea_with_traits = {
idea = head_of_intelligence # trait names. can be a list of traits in { }
limit = 1
characters = yes/no - only runs this trigger on characters
ignore = generic_head_of_intelligence # if specified, these ideas will be ignored. can be a list of ideas in { }
}
check value of bombing malus to war support 0-1: Example has_bombing_war_support < 0.1
Checks if a there is any border wars for country/state
Checks if a there is a border war between two states
Checks if a there is a border against a state/country
"Checks if the country in scope has enough breakthroughs within a given specialization.
specialization = <specialization_token>
value = <point>
ex: GER = {
has_breakthrough_points = {
specialization = specialization_nuclear
value = 1
}
}
"
checks country has built a set number (at least) of a certain type of building since taking goal
has_built = {
type = building_type
value = 42
}
checks if the country has capitulated
Checks if a country has a captured an operative ( supports scoped variables )
has_captured_operative = GER/yes/no
Check if carrier has airplanes that are part of the current combat
check if side has a career with air wings on a mission
check value of casualties malus to war support 0-1: Example has_casualties_war_support < 0.1
"Check that ratio of cavalry battalions in the composition of a side of combating troops are over a certain level.
For example:
has_cavalry_ratio > 0.5"
Returns true if scoped country has character.
Example:
has_character = GER_erwin_rommel
has a character flag been setCheck flag val date set and days since set.
Example: has_unit_leader_flag = test_flag
has_character_flag = {
flag = <name> (mandatory)
value < <int> (optional)
date > <date> (optional)
days > <int> (optional)
}
check if participant in civil war as revolter or target
checks the collaboration in a target country with our currently scoped country. Example:
has_collaboration = {
target = GER
value > 0.5
}
#or has_collaboration@GER as variable
check if combatant has modifier
"Return true if the input achievement is found in currently loaded mods, and if this achievement has been completed (either in current game or in a previous one)
Example:
has_completed_custom_achievement = {
mod = my_mod_unique_id # set in common/achievements files
achievement = my_achievement_token
}"
has country completed focus
Checks if a state has the specified country as a contested owner.
The trigger can be used either from a country or a state scope and accepts the other as parameter.
The trigger is localized with a localization environment containing Country and State.
The following example has the same end result and localization.
42 = {
has_contested_owner = GER
}
GER = {
has_contested_owner = 42
}
Standard scope accessors can also be used:
### Assuming current scope is a state and FROM is a country scope
has_contested_owner = FROM
check value of convoys sunk malus to war support 0-1: Example has_convoys_war_support < 0.1
has an occupation modifier that applies to average resistance/compliance
Example:
has_core_occupation_modifier = {
occupied_country_tag = ITA
modifier = token
}
Checks if country has specific cosmetic tag set.
Example: INS = { has_cosmetic_tag = INS1 }
Returns true if the game has any custom difficulty on the scope nation
has country flag been set.Check flag val date set and days since set.
Example: has_country_flag = test_flag
has_country_flag = {
flag = <name> (mandatory)
value < <int> (optional)
date > <date> (optional)
days > <int> (optional)
}
check if country has leader with specified ID. Don't localize this. Tooltip only for debug.
has_country_leader = {
ruling_only = yes/no (default = yes)
character = <string> # recommended criteria
name = <string> # alternative criteria
id = <ID> # alternative criteria
}
Checks the Ideology of the active country leader
check if current country leader has specified trait.
has_country_leader_with_trait = big_fat_idiot
Returns true if the game has the specified custom difficulty on:
Example: has_custom_difficulty_setting = TheAxisIndustry
check for damaged buildings of nation
check if country has active selected decision
is country at defensive war
One country has defensive war against other country.
checks for amount of aircrafts, additionally of a specified type
check if country has a buildable non-obsolete design based on an archetype
Checks if player has a DLC.
Example: has_dlc = "name of the dlc"
has country done this intelligence agency upgrade (to its highest level)
Checks if scope has a dynamic modifier.
has_dynamic_modifier = {
modifier = dynamic_modifier_name
scope = GER #optional, if the original modifier has been targeted
}
Checks the country's politics on allowing elections. has_elections = yes
checks for amount of equipment stored
checks if current scope or global scope has the specified event target saved
"Checks if the country in scope has a facility with specialization.
ex:
SOV = {
has_facility_specialization = specialization_nuclear
}"
checks if finished collecting of resources for an operation.
Example:
has_finished_collecting_for_operation = {
target = ITA
operation = operation_infiltrate_armed_forces_navy}
check if side has flanked their opponent
Does current country have the specified focus tree.
check amount of fuel
example:
has_fuel > 500
check controller for state(s)
Checks if a game rule is set to a particular option.
Example:
has_game_rule = {
rule = GER_can_remilitarize_rhineland
option = yes
}
has global flag been set.Check flag val date set and days since set.
Example: has_global_flag = test_flag
has_global_flag = {
flag = <name> (mandatory)
value < <int> (optional)
date > <date> (optional)
days > <int> (optional)
}
does country government (ruling party) belong to ideology group
check if country has guaranteed specified country
check unit leader has specified ID. Don't localize this. Tooltip only for debug.
check if country has idea
check if country has idea with specified trait
has_ideology = stalinism - Checks if the current character has a country leader role matching the sub-ideology
has_ideology_group = communism - Checks if the current character has a country leader role matching the ideology group
has country created an Intelligence Agency
Check scope country legitimacy 0-100: Example has_legitimacy < 60
Country has specific active license
Example: has_license = {
from = TAG # has license from this country, optional
#if archetype is specified equipment should not be specified
archetype = light_tank_equipment #any armor license
equipment = { # classical equipment reference
type = light_tank_equipment_2
version = 0
}
}
check amount of manpower
check if manpower is enough to switch recruitment laws not to be negative
Check if the country has market access with another country. Example: has_market_access_with = GER
check if side has maximal planning bonus
check country has military access to specified country
"Checks if the Country in scope has a Military Industrial Organisation matching the input token.
Can use variable as input.
ex:
GER = {
has_military_industrial_organization = infantry_mio_token
has_military_industrial_organization = var:my_mio_var
}"
Checks the mines planted by the country of the parent scope on the coastline of the target countryE.g. true if Germany has more than 1000 mines around Poland coast:
GER = {
has_mined = {
target = POL
value > 1000
}
}
Checks if a region has amount of mines.
has_mines = {
region = region_id
amount = amount_of_mines
}
"Checks if the Military Industrial Organisation in scope has the input equipment type.
(possible values can be found in script_enum_equipment_bonus_type and in common/equipment_groups)
ex:
mio:my_mio = {
has_mio_equipment_type = my_equipment_type_token
}"
"Check if flag has been set within the military industrial organization in scope.
May checks on the value or date/days since last modified date.
Examples:
has_mio_flag = my_flag
has_mio_flag = {
flag = my_flag (mandatory)
value < 12 (optional)
date > 1936.3.25 (optional, compare with the date where the flag was last modified )
days > 365 (optional, compare with the number of days since the flag was last modified )
}"
"Make comparaison on the number of unlocked traits of the military industrial organization in the scope.
Can use < or > to compare the value with either a fixed value or from a variable.
ex:
var:my_mio_var = {
has_mio_number_of_completed_traits > 5
has_mio_number_of_completed_traits < 2
has_mio_number_of_completed_traits > var:my_number_var
}"
"Checks if the Military Industrial Organisation in scope has an allowed policy matching the input token.
ex:
mio:my_mio = {
has_mio_policy = my_policy_token
}"
"Checks if the Military Industrial Organisation in scope has an allowed matching the input token, which is currently attached to the MIO.
ex:
mio:my_mio = {
has_mio_policy_active = my_policy_token
}"
"Checks if the Military Industrial Organisation in scope has the input research category.
ex:
mio:my_mio = {
has_mio_research_category = my_research_category_token
}"
"Make comparaison on the size of the military industrial organization in the scope.
Can use < or > to compare the value with either a fixed value or with a variable.
ex:
var:my_mio_var = {
has_mio_size > 5
has_mio_size < 2
has_mio_size > var:my_number_var
}"
"Checks if the Military Industrial Organisation in scope has a trait matching the input token.
ex:
mio:my_mio = {
has_mio_trait = my_trait_token
has_mio_trait = {
trait = my_trait_token
}
}"
Checks whether the operative has the specified nationality.
NOTE: this is invalid on non-operatives.
Examples:
has_nationality = GER
Check if the scoped country has a naval invasion against the specified state.
Example 1:
has_naval_invasion_against_state = <STATE_ID>
Example 2:
has_naval_invasion_against_state = {
state = <STATE_ID>
preparation > 0.0 # (optional: preparation percentage, with a default value of 0.0)
activated = no # (optional: if set, also check if invasion is activated or not)
}
Compares current country's navy experience with right side value.
has_navy_experience < <value>
has_navy_ledger = yes/no - Checks if the current character has a navy ledger
Checks for amount of ships, additionally of a specified type, archetype, or sub unit definition.
Examples:
has_navy_size = { size > 10 type = convoy } # Must have more than 10 convoys.
has_navy_size = { size < 1 archetype = ship_hull_light } # Must not have any ships with light hulls.
has_navy_size = { size > 39 unit = heavy_cruiser } # Must have 40 or more heavy cruisers.
has_navy_size = { size < 100 } # Must have fewer than 100 ships of any type.
Check if country has non aggression pact with the specified country
compares occupied country that creates resistance to a tag. Example: has_occupation_modifier = modifier_name
is country at offensive war
One country has offensive war against other country.
"checks if division has an officer with the provided name key.
Examples:
has_officer_token = FIN_nikke_parmi
"
Checks if a country has a specific token against another country
has_operation_token = {
tag = GER
token = some_token_id
}
check what opinion the country has towards a specified country
check if a country has the opinion modifier
check amount of political power
checks if power balance is active for country
Example:
has_power_balance = {
id = power_balance_id
}
checks if the power balance has a modifier added to it
Example:
has_power_balance_modifier = {
id = power_balance_id
modifier = static_modifier_id
}
"Check if flag has been set within the special project in scope.
May checks on the value or date/days since last modified date.
Examples:
has_project_flag = my_flag
has_project_flag = {
flag = my_flag (mandatory)
value < 12 (optional)
date > 1936.3.25 (optional, compare with the date where the flag was last modified )
days > 365 (optional, compare with the number of days since the flag was last modified )
}"
Checks for an existing rail connection. Uses same params as can_build_railway. Example:
has_railway_connection = {
build_only_on_allied = yes # No by default. If yes and the effect scope is country, it will only build on allied territories for the country
# The following options are used for picking a path. You can specify multiple options and it will pick in following order:
fallback = yes # Default no. If yes, each option will try to fallback to next one.
# option 1: List of provinces to draw railways. If fallback = yes uses start and end provinces of the path as fallback in option 2.
path = { 10 20 30 40 }
# option 2: Specify start & end province IDs. It will pick the shortest path. If provinces are not valid and if fallback = yes it will use states of those provs and use in option 3.
start_province = 42
target_province = 84
# option 3: Specify start & end state IDs. It will pick provinces with the best node (capital > nodes > naval )
start_state = 50
target_state = 100
}
Checks if a state contains a railway at or above the specified level. Example:
has_railway_level = {
level = 3
state = 1234
}
Country has specified relation modifier when dealing with _target_ county
Example: has_relation_modifier = {
target = TAG # has license from this country, optional
modifier = static_modifier_here
}
}
check if side has reserves waiting
returns true if state has a resistance
checks for amount of resources in state
Example:
has_resources_amount = {
resource = chromium
amount > 10
state = 31 (optional - can be used in state scope instead)
delivered = no # (optional, default: no) check the actual delivered amount from the state to its controller, with all modifiers applied
checks for amount of resources in country (the balance by default)
Example:
has_resources_in_country = {
resource = chromium
amount > 10
extracted = no # (optional, default: no) checks extracted amount instead of country balance
buildings = no # (optional, default: no) checks only amount from local buildings instead of country balance
Checks for resources rights in state.Warning! this always returns false if the state has no resource.
Example:
has_resources_rights = {
state = 60 # optional - can be used in state scope instead
receiver = GER # optional - can be used in country scope instead
resources = {steel oil} # optional - if not provided checks all resources.
Checks if a rule set for a country.
Example: has_rule = can_puppet
"Checks if the scientist of the character in scope matches the skill level condition for a specialization. Supports < > = operators.
level = <int>
specialization = <specialization_token>
ex: my_character = {
has_scientist_level = {
level > 2
specialization = specialization_nuclear
}
}
"
"Checks if the country in scope has a scientist with a skill level of at least 1 in specialization.
ex:
SOV = {
has_scientist_specialization = specialization_nuclear
}"
Check if country has shine effect on focus (either manually achieved or by being worked on).
Note that tooltips are only shown in debug mode.
has_shine_effect_on_focus = GER_prioritize_economic_growth
check value of stability 0-1: Example has_stability < 0.6
Compare the initial start date of current game.
Check if state has a specific state category
has state flag been setCheck flag val date set and days since set.
Example: has_state_flag = test_flag
has_state_flag = {
flag = <name> (mandatory)
value < <int> (optional)
date > <date> (optional)
days > <int> (optional)
}
Checks if the country has for subject the given country
check if country has technology
checks if the country has a bonus for the specified technology or category
Example:
has_tech_bonus = {
technology = <tech>
category = <tech cat>
}
Check if country has a division template of specific name
check if country has a division template that is majority of specific unit using AI's priorities rather than visual
check if country has a division template that contains a specific unit
check if country has a division template that is majority of specific unit
Checks if a country has any province of the specified terrain type.
Example: has_terrain = mountain
check if sides leader has trait
has_truce_with = yes/no - Checks if the country has truce with the specified country
check if country has unit leader with specified ID. Don't localize this. Tooltip only for debug.
This trigger is deprecated in favor of has_character_flag (which does the same)has a character flag been setCheck flag val date set and days since set.
Example: has_unit_leader_flag = test_flag
has_unit_leader_flag = {
flag = <name> (mandatory)
value < <int> (optional)
date > <date> (optional)
days > <int> (optional)
}
"Check if the combatant has at least one of the provided unit types.
For example:
has_unit_type = amphibious_mechanized
"
Checks if a variable exists in a scope
Compares number of volunteers from the country. Example: has_volunteers_amount_from = { tag = ITA count > 1 }
is country at war
check value of war_support 0-1: Example has_war_support < 0.6
Are the countries fighting on the same side of a war
is countries at war
is country at war with a major
Checks if country has a war started with a wargoal against the target.
Example 1:
has_war_with_wargoal_against = {
target = GER
type = take_state # (optional: if not specified any wargoal will do)
}
Example 2:
has_war_with_wargoal_against = GER # (any wargoal will do)
Checks if country has a wargoal against the target.
Example 1:
ENG = { has_wargoal_against = GER }
Example 2:
ENG = {
has_wargoal_against = {
target = GER
type = take_state # (optional: if not specified any wargoal will do)
}
}
a hidden trigger, anything in it not shown in tooltips
Compares the ratio of total industrial capacity between the scope country and the one set with 'tag'
Checks if the current scope has the specified ideology above the specified amount.
Usage: <Ideology> < <float>
Supported Ideologies: democratic, communism, fascism, neutrality.
if_, CIfTrigger, A conditional trigger
if = { limit = { <triggers> } <trigger> }
checks if a state is impassable
Compare the absolute, percentage based, intel level the scoped country has over
the specified one:
GER = {
# is true if all predicates are satisfied
intel_level_over = {
target = POL
civilian_intel > 0.5 # GER has more than 50% civ. intel over POL
army_intel = 0 # GER has no army intel over POL
navy_intel > 0 # GER has at least some navy intel over POL
# airforce_intel is not specified and thus ignored in the comparison
# NOTE: since we are comparing the intel level of a country over another,
# checking for values less than 0 does not make sense
# NOTE: since we are comparing percentages, using values greater than 1
# does not make sense.
}
}
checks if the country activated their active cipher decryption bonuses. Example is_active_decryption_bonuses_enabled = GER
"Checks if the scientist of the character in scope is assigned to a project
is_scientist_active = <bool>
ex: my_character = {
is_scientist_active = yes
is_scientist_active = no
}
"
is_advisor = yes/no - Checks if the current character is an advisor
Checks if country is AI controlled.
_is_air_chief = yes/no - Checks if the character in scope is hired as an air chief
checks if a country is ally with another country. will check if two countries are same/in same faction/has subject master relation
Example: is_ally_with = ITA
check if combat is at night
is_army_chief = yes/no - Checks if the character in scope is hired as an army chief
is_army_leader = yes/no - Checks if the current character is a army leader
is_assigned = yes/no - Checks if the current unit leader is assigned to command an army/navy
check if attacker side in combat
checks if a state is in border conflict
Checks if a the combatant or leader has a border war
Is scope state a capital. 169 = { is_capital = yes }
Checks whether the character in scope matches the character in input
alias of has_advisor_role
Checks if state is claimed by country
check if state is coastal
check if state is controlled by
Checks if state is core of country
is_corps_commander = yes/no - Checks if the current character is a corps commander
is_country_leader = yes/no - Checks if the current character is a country leader
has country an active cryptology department
returns true if game is in debug mode (launched with -debug argument)
checks if is currently decrypting a cipher. Example is_decrypting = GER
check if defender side in combat
checks if a state is a demilitarized zone
returns true if the country is a dynamic country (tag is D01-D50)
check if embargoed by specified country
check if country is embargoing specified country
Checks if scope country is hosting an exile. is_exile_host = yes
Checks if scope country is a government in exile in target tag. is_exiled_in = ENG
Checks if scope leader is from an exiled government. is_exiled_leader = yes
Checks if scope leader is from specified exiled government. is_exiled_leader_from = FRA
check if country leads a faction
checks if scoped unit leader, ace or country is female
is_field_marshal = yes/no - Checks if the current unit leader is a field marshall
check if side is fighting air units
check what terrain is in combat
Checks the weather on a combat
Example:
# true if weather is artic water
is_fighting_in_weather = artic_water
# true if weather is either artic_water or snow
is_fighting_in_weather = { artic_water snow }
Checks if state is fully controlled by specified tag
checks if fully decrypted a cipher. Example is_fully_decrypted = GER
Checks if scope country an exiled government. is_government_in_exile = yes
check if guaranteed by specified country
_is_high_command_ = yes/no - Checks if the character in scope is hired as high command
is_hired_as_advisor = yes/no - Checks if the current character has at least one advisor role for which they are hired
check if the historical focus is active
Checks if scope country is hosting target tag as an exile. is_hosting_exile = FRA
Checks if an element is in array
Example: is_in_array = {
array = array_name
value = 42
}
#shorter usage: is_in_array = { array_name = 42 }
check if member of any faction
check if member of same faction as specified country
Checks if the first province in the state is connected to the capital of its owner
Checks if the country is currently in a peaceconference
Checks if country is member specified technology sharing group.
Example: is_in_technology_sharing_group = commonwealth_research
Check if current game is ironman.
"return true if the state is composed exclusively of one-province-islands.
More precisly, all provinces in the state have no land neighbor.
Or if they do they are connected by a strait.
(cf. is_one_state_island for checking if the state itself is an island)
ex: 145 = {
is_island_state = yes
is_island_state = no
}"
Checks if country is justifying a wargoal against the target.
Example: ENG = { is_justifying_wargoal_against = GER }
is_leading_army = yes/no - Checks if the current unit leader is leading a single army (not army group)
is_leading_army_group = yes/no - Checks if the current unit leader is leading an army group (not single army)
is_leading_volunteer_group = FRA
is_leading_volunteer_group_with_original_country = FRA
is lend-leasing country
Current country is licensing something to target country
Example: is_licensing_any_to = ENG
Country is licensing specific equipment to target. License is active
Example: is_licensing_to = {
target = TAG # licensing to this country
#if archetype is specified equipment should not be specified
archetype = light_tank_equipment #any armor license
equipment = { # classical equipment reference
type = light_tank_equipment_2
version = 0
}
}
check if country is a major
"Checks if the Military Industrial Organisation in scope matches the input token
ex:
var:my_mio_var = {
is_military_industrial_organization = my_mio_token
}"
"Checks if the Military Industrial Organisation in scope is assigned to at least 1 task.
ex:
mio:my_mio = {
is_mio_assigned_to_task = yes
is_mio_assigned_to_task = no
}"
"Checks if the available AND visible triggers in the Military Industrial Organisation in scope return true.
ex:
mio:my_mio = {
is_mio_available = yes
is_mio_available = no
}"
"Checks if the Military Industrial Organisation in scope has a trait matching the input token, which is also available.
ex:
mio:my_mio = {
is_mio_trait_available = my_trait_token
is_mio_trait_available = {
trait = my_trait_token
check_mio_parent_completed = no # Optional, yes by default
check_mio_mutually_exclusive = no # Optional, yes by default
}
}"
"Checks if the Military Industrial Organisation in scope has a trait matching the input token, which is also completed.
ex:
mio:my_mio = {
is_mio_trait_completed = my_trait_token
is_mio_trait_completed = {
trait = my_trait_token
}
}"
"Checks if the visible trigger in the Military Industrial Organisation in scope returns true.
ex:
mio:my_mio = {
is_mio_visible = yes
is_mio_visible = no
}"
_is_navy_chief_ = yes/no - Checks if the character in scope is hired as a navy chief
is_navy_leader = yes/no - Checks if the current character is a navy leader
check if neighbor ( controlled territory ) with specified country
is state located on continent
"return true if the state is a one-state-island.
More precisely, all provinces in the state have no land neighbor.
Or if they do they are connected by a strait or the neighbor is inside the state.
ex: 145 = {
is_one_state_island = yes
is_one_state_island = no
}"
checks the type of operation
is_operative = yes/no - Checks if the current character is an operative
Checks whether the operative has the matching captured status
check if state is owned by
check if state is owned by
check if neighbor ( owned territory ) with specified country
is_political_advisor = yes/no - Checks if the character in scope is hired as a political advisor
checks if current value power balance is within a certain range
Example:
is_power_balance_in_range = {
id = power_balance_id
range = power_balance_range_id
}
checks if specified side is currently active
Example:
is_power_balance_side_active = {
id = power_balance_id
side = side_id
}
checks if preparing a specific operation.
Example:
is_preparing_operation = {
target = ITA
operation = operation_infiltrate_armed_forces_navy}
Checks if the country is puppet of any other country
Checks if the country is puppet of specified country
Checks if the country is currently researching a specific technology.
Example: is_researching_technology = mechanised_infantry
checks if running a specific operation. operation can be ommitted to check for any operation
Example:
is_running_operation = {
target = ITA
operation = operation_infiltrate_armed_forces_navy}
"Checks if the scientist of the character in scope is injured
is_scientist_injured = <bool>
ex: my_character = {
is_scientist_active = yes
}
"
"Checks if the country in scope is currently researching the special project in input.
ex:
SOV = {
is_special_project_being_researched = sp:my_project
is_special_project_being_researched = var:my_project_var
is_special_project_being_researched = PREV # accepts variables and keywords
}"
"Checks if the country in scope has completed the special project in input.
ex:
SOV = {
is_special_project_completed = sp:my_project
is_special_project_completed = var:my_project_var
is_special_project_completed = PREV # accepts variables and keywords
}"
check if country is Spy Master
is_staging_coup = yes - Returns true if current country is staging a coup in another any country.
Checks if the country is subject of any other country
Checks if the country is subject of specified country
is_target_of_coup = yes - Returns true if current country is being targeted by a coup from any country.
is_theorist = yes/no - Checks if the character in scope is hired as a theorist
check if the tutorial is active
is_unit_leader = yes/no - Checks if the current character is a unit leader
returns true if this unit's template has the reserves priority
check if defender side in combat
checks researched land doctrine level
check if side has more combat width than their opponent
Print message to game.log - Can be localized
Compares logistics skill level of a unit leader.
Example: logistics_skill_level > 5
Check number of months the country has been at war
Number of available manpower per factory the country has. Excluding dockyards.
manpower_per_military_factory < 1000
meta triggers can be used for building triggers from strings and running them. following example will test if Germany has 42 pp:
meta_trigger = {
text = {
[COUNTRY] = {
political_power > [POW]
}
}
COUNTRY = "GER"
POW = 42
debug = no #set to yes if you want to see what game actually executes
}
check if side has maximal planning bonus
A trigger to check how dangerous enemy mines are for a country. Controlled by NAVAL_MINE_DANGER defines. Returns a value between 0 and 1. Example mine_threat > 0.5
modulos a temp variable with another. Example:
modulo_temp_variable = {
var = variable_to_modulo
value = divisior
}
Multiplies a temporary variable by a value or another variable
Example: multiply_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
}
Compares navies of two sides.
naval_strength_comparison = {
other = GER # by default compares to the from scope
tooltip = 'key' #tooltip is 'navy strength' by default, the key can be overridden if wanted
ratio > 1.5 # default is 1
sub_unit_def_weights = { # if not specified, it will weigh all ships as 1. otherwise only specified sub unit types will be counted
carrier = 1
battleship = 2
}
}
Compares the estimated navy strength between the scope country and the one set with 'tag'
naval_strength_ratio = {
tag = GER
ratio > 0.5
}
checks network national coverage you have over a country. Example:
network_national_coverage = {
target = GER
value > 0.5
}
checks network strength you have in a country. Examples:
# country has a network strength greater than 50% over germany
network_strength = {
target = GER
value > 50
}
# country has a network strength greater than 50% over germany in state 53
network_strength = {
target = GER
state = 53 value > 50
}
# country has a network strength greater than 50% in state 53, regardless of the target
network_strength = {
state = 53
value > 50
}
check if combat is at night
check if a state has enough non damaged buildings
Example:
non_damaged_building_level = {
building = arms_factory
level = 5
}
negates content of trigger
not_already_hired_except_as = <slot> - For characters with several advisor roles, checks if the current character is already assigned in another advisor slot.
example: let's say a character can be a political advisor and a theorist. But they should only be hired in one role, never both at the same time.
then you may set in the advisor available trigger :
advisor = {
slot = political_advisor
available = { not_already_hired_except_as = political_advisor }
...
}
advisor = {
slot = theorist
available = { not_already_hired_except_as = theorist }
...
}
Checks number of battalions in states (optionally filtering on battalion types). Using a custom tooltip is highly recommended since the default tooltip leaves out some information for the sake of readability.
Example:
num_battalions_in_states = {
count > 5 (or <, =)
states = { 550 559 }
types = { infantry cavalry } [optional - will count all except excluded if not specified]
exclude = { light_armor } [optional - will count all (included) if not specified]
}
Will compare towards the amount of divisions a country has control over, if strength matters use has_army_size.
Checks number of divisions in states (optionally filtering on majority division types). Using a custom tooltip is highly recommended since the default tooltip leaves out some information for the sake of readability.
Example:
num_divisions_in_states = {
count > 5 (or <, =)
states = { 550 559 }
types = { infantry cavalry } [optional - will count all except excluded if not specified]
exclude = { light_armor } [optional - will count all (included) if not specified]
}
Compares the number of members in the faction for the current country.
Example: num_faction_members > 10
Will compare towards the amount of fake intel divisions a country has control over. .
Compares number of completed operations.
Example:
num_finished_operations = {
target = ITA
operation = operation_infiltrate_armed_forces_navy value > 35
}
Checks the number of operative a country can recruit right now.
Note that this is not necessarily greater than zero if num_operative_slots returned a number greater than the number of operative.
total number of nukes that are currently ready to be dropped
number of nukes left to drop during this game tick (only useful in-between nuke drops, like in on_nuke_drop on-action, for example)
check the number of states occupied by nation
check amount of available civilian factories
check amount of available military factories
check amount of available naval factories
check amount of gained career points
check amount of civilian factories
check amount of civilian factories available for a new project to use
check the number of factories in controlled states excluding any gained or lost through trade, relations, modifiers etc.
check amount of controlled stats
Check amount of available factories (excluding temporary sources like trade and lend-lease)
Example:
GER = { num_of_factories < 50 }
check amount of military factories
check amount of naval factories
check amount of nukes
Checks the number of operatives the country controls
check the number of factories in owned states excluding any gained or lost through trade, relations, modifiers etc.
check amount of supply nodes
Checks the number of available operative slots a country has.
If this differs from the number of operative, this does not mean the country can recruit an operative, but that it will eventually be able to.
Checks if a country owns the amount of states neighbouring the scoped state
Will compare the number of planes which have bases in the specified regions. Supports < > =
Example: num_planes_stationed_in_regions = {
value < 100
regions = { 18 47 }
}
Number of researched technologies
check the number of subjects of nation
checks how many groups a nation is a member of
Check number of units commanded by the unit leader
num_units > 2
"Checks the occupation law for an occupied country, occupied state, or the default occupation law of an occupying country.
- If THIS is a country and it's the same as the PREV country, then THIS's default law is checked.
- If THIS is a country and it's different from the PREV country, then PREV's country law for THIS is checked.
- If THIS is a state, then the occupier's state law is checked.
Example:
GER = { occupation_law = autonomous_occupation }
GER = { POL = { occupation_law = foreign_civilian_oversight } }
123 = { occupation_law = local_police_force_garrison }"
compares occupied country that creates resistance to a tag. Example: occupied_country_tag = ITA
Checks whether the operative is performing the given mission:
operative_leader_mission = build_intel_network
Checks whether the operative is performing the given operation:
operative_leader_operation = operation_rescue_operative
at least one entry inside trigger must be true
check number of research slots at start of game
original tag is ( for civil wars checks )
Check if the country owns any of the states in the list.
check owner for state(s)
Checks country's total peace conference score. Only usable if the country is on the winning side.
Example:
CZE = { pc_current_score > 400 }
Checks if state got demilitarized stacked on it in the peace conference.
Example:
FROM.FROM.FROM = { pc_does_state_stack_demilitarized = yes }
Checks if state got dismantled stacked on it in the peace conference.
Example:
FROM.FROM.FROM = { pc_does_state_stack_dismantled = yes }
Checks if country has had their government force-changed in the peace conference.
Example:
CZE = { pc_is_forced_government = yes }
Checks if country has had their government force-changed by a certain country in the peace conference.
Example:
CZE = { pc_is_forced_government_by = GER }
Checks if country has had their government force-changed to a certain ideology in the peace conference.
Example:
CZE = { pc_is_forced_government_to = communism }
Checks if country has been liberated in the peace conference.
Example:
CZE = { pc_is_liberated = yes }
Checks if country is a loser in the peace conference.
Example:
ENG = { pc_is_loser = yes }
Checks if country is on same side (winning or losing side) as another country in the peace conference.
Example:
POL = { pc_is_on_same_side_as = ENG }
Checks if country is on the winning side in the peace conference.
Example:
CZE = { pc_is_on_winning_side = yes }
Checks if country is a puppet, or has been released as a puppet in the peace conference.
Example:
CZE = { pc_is_puppeted = yes }
Checks if country is a puppet of a certain country, or has been released as a puppet by a certain country in the peace conference.
Example:
CZE = { pc_is_puppeted_by = GER }
Check if state is claimed (and uncontested) in conferenceExample:
pc_is_state_claimed = yes/no
Check if state is claimed with a take_states action in conference for TAG
Example:
pc_is_state_claimed_and_taken_by = SOV/ROOT/ROOT.FROM
Check if state is claimed in conference by TAG
Example:
pc_is_state_claimed_by = SOV/ROOT/ROOT.FROM
Check if state is outside valid influence range for winner TAG in the current peace conference
Example:
pc_is_state_outside_influence_for_winner = SOV/ROOT/ROOT.FROM
Checks if country is a winner in the peace conference.
Example:
ENG = { pc_is_winner = yes }
Checks country's total peace conference score. Only usable if the country is on the winning side.
Example:
CZE = { pc_total_score > 400 }
Checks turn number in PC.
Example:
pc_turn > 20
check if we are in this combat phase
Compares planning skill level of a unit leader.
Example: planning_skill_level > 5
Checks if daily political power increase is more or less that specified value
political_power_daily > 1.5
Check the value of political power daily growth.Exacmple: political_power_growth > 0
compares current total daily change of a power balance
Example:
power_balance_daily_change = {
id = power_balance_id
value > 0.5 # supported operators are: >, < and =
}
compares current value of a power balance
Example:
power_balance_value = {
id = power_balance_id
value > 0.5 # supported operators are: >, < and =
}
compares current total weekly change of a power balance
Example:
power_balance_weekly_change = {
id = power_balance_id
value > 0.5 # supported operators are: >, < and =
}
prints all variables in scope and temp variables to a file
Example: print_variables = {
file = log_file
text = header_text
append = yes
print_global = yes
var_list = { a b c } #optional
}
"Check if the victory points of the combatants province is larger or less than the provinded amount.
For example:
province_vp > 2
province_vp < 3"
Checks that the country in scope has received the specified amount of expeditionary forces from the specified country
E.g. true if Germany is commaning more than 100 expeditionary forces from Poland:
GER = {
received_expeditionary_forces = {
sender = POL
value > 100
}
}
checks if side has an advantage in recon level
check state's strategic area id
Removes an element from a temporary array using value or index
Example: remove_from_temp_array = {
array = array_name
value = 42 #optional, use index or this. if neither it removes last element
index = 3 #optional, use value or this. if neither it removes last element
}
#shorter usage: remove_from_temp_array = { array_name = 42 }
check amount of reserves
Compares the current resistance level of a state to a value. Example: resistance > 50
Compares the current resistance speed of a state to a value. Example: resistance_speed > 50
Compares the target resistance level of a state to a value. Example: resistance_target > 50
Resizes a temp array
Example: resize_temp_array = {
array = array_name
value = 42 #optional, if not specified and array grows the new elements are set to this (default 0)
size = 3 #if higher than old size, new elements are added to end. otherwise last elements are removed to match to new size
}
#shorter usage: resize_temp_array = { array_name = 3 }
Checks if the current scope has the specified amount of the specified resource.
Usage: <Resource> < <int>
Supported Resources: oil, aluminium, rubber, tungsten, steel, chromium.
Rounds a temporary variable
Example: round_temp_variable = num_dogs
"Check if the current scope exist.
This differ from for example exists that checks if the country of the scope exists.
This checks if the scope for the country exists and the other if the country itself exists in the game.
Note that variable scopes are always valid scopes.
Example:
DEN = { exists = yes } # Should always be true since DEN is always a valid scope
sp:sp_land_flamethrower_tank = {
character = {
scope_exists = yes
}
} # True if the project has an assigned scientist.
var:my_var = {
scope_exists = yes # Always true since variables are always valid scopes
}
"
Check the seller country. Example: seller = GER
Sets a temporary variable to a value or another variable
Example: set_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
}
sets a temp variable to a random value. example
set_temp_variable_to_random = num_dogs #sets num_dogs a random value between [0, 1)
set_temp_variable_to_random = {
var = num_dogs #variable to set
min = 5 #default 0. value will be set in between [min, max)
max = 10 #default 1. value will be set in between [min, max)
integer = yes #default no. if yes the number value will be an integer
}
checks for amount of ships in specified area
checks for amount of ships in specified state's ports.
ships_in_state_ports = {
type = ship_category
state = state_id (or scopped variable)
size = 42
}
compare leader skill levels
compare leader skill levels
check state id
Checks for state strategic value
check the population in the state
check the population in the state in thousands (use to avoid variable overflows)
Checks for state strategic value
Compares the ratio of equipment archetype in stockpile vs used. a value of 2 means we have double in stockpile of what is fielded or in training.
Compares the estimated army strength between the scope country and the one set with 'tag'
Subtracts a value or a variable to a temporary variable
Example: subtract_from_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
}
check if a country is close to surrendering
country tag trigger
Checks the target conscription amount of the country.
check combat province temperature
check the global threat value (world tension). 0-1 value
Check scope unit organization status 0-1: Example unit_organization < 1
Check scope unit strength status 0-1: Example unit_strength < 1
Check number of months the country has been at war with X for Y months.
war_length_with = { tag = X months > Y }