命令百科

effect · remove_contested_owner

Definition

  • Supported scope:STATE, COUNTRY
  • Supported target:THIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITAL

Description

Removes a contested owner to a state.
The effect can be used either from a country or a state scope and accepts the other as parameter.
The effect is localized with a localization environment containing `Country` and `State`.

### Example
The following example has the same end result and localization.

42 = { remove_contested_owner = GER } GER = { remove_contested_owner = 42 }

Standard scope accessors can also be used:

Assuming current scope is a state and FROM is a country scope

remove_contested_owner = FROM

实战 · 配合 · 坑

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

实战用法

remove_contested_owner 常用于领土谈判、和平协议或剧本事件中,当某国放弃对某州的争议主权声索时撤销其 contested owner 状态。例如,在一个外交事件的 option 中,让玩家放弃对某争议州的主张:

# 在国家 scope 下的事件 option 中
GER = {
    remove_contested_owner = 42  # 德国不再是 42 号州的争议所有者
}

也可以反向从州 scope 写,结果完全等价,选哪种取决于当前脚本的 scope 上下文。


配合关系

  • [has_contested_owner](/wiki/trigger/has_contested_owner):在执行移除前先检查目标州是否确实存在该 contested owner,避免对不满足条件的局面触发效果,保证逻辑严谨。
  • [add_contested_owner](/wiki/effect/add_contested_owner):两者成对出现,先用 add_contested_owner 建立争议主权,再用 remove_contested_owner 在条件成熟时撤销,构成完整的争议状态生命周期管理。
  • [add_state_core](/wiki/effect/add_state_core) / [add_state_claim](/wiki/effect/add_state_claim):争议主权解除后,通常需要同步调整核心或声索状态,三者联用可精确控制一个国家对某州的全部领土权利层级。
  • [country_event](/wiki/effect/country_event) / [state_event](/wiki/effect/state_event):移除争议后触发通知事件,借助 effect 自带的 CountryState 本地化环境,可直接在事件文本中展示相关国家与州的名称,提升叙事连贯性。

常见坑

  1. Scope 与参数类型必须互补:该 effect 要求"当前 scope 是国家则参数填州,当前 scope 是州则参数填国家",两者不能同类型。新手在国家 scope 下误写另一个国家 tag(如 GER = { remove_contested_owner = FRA })不会生效,脚本也不会报错,导致问题难以排查。
  2. 移除前未验证存在性:若目标国家本来就不是该州的 contested owner 便直接执行移除,游戏不会崩溃,但会产生静默失败,建议配合 [has_contested_owner](/wiki/trigger/has_contested_owner) 做前置条件检查,保持脚本的防御性。