Wiki

trigger · is_on_continent

Definition

  • Supported scope:STATE
  • Supported target:none

Description

is state located on continent

实战 · 配合 · 坑

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

实战用法

is_on_continent 常用于限定某些决策、事件或建筑建造条件只对特定大洲的州生效,例如"仅非洲州可触发殖民开发决策"或"只有欧洲州才能获得某种特殊修饰器"。在遍历全局州时,它也用于过滤掉不相关大洲的州,避免条件误触发。

# 示例:某决策仅在亚洲的州上可用
available = {
    is_on_continent = asia
}

配合关系

  • [is_owned_by](/wiki/trigger/is_owned_by):配合使用可精确筛选"属于某国且位于特定大洲"的州,常见于殖民地或势力范围类 mod。
  • [any_neighbor_state](/wiki/trigger/any_neighbor_state):遍历邻接州时配合 is_on_continent 可排除跨大洲的邻接州(如直布罗陀一类的边界情况)。
  • [region](/wiki/trigger/region):两者同时使用可实现大洲级别与次级地区双重限定,用于更精细的地理条件筛选。
  • [add_state_modifier](/wiki/effect/add_state_modifier):在 effect 块中确认大洲后施加对应的地区性修饰器,实现差异化的大洲增益逻辑。

常见坑

  1. 大洲名写错大小写或拼写:合法值为小写英文(如 europeasiaafricanorth_americasouth_americaaustralia),写成 EuropeEuropa 会静默失败,条件永远不会返回真,且游戏通常不会报错提示。
  2. 在 COUNTRY scope 下直接使用:该 trigger 仅对 STATE scope 有效,若在国家级事件的 trigger 块中直接写 is_on_continent = europe 而不先切换到州 scope(如通过 any_owned_state 等),将导致 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_continent is commonly used to restrict certain decisions, events, or building construction conditions to states on specific continents—for example, "colonial development decisions available only to African states" or "special modifiers granted only to European states." When iterating through global states, it also filters out states from irrelevant continents, preventing unintended condition triggers.

# Example: A decision available only on Asian states
available = {
    is_on_continent = asia
}

Synergy

  • [is_owned_by](/wiki/trigger/is_owned_by): Use together to precisely filter states that are "owned by a specific country AND located on a specific continent," commonly seen in colonization or sphere of influence mods.
  • [any_neighbor_state](/wiki/trigger/any_neighbor_state): When iterating neighboring states, combining with is_on_continent can exclude cross-continental neighbors (such as edge cases like Gibraltar).
  • [region](/wiki/trigger/region): Using both simultaneously enables dual-layer geographic filtering at continent and sub-region levels for more granular condition checks.
  • [add_state_modifier](/wiki/effect/add_state_modifier): In effect blocks, confirm the continent first, then apply corresponding regional modifiers to implement differentiated continent-specific bonuses.

Common Pitfalls

  1. Incorrect capitalization or spelling of continent names: Valid values are lowercase English (europe, asia, africa, north_america, south_america, australia). Writing Europe or Europa will silently fail—the condition will never return true, and the game typically won't report an error.
  2. Direct use in COUNTRY scope: This trigger only works in STATE scope. If you write is_on_continent = europe directly in a country-level event's trigger block without first switching to state scope (e.g., via any_owned_state), the scope will mismatch and results will be unpredictable.