Wiki

effect · remove_state_claim

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

remove claim on state

实战 · 配合 · 坑

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

实战用法

remove_state_claim 常用于外交事件或和平谈判后,让某国放弃对特定州的领土主张,例如签署边界协议、完成国策后撤回扩张野心。也适合在内战结束或傀儡关系解除时清理残留的领土声索,保持地图政治状态的整洁。

# 某国在和平条约事件中放弃对某州的主张
country_event = {
    id = my_mod.10
    option = {
        name = my_mod.10.a
        # 当前 scope 为签署协议的国家
        remove_state_claim = 42   # 移除对 42 号州的声索
    }
}

配合关系

  • [add_state_claim](/wiki/effect/add_state_claim) — 成对使用,先用 add_state_claim 在剧本触发时赋予声索,再在特定条件满足后用 remove_state_claim 撤销,形成完整的领土主张生命周期管理。
  • [add_state_core](/wiki/effect/add_state_core) — 某些场景下声索会升级为核心;先确认是否需要同步移除核心,避免移除声索后核心仍残留,造成逻辑矛盾。
  • [any_claim](/wiki/trigger/any_claim) — 在执行移除前用此触发器检查该国是否真的持有该声索,防止对不存在的声索执行操作导致脚本报错或日志警告。
  • [diplomatic_relation](/wiki/effect/diplomatic_relation) — 领土声索往往与双边关系挂钩,移除声索的同时搭配 diplomatic_relation 改善两国关系,使外交事件更加完整自洽。

常见坑

  1. 州 ID 填错或填成省份 IDremove_state_claim 的参数是州(state)编号,而非省份(province)编号,两者在游戏内数值完全不同,填错后效果静默失败且不会报明显错误,需在 map/definition.csvhistory/states/ 中仔细核对目标 ID。
  2. 未先检查声索是否存在就直接移除:对一个本就没有声索的州执行该命令虽不会崩溃,但若逻辑上依赖"声索被成功移除"来触发后续判断,结果会与预期不符;建议在执行前用 [any_claim](/wiki/trigger/any_claim) 或相应条件做保护性判断。

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

remove_state_claim is commonly used in diplomatic events or after peace negotiations to have a nation renounce its territorial claim on a specific state—for example, signing boundary agreements or withdrawing expansionist ambitions after completing a focus. It is also useful for cleaning up residual territorial claims when a civil war ends or puppet relationships are dissolved, keeping the map's political state tidy.

# A nation renounces its claim on a state in a peace treaty event
country_event = {
    id = my_mod.10
    option = {
        name = my_mod.10.a
        # Current scope is the nation signing the agreement
        remove_state_claim = 42   # Remove claim on state 42
    }
}

Synergy

  • [add_state_claim](/wiki/effect/add_state_claim) — Use together as a pair: first apply add_state_claim to grant a claim when the script triggers, then later use remove_state_claim when specific conditions are met, forming a complete lifecycle for territorial claim management.
  • [add_state_core](/wiki/effect/add_state_core) — In some scenarios, a claim escalates to a core; verify beforehand whether you need to remove the core simultaneously, to avoid leaving the core behind after removing the claim, which creates a logical contradiction.
  • [any_claim](/wiki/trigger/any_claim) — Before executing removal, use this trigger to verify that the nation actually holds the claim on that state, preventing silent failures or log warnings from attempting to remove a non-existent claim.
  • [diplomatic_relation](/wiki/effect/diplomatic_relation) — Territorial claims often tie into bilateral relations; pair remove_state_claim with diplomatic_relation to improve relations between both nations, making diplomatic events more coherent and complete.

Common Pitfalls

  1. Entering the wrong state ID or using a province ID instead — The parameter for remove_state_claim is the state number, not the province number; these have completely different values in-game, and using the wrong one causes silent failure with no obvious error message. Double-check the target ID carefully in map/definition.csv and history/states/.
  2. Attempting to remove a claim without first checking if it exists — Executing this command on a state that has no claim will not crash the game, but if your logic depends on "the claim being successfully removed" to trigger subsequent checks, the result will deviate from expectations. It is recommended to add a protective check using [any_claim](/wiki/trigger/any_claim) or appropriate conditions before execution.