Wiki

trigger · is_on_same_continent_as

Definition

  • Supported scope:STATE, COUNTRY
  • Supported target:any

Description

Checks if the scope state is on the same continent as the given state.
The capital state is used for given country tag.
Example 1:

FROM = { is_on_same_continent_as = 111 }

Example 2:

GER = { is_on_same_continent_as = ITA }

实战 · 配合 · 坑

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

实战用法

is_on_same_continent_as 常用于限制某些决策、外交行动或焦点的可用条件,例如只允许同洲国家之间互相索取核心、建立势力范围,或限制某殖民扩张事件只对同大陆的州触发。典型场景是在区域联盟 mod 中,确保只有与目标国同洲的国家才能加入特定阵营。

# 决策的 available 块:只有与目标国处于同一大陆才可发动
available = {
    GER = {
        is_on_same_continent_as = FROM
    }
}

配合关系

  • [any_neighbor_state](/wiki/trigger/any_neighbor_state) — 常与本 trigger 嵌套使用,先筛出同洲再进一步限定必须与某邻接州毗邻,精确圈定地理范围。
  • [controls_state](/wiki/trigger/controls_state) — 配合使用可实现「仅当己方控制同洲某州时」的条件,常见于殖民或区域占领逻辑。
  • [distance_to](/wiki/trigger/distance_to) — 两者搭配可在同洲前提下再加距离阈值,避免跨洲大陆板块被误判为"近邻"。
  • [any_owned_state](/wiki/trigger/any_owned_state) — 用于遍历己方拥有的州,配合本 trigger 确认是否存在至少一块与目标同洲的领土,常用于殖民解锁判断。

常见坑

  1. 混淆 scope 对象:对国家 tag 使用时,游戏取的是该国首都州所在大陆,而非其所有领土。如果目标国已被分割或首都迁移,结果可能出乎预料,务必明确你真正想比较的是"首都所在洲"还是某块具体领土。
  2. 在 STATE scope 外错误调用:本 trigger 也可在 COUNTRY scope 下使用(取首都州),但如果写在不属于 STATE 或 COUNTRY 的内层 scope(如 unit leader scope)内,脚本会静默失败或报错,新手常因 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_on_same_continent_as is commonly used to restrict the availability of certain decisions, diplomatic actions, or focuses—for example, allowing only countries on the same continent to demand cores, establish spheres of influence, or limiting colonial expansion events to states on the same landmass. A typical scenario is in regional alliance mods, where you ensure only nations sharing the target country's continent can join a specific faction.

# available block in a decision: only usable if the target nation is on the same continent
available = {
    GER = {
        is_on_same_continent_as = FROM
    }
}

Synergy

  • [any_neighbor_state](/wiki/trigger/any_neighbor_state) — Often nested with this trigger to first filter by continent, then further narrow down to states that border a specific neighboring state, precisely pinpointing geographic scope.
  • [controls_state](/wiki/trigger/controls_state) — Used together to achieve the condition "only when we control a state on the same continent," commonly seen in colonial or regional occupation logic.
  • [distance_to](/wiki/trigger/distance_to) — Pairing these two adds a distance threshold on top of the same-continent premise, preventing transcontinental landmass blocks from being mistakenly judged as "nearby neighbors."
  • [any_owned_state](/wiki/trigger/any_owned_state) — Iterates through owned states and combines with this trigger to verify whether at least one territory exists on the target continent; frequently used in colonial unlock checks.

Common Pitfalls

  1. Confusing scope objects: When applied to a country tag, the game uses the capital state's continent, not all its territories. If the target nation has been partitioned or its capital relocated, results may be unexpected. Always clarify whether you truly want to compare "the continent where the capital sits" or a specific territory.
  2. Incorrect invocation outside STATE scope: This trigger can also be used in COUNTRY scope (taking the capital state), but if written inside a nested scope that is neither STATE nor COUNTRY (such as unit leader scope), the script will silently fail or throw an error. Beginners often lose track of their actual scope due to deeply nested scope chains.