Wiki

trigger · is_one_state_island

Definition

  • Supported scope:STATE
  • Supported target:any

Description

return true if the state is a one-state-island.
More precisely, all provinces in the state have no land neighbor.
Or if they do they are connected by a strait or the neighbor is inside the state.
ex: 145 = {
	is_one_state_island = yes
	is_one_state_island = no
}

实战 · 配合 · 坑

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

实战用法

is_one_state_island 常用于判断某个州是否为孤立海岛州,从而在 mod 中为岛屿地区设计专属决议、特殊建设限制或独特的占领规则。例如,可以限制某些大型工业建筑只允许在非孤立岛屿州建造,或为孤立岛屿提供额外的防御加成决议。

# 决议的 available 条件:仅对孤立岛屿州开放"岛屿要塞化"决议
available = {
    is_one_state_island = yes
    is_controlled_by = ROOT
}

配合关系

  • [is_coastal](/wiki/trigger/is_coastal):孤立岛屿州必然是沿海州,两者联用可以精确筛选"四面环海的独立岛屿",排除仅部分省份无陆地邻接的边缘情形。
  • [is_island_state](/wiki/trigger/is_island_state)is_island_state 判断的是整个州是否为岛屿州(依赖大陆连通性),与 is_one_state_island 侧重省级邻接关系的判断形成互补,双重过滤可覆盖不同的地图边缘案例。
  • [any_neighbor_state](/wiki/trigger/any_neighbor_state):在确认是孤立岛屿后,用 any_neighbor_state 检查海峡对岸的邻接州情况,可进一步判断该岛屿是否具有战略意义。
  • [add_state_modifier](/wiki/effect/add_state_modifier):确认孤立岛屿条件后,通过 effect 为该州叠加专属修正(如供给惩罚、防御加成),是岛屿特化 mod 的常见搭配。

常见坑

  1. 把它用在错误的 scope 里:该 trigger 只能在 STATE scope 下调用,若直接写在国家 scope(如 division_trigger 或顶层 focusavailable 块而未先切换到 STATE scope),会静默失效或报错,新手常忘记先用 145 = { ... }any_state / every_state 等进入州级 scope。
  2. 误以为"有海峡连接的省份"会使结果为 false:官方定义明确说明,通过海峡相连的邻省不会使该 trigger 返回 false,因此用它来判断"完全孤立、无法陆路抵达"时需注意——海峡路线在游戏里仍可视为一种连接,若业务逻辑需要排除海峡情形,还需额外结合其他条件手动处理。

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_one_state_island is commonly used to determine whether a state is an isolated island, enabling mod creators to design exclusive decisions, special construction restrictions, or unique occupation rules for island regions. For example, you can restrict certain large industrial buildings to non-isolated island states only, or provide additional defensive bonuses through decisions for isolated islands.

# Available condition in a decision: "Island Fortification" decision opens only for isolated island states
available = {
    is_one_state_island = yes
    is_controlled_by = ROOT
}

Synergy

  • [is_coastal](/wiki/trigger/is_coastal): Isolated island states are inherently coastal states. Using both together allows precise filtering of "islands completely surrounded by sea," excluding edge cases where only certain provinces lack land adjacency.
  • [is_island_state](/wiki/trigger/is_island_state): is_island_state checks whether an entire state is an island state (based on continental connectivity), complementing is_one_state_island's focus on province-level adjacency relationships. Double filtering covers various edge cases on the map.
  • [any_neighbor_state](/wiki/trigger/any_neighbor_state): After confirming an isolated island, use any_neighbor_state to examine adjacent states across straits, further determining whether the island holds strategic value.
  • [add_state_modifier](/wiki/effect/add_state_modifier): After confirming isolated island conditions, apply exclusive modifiers to that state through effects (such as supply penalties or defensive bonuses), a common pairing in island-specialized mods.

Common Pitfalls

  1. Using it in the wrong scope: This trigger only works in STATE scope. If placed directly in country scope (such as division_trigger or a top-level focus available block without first switching to STATE scope), it will silently fail or error. Beginners often forget to enter state scope first using constructs like 145 = { ... } or any_state/every_state.
  2. Mistaking strait-connected provinces as causing false results: The official definition explicitly states that provinces connected via straits will not cause this trigger to return false. When using it to judge "completely isolated, unreachable by land," note that strait routes still count as a form of connection in-game. If your logic requires excluding straits, you must handle this separately with additional conditions.