trigger · is_capital
Definition
- Supported scope:
STATE - Supported target:
none
Description
Is scope state a capital. 169 = { is_capital = yes }
is_capitalSTATEnoneIs scope state a capital. 169 = { is_capital = yes }
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
is_capital 常用于区域性事件或决议中,限定某些效果只对首都所在州触发,例如在占领惩罚、合规度调整或特殊建筑建造时排除或专门针对首都州。典型场景是在抵抗运动 mod 中,对首都州给予额外的镇压或顺从加成,或在胜利条件脚本中判断敌国首都是否已被占领。
# 在 limit 中限定:只对首都州施加特殊占领法
every_state = {
limit = {
is_capital = yes
is_controlled_by = ROOT
NOT = { is_owned_by = ROOT }
}
set_occupation_law = martial_law
}
[is_owned_by](/wiki/trigger/is_owned_by):首都州的归属判断,常与 is_capital 联用,确认"某国首都是否已被特定国家占领控制"这一复合条件。[compliance](/wiki/trigger/compliance):首都州的顺从度往往具有特殊政策意义,配合 is_capital 可为首都单独设置顺从度阈值触发器。[set_occupation_law](/wiki/effect/set_occupation_law):在确认某州为首都后,针对性地设置占领法,首都往往需要与其他州不同的管理策略。[add_compliance](/wiki/effect/add_compliance):对首都州单独增减顺从度,常在事件或决议 effect 块中配合 is_capital 限定作用范围。is_capital 只能在 STATE scope 下使用,新手有时在 COUNTRY scope 的条件块中直接写 is_capital = yes,导致脚本报错或永远不触发——需要先用 capital_scope = { } 或 every_state 进入州 scope 再判断。is_owned_by 等 trigger 共同限定所属国身份。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.
is_capital is commonly used in regional events or decisions to restrict certain effects to trigger only on the capital state, such as when applying occupation penalties, adjusting compliance, or constructing special buildings while excluding or specifically targeting the capital state. Typical scenarios include resistance movement mods where additional suppression or compliance bonuses are applied to the capital state, or in victory condition scripts where you need to check whether an enemy nation's capital has been occupied.
# In a limit block: apply special occupation law only to the capital state
every_state = {
limit = {
is_capital = yes
is_controlled_by = ROOT
NOT = { is_owned_by = ROOT }
}
set_occupation_law = martial_law
}
[is_owned_by](/wiki/trigger/is_owned_by): Ownership determination for the capital state, frequently paired with is_capital to verify the combined condition "whether a nation's capital has been occupied or controlled by a specific country."[compliance](/wiki/trigger/compliance): Compliance in the capital state often carries special policy significance; combined with is_capital, you can set compliance thresholds or triggers for the capital separately from other states.[set_occupation_law](/wiki/effect/set_occupation_law): After confirming a state is the capital, apply occupation laws specifically to it; capitals typically require different management strategies than other states.[add_compliance](/wiki/effect/add_compliance): Adjust compliance independently for the capital state, commonly paired with is_capital in event or decision effect blocks to limit the scope of application.is_capital can only be used in STATE scope. Beginners sometimes write is_capital = yes directly in condition blocks under COUNTRY scope, causing script errors or triggers that never fire—you must first enter state scope using capital_scope = { } or every_state before checking this condition.is_owned_by to establish the owning nation's identity.