Hands-On Usage
any_state_in is commonly used to check whether any state within a given continent or strategic region meets specific conditions — for example, determining whether any state on the European continent has been occupied by a particular country, has reached a certain compliance threshold, or contains a specific building. Typical use cases include: availability conditions for continental liberation decisions, and checks for whether resistance activity exists within a given region.
# Check if any state in Europe is controlled by ROOT and has compliance below 50
available = {
any_state_in = {
continent = europe
is_controlled_by = ROOT
compliance < 50
}
}
Synergy
- is_controlled_by: Frequently used alongside continent or strategic region filters to confirm the actual controller of a state, preventing false positives when dealing with occupied territories.
- has_resistance: Pairs with
any_state_in to quickly check whether any active resistance movement exists within a region, useful as an availability condition for suppression-related decisions.
- compliance: Used when checking the compliance range of states within a region; often combined with continent filters to evaluate occupation management effectiveness.
- has_state_flag: Used during region-wide scans to exclude or target states that have already been flagged by script, preventing duplicate trigger logic.
Common Pitfalls
array and ai_area do not generate default tooltips: When using either of these parameter types, the game will not automatically display a description of the trigger condition. You must manually wrap the condition in custom_trigger_tooltip; otherwise the condition box shown to players in the UI will appear blank, making it extremely difficult to debug.
- Spell the field as
continent, not conteinent: The official documentation contains a typo (conteinent). Your script must use the correct spelling continent = europe — using the misspelled version from the docs will cause the condition to silently fail: no error is thrown, but it will always return false.