Wiki

trigger · is_owner_neighbor_of

Definition

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

Description

check if neighbor ( owned territory ) with specified country

实战 · 配合 · 坑

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

实战用法

is_owner_neighbor_of 常用于判断两国是否通过陆地接壤的领土互相毗邻,典型场景包括:触发边境紧张事件、限制某外交决策仅对领土相邻国生效、或在焦点树中判断扩张方向是否可行。注意它检查的是"拥有领土"的相邻关系,而非单纯的地图边境线。

# 某决策的 available 块:仅当目标国与我方有领土接壤时才可用
available = {
    TAG = {
        is_owner_neighbor_of = ROOT
    }
}

配合关系

  • [any_neighbor_country](/wiki/trigger/any_neighbor_country) — 可先用此 trigger 遍历所有邻国,再在其内部用 is_owner_neighbor_of 精确筛选出通过"拥有领土"相邻的国家,避免误判租借/控制区带来的假邻接。
  • [controls_state](/wiki/trigger/controls_state) — 两者配合可区分"控制"与"拥有"的差异:当你需要同时满足"领土所有权相邻"和"实际控制某州"时组合使用。
  • [create_wargoal](/wiki/effect/create_wargoal) — 在 allowed / available 中用 is_owner_neighbor_of 确认目标国为领土邻国后,再通过此 effect 生成针对性战争目标,逻辑更严谨。
  • [has_defensive_war_with](/wiki/trigger/has_defensive_war_with) — 常与 is_owner_neighbor_of 并列写在同一条件块中,用于判断"与领土接壤的邻国是否正在和我方交战",触发相关防御联动事件。

常见坑

  1. 把"控制"当"拥有":新手容易混淆 is_owner_neighbor_of 与单纯地图毗邻的概念——如果某国仅仅控制而非拥有边境州,该 trigger 不会返回真,导致条件看似满足却始终不触发。
  2. Scope 方向写反:该 trigger 必须在 COUNTRY scope 下使用,target 填写要比较的对象。常见错误是在 STATE scope 里直接调用,或把 THIS 和目标国的主语关系写反,导致判断逻辑完全颠倒。

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_owner_neighbor_of is commonly used to check whether two nations are adjacent through land-controlled territories, with typical scenarios including: triggering border tension events, restricting certain diplomatic decisions to only territorially adjacent nations, or determining feasible expansion directions within focus trees. Note that it checks adjacency based on "owned territories" rather than mere map borders.

# available block of a certain decision: only available when the target nation shares territorial borders with us
available = {
    TAG = {
        is_owner_neighbor_of = ROOT
    }
}

Synergy

  • [any_neighbor_country](/wiki/trigger/any_neighbor_country) — Use this trigger first to iterate through all neighboring nations, then apply is_owner_neighbor_of within it to precisely filter out nations adjacent through "owned territories," avoiding false positives from leased or controlled regions.
  • [controls_state](/wiki/trigger/controls_state) — When combined, both can distinguish the difference between "control" and "ownership": use them together when you need to satisfy both "territorial ownership adjacency" and "actual control of a certain state."
  • [create_wargoal](/wiki/effect/create_wargoal) — After confirming the target nation is a territorial neighbor using is_owner_neighbor_of in allowed / available, use this effect to generate targeted war goals for more rigorous logic.
  • [has_defensive_war_with](/wiki/trigger/has_defensive_war_with) — Often written in parallel with is_owner_neighbor_of within the same condition block to check "whether a territorially adjacent neighbor is currently at war with us," triggering relevant defensive coordination events.

Common Pitfalls

  1. Confusing "control" with "ownership": Beginners often mix up is_owner_neighbor_of with the concept of simple map adjacency — if a nation merely controls rather than owns a border state, this trigger will return false, causing conditions that appear satisfied to never fire.
  2. Reversing scope direction: This trigger must be used under COUNTRY scope, with the target parameter specifying the nation to compare against. Common mistakes include calling it directly in STATE scope or inverting the subject relationship between THIS and the target nation, completely reversing the logic.