Hands-On Usage
all_owned_state is commonly used to check whether every state owned or occupied by a country meets a given condition — for example, verifying that all of a nation's core states have a specific building constructed, or that none of its states are experiencing active resistance, in order to satisfy the completion conditions of a focus or decision. A typical use case in "empire-building" mods is checking whether the player has brought every state in their territory under compliant control.
# Check whether all states owned by a country have compliance above 50
focus = {
available = {
all_owned_state = {
compliance > 49
}
}
}
Another example: using it inside an event trigger to confirm that none of a country's states have active resistance:
trigger = {
all_owned_state = {
NOT = {
has_active_resistance = yes
}
}
}
Synergy
- any_neighbor_state:
all_owned_state checks that all states satisfy a condition, while any_neighbor_state checks that at least one neighboring state does — the two are logically complementary and are often combined for compound territorial expansion checks.
- has_state_flag: Use
has_state_flag inside all_owned_state to check whether each state has been tagged with a specific flag, which is well-suited for tracking mission progress that advances state by state.
- is_owned_and_controlled_by: Combining this with
all_owned_state lets you further filter for states that are both owned and actually controlled, avoiding interference from puppet states or wartime occupation.
- compliance: Using
compliance directly inside the all_owned_state block to check a compliance threshold is one of the most common inner conditions.
Common Pitfalls
- Wrong scope:
all_owned_state can only be called from a COUNTRY scope. If it is accidentally written inside a STATE scope — for instance, inside a sub-block of every_state without switching back to a country scope — the script will either throw an error or fail silently. Always confirm that the enclosing scope is indeed a country.
- Confusing "owned" with "controlled": This trigger checks states that are owned, not states that are controlled — states that are still legally yours but are currently occupied by enemy forces will still be included in the check. If you need to exclude such states, filter them internally with
is_controlled_by or is_owned_and_controlled_by.