Wiki

trigger · is_island_state

Definition

  • Supported scope:STATE
  • Supported target:any

Description

return true if the state is composed exclusively of one-province-islands.
More precisly, all provinces in the state have no land neighbor.
Or if they do they are connected by a strait.
(cf. is_one_state_island for checking if the state itself is an island)
ex: 145 = {
	is_island_state = yes
	is_island_state = no
}

实战 · 配合 · 坑

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

实战用法

is_island_state 常用于判断某个州是否完全由孤岛省份构成,从而为岛屿地区设计特殊的驻防逻辑、建筑解锁条件或决议可用性。例如在海上要塞类 mod 中,可以限制某些海军基地决议只对纯岛屿州可用,或对孤岛州施加特殊的驻守惩罚。

# 决议仅对纯岛屿州可用
available = {
    145 = {
        is_island_state = yes
    }
}

配合关系

  • [is_one_state_island](/wiki/trigger/is_one_state_island):两者功能相近但判断角度不同,is_island_state 检查省份级别的连通性,is_one_state_island 检查州本身是否为岛,配合使用可精确区分"完全由孤岛省份组成的州"与"与大陆隔绝的单一岛州"。
  • [is_coastal](/wiki/trigger/is_coastal):岛屿州必然沿海,两者组合可以进一步筛选出临海但非孤岛的州,用于排除逻辑。
  • [any_neighbor_state](/wiki/trigger/any_neighbor_state):常用于在确认是岛屿州后,进一步检查其是否存在特定类型的邻接州(如通过海峡相连),构建更复杂的地理条件链。
  • [set_state_category](/wiki/effect/set_state_category):在 effect 块中配合使用,可在满足孤岛条件时自动将州类型调整为特定分类,实现动态地图效果。

常见坑

  1. is_one_state_island 混淆:新手容易将两者等同使用。is_island_state 要求州内所有省份均无陆地邻接(或仅通过海峡相连),而 is_one_state_island 判断的是州整体是否为岛屿,两者在多省份州的情况下结果可能完全不同,务必根据实际需求选择。
  2. Scope 写错位置:此 trigger 的 scope 是 STATE,必须在州 scope 下调用(如 145 = { is_island_state = yes })。若直接写在国家 scope 的 trigger 块中而不切换 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_island_state is commonly used to determine whether a state consists entirely of isolated island provinces, enabling designers to implement special garrison logic, building unlock conditions, or decision availability for island regions. For example, in maritime fortress-style mods, you can restrict certain naval base decisions to apply only to pure island states, or impose special garrison penalties on isolated island states.

# Decision available only for pure island states
available = {
    145 = {
        is_island_state = yes
    }
}

Synergy

  • [is_one_state_island](/wiki/trigger/is_one_state_island): Both have similar functionality but differ in evaluation perspective. is_island_state checks province-level connectivity, while is_one_state_island checks whether the state itself is an island. Using them together allows precise distinction between "a state composed entirely of isolated island provinces" and "a single island state isolated from the continent."
  • [is_coastal](/wiki/trigger/is_coastal): Island states are necessarily coastal. Combining the two allows further filtering to identify coastal but non-island states, useful for exclusion logic.
  • [any_neighbor_state](/wiki/trigger/any_neighbor_state): Commonly used after confirming a state is an island state, to further check whether it has adjacent states of specific types (such as those connected via straits), building more complex geographical condition chains.
  • [set_state_category](/wiki/effect/set_state_category): When used in an effect block, automatically adjusts a state's category to a specific classification when island conditions are met, enabling dynamic map effects.

Common Pitfalls

  1. Confusion with is_one_state_island: Beginners often use these two interchangeably. is_island_state requires that all provinces within a state have no land adjacencies (or are connected only via straits), while is_one_state_island judges whether the state as a whole is an island. In multi-province states, results may differ completely. Always choose based on your actual requirements.
  2. Incorrect scope placement: This trigger's scope is STATE and must be called within a state scope context (such as 145 = { is_island_state = yes }). If written directly in a country scope trigger block without switching scopes, the script will not evaluate correctly, and debugging logs may not always provide intuitive error messages.