trigger · num_of_controlled_states
Definition
- Supported scope:
COUNTRY - Supported target:
THIS,ROOT,PREV,FROM,OWNER,CONTROLLER,OCCUPIED,CAPITAL
Description
check amount of controlled stats
num_of_controlled_statesCOUNTRYTHIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITALcheck amount of controlled stats
Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.
num_of_controlled_states is commonly used to determine whether a country has expanded to a sufficient size, thereby unlocking specific decisions, focus tree rewards, or event branches. For example, in major power overhaul mods, it can be used to restrict certain enhanced focuses so they are only available when the player actually controls a sufficient number of states.
# The focus can only be selected when the country controls at least 20 states
available = {
num_of_controlled_states > 19
}
[controls_state](/wiki/trigger/controls_state) — When you need to precisely check whether a few critical states are controlled, combine it with num_of_controlled_states to create a dual-condition threshold of "quantity + specific objectives."[any_controlled_state](/wiki/trigger/any_controlled_state) — Used to iterate through currently controlled states and filter objects matching sub-conditions. Pair it with num_of_controlled_states for a preliminary quantity check to avoid unnecessary iteration overhead.[every_controlled_state](/wiki/effect/every_controlled_state) — Before executing batch operations on all controlled states in the effects phase, use num_of_controlled_states as a quantity gate to prevent logic errors when a country controls too few states.[has_country_flag](/wiki/trigger/has_country_flag) — Use country flags to mark expansion milestones, and combine with this trigger to build a growth chain: "reach X states → set flag → unlock next phase."num_of_owned_states (if it exists) or all_owned_state logic as a substitute.num_of_controlled_states = 10 directly performs an exact equality check, but most real scenarios require an "at least" condition. Write num_of_controlled_states > 9 or the corresponding >= syntax instead. Omitting or misspelling the operator will cause the condition to fail in the vast majority of cases.