Wiki

trigger · is_owned_and_controlled_by

Definition

  • Supported scope:STATE
  • Supported target:THIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITAL

Description

check if state is owned by

实战 · 配合 · 坑

实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

is_owned_and_controlled_by 常用于抵抗运动、占领法、合规度等系统的条件判断,确保某个州同时被目标国家拥有控制(而非仅占领)才触发逻辑。例如在决策或事件中,判断玩家是否已完全稳固掌控某战略州:

# 决策的 available 块:只有在自己完全掌控该州时才可执行
available = {
    42 = {  # 某州 ID
        is_owned_and_controlled_by = ROOT
    }
}

配合关系

  • [is_owned_by](/wiki/trigger/is_owned_by):当只需判断主权归属、不关心实际控制权时使用,与本 trigger 形成互补,帮助区分"名义拥有"和"实际掌控"两种场景。
  • [is_controlled_by](/wiki/trigger/is_controlled_by):配合使用可分别细化"仅控制但未拥有"的占领状态,常在抵抗事件中与本 trigger 并列写在 if/else 分支里。
  • [set_occupation_law](/wiki/effect/set_occupation_law):在确认州被完全拥有且控制后再设置占领法,避免对尚未稳固控制的州错误施加政策。
  • [compliance](/wiki/trigger/compliance):常与本 trigger 一同放在 limit 块中,确保合规度检查只针对真正掌控的州执行。

常见坑

  1. 混淆"拥有"与"控制":新手常误以为占领敌方州后即可触发,但本 trigger 要求同时满足拥有与控制,纯军事占领(controller ≠ owner)不会返回真,应改用 is_controlled_by 处理占领情形。
  2. scope 写错位置:本 trigger 必须在 STATE scope 下调用,直接写在国家 scope 的事件 trigger 块顶层会报错,需先用州 ID 或 capital_scope 等方式切换到对应州 scope 再使用。

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

is_owned_and_controlled_by is commonly used in resistance movements, occupation laws, compliance systems, and other condition checks to ensure a state is both owned and controlled by the target country (not merely occupied). For example, in decisions or events, you can check whether the player has completely secured control of a strategic state:

# available block in a decision: only executable when you fully control the state
available = {
    42 = {  # some state ID
        is_owned_and_controlled_by = ROOT
    }
}

Synergy

  • [is_owned_by](/wiki/trigger/is_owned_by): Use when you only need to check sovereignty without caring about actual control. It complements this trigger by helping distinguish between "nominal ownership" and "actual control" scenarios.
  • [is_controlled_by](/wiki/trigger/is_controlled_by): When used together, you can separately refine "control without ownership" occupation states. Often paired with this trigger in if/else branches during resistance events.
  • [set_occupation_law](/wiki/effect/set_occupation_law): Set occupation laws only after confirming a state is fully owned and controlled, avoiding incorrect policy application to states that aren't yet securely held.
  • [compliance](/wiki/trigger/compliance): Frequently placed alongside this trigger in limit blocks to ensure compliance checks apply only to states you truly control.

Common Pitfalls

  1. Confusing "ownership" with "control": Beginners often assume occupation of an enemy state triggers the condition, but this trigger requires both ownership and control to be satisfied simultaneously. Mere military occupation (controller ≠ owner) returns false; use is_controlled_by instead for occupation scenarios.
  2. Incorrect scope placement: This trigger must be called under STATE scope. Placing it directly at the top level of a country scope event trigger block causes errors. You must first switch to the corresponding state scope using state IDs or capital_scope before using it.