Hands-On Usage
all_controlled_state is commonly used to check whether every state a country controls has reached a certain infrastructure level, compliance threshold, or other category-specific condition — for example, verifying "all territory is firmly occupied" inside victory-condition events or focus completion checks. It is especially useful when restricting decision availability (available) or gating a focus's completion conditions (the available block preceding completion_reward).
# Only allow the "Full Integration" decision to fire if every state
# this country controls has compliance above 50
available = {
all_controlled_state = {
compliance > 50
}
}
Synergy
- compliance — Checks the compliance value of each controlled state inside
all_controlled_state; this is the most typical pairing.
- is_fully_controlled_by — Often used as a prerequisite or parallel condition alongside
all_controlled_state, confirming that no enemy units are present in a state before making further checks.
- has_state_flag — Detects whether a specific flag has been set on each controlled state as the loop iterates, useful for tracking per-state progress.
- any_controlled_state (logical counterpart) — The corresponding trigger in the whitelist is
any_state; when designing logic it is common to contrast "all must match" with "at least one matches" to distinguish strict conditions from lenient ones.
Common Pitfalls
- Silent failure from wrong scope:
all_controlled_state can only be used inside a COUNTRY scope. If it is called directly inside a STATE scope — for instance, placed in a state event's trigger block without first switching scope to the owner — the game will either throw a scope error or silently skip the block, causing the condition to never be satisfied. Use OWNER = { all_controlled_state = { ... } } to switch to the correct country scope first.
- Confusing
all_controlled_state with all_owned_state: Controlled ≠ owned. States occupied by an enemy are still part of your country's owned states but are no longer in your controlled set. If the intent is to check "all territory," use the corresponding owned-series trigger instead; otherwise, during wartime this condition will silently exclude enemy-occupied states and produce results that differ from what was intended.