Wiki

trigger · owns_any_state_of

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Check if the country owns any of the states in the list.

实战 · 配合 · 坑

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

实战用法

owns_any_state_of 常用于检查某国是否控制了某一地区的至少一个省份,典型场景包括:判断玩家是否已占领足够的领土以解锁后续决策、国策或事件。例如在一个"统一中东"题材 mod 中,可以用它判断是否持有核心地区任意一州来触发下一阶段任务。

# 某决策的 available 块:只要持有目标列表中任意一个州就可以激活
available = {
    owns_any_state_of = {
        619   # 开罗
        454   # 巴格达
        679   # 大马士革
    }
}

配合关系

  • [any_owned_state](/wiki/trigger/any_owned_state) — 当需要在拥有州上附加更细粒度的条件(如某州的建筑数量或人口)时,可与 owns_any_state_of 组合使用,后者快速筛选范围,前者进一步校验属性。
  • [controls_state](/wiki/trigger/controls_state)owns_any_state_of 仅检查所有权,而领土实际被敌军占领时所有权与控制权会分离,搭配此触发器可同时确认控制状态。
  • [add_state_core](/wiki/effect/add_state_core) — 常在 owns_any_state_of 为真时的 effect 块中使用,对已拥有的州补充核心,形成"占领→核心化"的完整逻辑链。
  • [has_completed_focus](/wiki/trigger/has_completed_focus) — 常作为并列条件:先完成特定国策、再持有目标州,两者同时满足才开放后续内容,避免玩家绕过剧情触发。

常见坑

  1. 把州 ID 写成省份 IDowns_any_state_of 接受的是州(state)编号,而非地图上的省份(province)编号,两者在同一地区可能相差数百,直接从 map 文件复制省份 ID 会导致条件永远不成立。
  2. 误以为"拥有"等于"控制":该 trigger 判断的是外交/游戏意义上的所有权(owner),被敌军占领的州仍算作己方所有,若逻辑上需要"实际掌控",必须额外用 controls_state 进行补充判断,否则会在战争中意外触发不应出现的奖励或事件。

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

owns_any_state_of is commonly used to check whether a country controls at least one state in a given region. Typical scenarios include: determining whether the player has occupied sufficient territory to unlock subsequent decisions, national focuses, or events. For example, in a "Middle East Unification" themed mod, it can be used to check whether any state in the target list is held to trigger the next phase of a mission.

# available block of a certain decision: can be activated as long as any state from the target list is owned
available = {
    owns_any_state_of = {
        619   # Cairo
        454   # Baghdad
        679   # Damascus
    }
}

Synergy

  • [any_owned_state](/wiki/trigger/any_owned_state) — When finer-grained conditions need to be attached to owned states (such as building count or population of a certain state), it can be combined with owns_any_state_of, where the latter quickly filters the scope and the former further validates attributes.
  • [controls_state](/wiki/trigger/controls_state)owns_any_state_of only checks ownership; when territory is actually occupied by enemy forces, ownership and control become separated. Pairing with this trigger ensures both ownership and control status are confirmed simultaneously.
  • [add_state_core](/wiki/effect/add_state_core) — Commonly used within the effect block when owns_any_state_of is true, adding cores to already-owned states to form a complete logical chain of "occupation → coreification."
  • [has_completed_focus](/wiki/trigger/has_completed_focus) — Often serves as a parallel condition: complete a specific national focus first, then own the target states; both must be satisfied simultaneously to unlock subsequent content, preventing players from bypassing story triggers.

Common Pitfalls

  1. Confusing state IDs with province IDs: owns_any_state_of accepts state numbers, not province numbers on the map. The two can differ by hundreds in the same region. Directly copying province IDs from map files will cause the condition to never be satisfied.
  2. Mistaking "ownership" for "control": This trigger judges ownership in the diplomatic/gameplay sense (owner). States occupied by enemy forces still count as your own. If the logic requires "actual control," you must additionally use controls_state for supplementary checks, otherwise unintended rewards or events may trigger unexpectedly during warfare.