Wiki

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) 做前置条件检查,保持脚本的防御性。

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_contested_owner is commonly used in territorial negotiations, peace agreements, or scenario events to revoke a nation's contested owner status when it relinquishes its sovereignty claim over a state. For example, in an event option where the player abandons their claim to a disputed state:

# In a country scope event option
GER = {
    remove_contested_owner = 42  # Germany is no longer the contested owner of state 42
}

You can also write this from a state scope in reverse, with completely equivalent results—which approach you choose depends on your current script's scope context.


Synergy

  • [has_contested_owner](/wiki/trigger/has_contested_owner): Check whether the target state actually has that contested owner before executing the removal, preventing the effect from triggering in situations that don't meet the conditions and ensuring logical rigor.
  • [add_contested_owner](/wiki/effect/add_contested_owner): These two appear together as a pair. First use add_contested_owner to establish a contested claim, then use remove_contested_owner when conditions mature to revoke it, forming a complete lifecycle management of contested status.
  • [add_state_core](/wiki/effect/add_state_core) / [add_state_claim](/wiki/effect/add_state_claim): After removing contested ownership, you typically need to adjust cores or claims in sync. Using all three together allows precise control over all territorial rights levels a nation has over a state.
  • [country_event](/wiki/effect/country_event) / [state_event](/wiki/effect/state_event): Trigger a notification event after removing the contested status. Leveraging the Country and State localization contexts built into the effect, you can directly display the relevant nation and state names in event text, enhancing narrative coherence.

Common Pitfalls

  1. Scope and parameter type must be complementary: This effect requires that "if the current scope is a country, fill the parameter with a state; if the current scope is a state, fill the parameter with a country"—the two cannot be of the same type. Beginners might mistakenly write another country tag under a country scope (such as GER = { remove_contested_owner = FRA }), which will not take effect, and the script won't report an error, making the issue difficult to debug.
  2. Failing to verify existence before removal: If the target nation isn't actually the contested owner of that state and you execute the removal anyway, the game won't crash, but it will silently fail. It's recommended to pair this with [has_contested_owner](/wiki/trigger/has_contested_owner) as a precondition check to keep your script defensive.