Wiki

trigger · controls_state

Definition

  • Supported scope:COUNTRY
  • Supported target:THIS, ROOT, PREV, FROM, CAPITAL

Description

check controller for state(s)

Hands-On Notes

Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.

Hands-On Usage

controls_state is commonly used to check whether a country actually controls a specific state, thereby unlocking subsequent decisions, focuses, or event branches—for example, in territorial expansion mods, only after the player controls the target state is the "Integrate Occupied Territory" decision allowed to trigger. Note that it checks control rather than ownership, making it suitable for handling wartime temporary occupation logic.

# In the available block of a decision: only executable if the specific state is controlled
available = {
    controls_state = 42   # 42 is the target state_id
}

# Can also check multiple states in a trigger block
trigger = {
    controls_state = 42
    controls_state = 43
}

Synergy

  • [any_controlled_state](/wiki/trigger/any_controlled_state) — When fuzzy querying is needed ("controls any state meeting conditions"), it complements controls_state; the former suits range iteration while the latter suits exact ID checks.
  • [divisions_in_state](/wiki/trigger/divisions_in_state) — Confirms control while additionally verifying whether troops are garrisoned in that state; commonly used for dual-condition decisions like "occupy and garrison."
  • [add_state_core](/wiki/effect/add_state_core) — After confirming control, adds a core to that state; the standard companion effect in a "control first, then assert sovereignty" workflow.
  • [has_defensive_war](/wiki/trigger/has_defensive_war) — In wartime events, first use controls_state to confirm front-line state ownership, then combine with whether in a defensive war to determine event outcomes.

Common Pitfalls

  1. Confusing control with ownership: Newcomers often mistakenly believe controls_state is equivalent to "owning" a state, but in war the enemy may control a state nominally owned by you, or you may control a state belonging to another country—choose controls_state (controller) or combine with any_owned_state / is_owned_by (ownership) based on actual needs.
  2. Misuse under STATE scope: This trigger only supports COUNTRY scope. If used directly in a state event or state-level limit block, the script will not error but the logical object is wrong; you must first switch back to country scope using OWNER or FROM before calling it.