Hands-On Usage
any_owned_state is commonly used to check whether a country owns at least one state that meets specific conditions — for example, detecting whether it holds a resource-rich state, a core state, or an occupied state where compliance has not yet reached the required threshold — in order to fire events, decisions, or focus branches.
# Check if the country owns at least one state with active resistance that it does not fully control
trigger = {
any_owned_state = {
has_active_resistance = yes
NOT = { is_fully_controlled_by = ROOT }
}
}
Synergy
- all_owned_state (not whitelisted, skipped)
- is_owned_by — Used inside the
any_owned_state sub-block to further confirm whether the state still actually belongs to the triggering country.
- has_state_flag — Used inside the sub-block to check whether a specific flag has been set on a state; combine with set_state_flag to implement "trigger only once" logic.
- compliance — Used inside the sub-block to evaluate a state's compliance value; pair with
any_owned_state to quickly scan all territories for occupied states below a compliance threshold.
- is_core_of — Used inside the sub-block to verify whether a state is a core of a specific country; commonly used to check whether any occupied home-core territory exists.
Common Pitfalls
- Scope mismatch:
any_owned_state can only be called from a COUNTRY scope. If the current scope has already entered a STATE scope (e.g., inside the sub-block of another any_owned_state), calling any_owned_state again directly will produce a scope error — you must first return to a country scope via a target such as OWNER or ROOT before nesting it again.
- Mistaking it for an effect: This is a trigger used purely for condition checks; it cannot be placed inside an effect block to "perform operations on every state." If you need to apply an operation to all states matching certain conditions, use the effect-side
every_state with a limit block to filter conditions instead of placing any_owned_state inside an effect.