Hands-On Usage
any_controlled_state is commonly used to check whether a country controls at least one state that meets specific conditions — for example, determining whether an industrial hub, a resource-rich state, or a core state has been occupied — in order to fire events or unlock decisions. Typical use cases include occupation conditions, wartime supply checks, and available blocks for achievements or decisions.
# Check whether a country controls at least one core state with available industrial complex building slots
any_controlled_state = {
is_core_of = ROOT
free_building_slots = {
building = industrial_complex
size > 0
include_locked = yes
}
}
# In a decision's available block: ensure the country controls at least one coastal state
available = {
any_controlled_state = {
is_coastal = yes
}
}
Synergy
- all_neighbor_state: After using
any_controlled_state to confirm control of a certain type of state, you can follow up with all_neighbor_state to apply conditions to all states adjacent to it, building a chain of regional expansion checks.
- is_owned_by: Frequently used inside
any_controlled_state to distinguish between "controlled but not owned" and "controlled and owned," preventing logical false positives.
- has_state_flag: Used within an
any_controlled_state block to check whether a state has already been flagged by a specific event or process, preventing duplicate triggers.
- building_count_trigger: Combined with
any_controlled_state to verify whether a country controls at least one state that has reached a specified building level; commonly used for industrial or military conditions.
Common Pitfalls
- Mistaking it for
all_controlled_state: any_controlled_state evaluates to true as long as one state satisfies the conditions. If you need all controlled states to satisfy the conditions, you should use the corresponding all_state (paired with is_controlled_by = ROOT) or redesign the logic entirely — using any_controlled_state in that scenario will make your condition far more permissive than intended.
- Confusing "control" with "ownership":
any_controlled_state operates on control (controller), meaning your own states that are occupied by another country fall outside its scope, while enemy states you have occupied fall within it. If your logic actually requires ownership (owner), switch to the corresponding owned-state iteration, or add is_owned_by = ROOT as a secondary filter inside the block.