Wiki

effect · remove_resource_rights

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Remove resource right to state for scope country. remove_resource_rights = ID

实战 · 配合 · 坑

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

实战用法

remove_resource_rights 常用于外交事件或决议中,当资源租借协议到期、关系破裂或国家被吞并时,自动撤销己方对某州的资源开采权。例如在一个"终止资源协议"的事件效果块中:

# 在 country_event 的 option 中,scope 为持有资源权的国家
option = {
    name = resource_agreement.1.a
    remove_resource_rights = 42   # 42 为目标 state ID
    add_political_power = -20
}

配合关系

  • [has_country_flag](/wiki/trigger/has_country_flag):先检查是否存在某个标记来确认资源协议曾被授予,再触发移除,避免误操作。
  • [add_resource](/wiki/effect/add_resource):移除资源权后,有时需要将资源重新分配给原属国所在州,两者常成对出现在外交逻辑中。
  • [add_opinion_modifier](/wiki/effect/add_opinion_modifier):撤销资源权通常伴随外交关系变化,用此命令同步添加负面观感修正符以体现现实影响。
  • [country_event](/wiki/effect/country_event):移除后触发一个事件通知对方国家,实现双边响应的完整外交链条。

常见坑

  1. 直接填写州名而非州 ID:该命令只接受数字形式的 state ID,填写 "42" 字符串或州名标签均会报错,务必查阅 map/definition.csv 或游戏内州编号确认。
  2. 在错误的 scope 下调用:必须在拥有资源权的国家 scope 下执行,若误写在资源所在州的主权国 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

remove_resource_rights is commonly used in diplomatic events or decisions to automatically revoke resource extraction rights over a state when resource-sharing agreements expire, relations break down, or a nation is annexed. For example, in an "End Resource Agreement" event effect block:

# In the option of a country_event, scope is the nation holding resource rights
option = {
    name = resource_agreement.1.a
    remove_resource_rights = 42   # 42 is the target state ID
    add_political_power = -20
}

Synergy

  • [has_country_flag](/wiki/trigger/has_country_flag): Check whether a flag exists first to confirm the resource agreement was previously granted, then trigger removal to avoid accidental operations.
  • [add_resource](/wiki/effect/add_resource): After removing resource rights, you may need to redistribute resources back to the state of the original owner nation; these two often appear in pairs within diplomatic logic.
  • [add_opinion_modifier](/wiki/effect/add_opinion_modifier): Revoking resource rights typically accompanies diplomatic relationship changes; use this command to simultaneously apply negative opinion modifiers to reflect real-world consequences.
  • [country_event](/wiki/effect/country_event): After removal, trigger an event to notify the other nation, creating a complete bilateral diplomatic chain response.

Common Pitfalls

  1. Writing state names instead of state IDs: This command only accepts numeric state IDs; using "42" as a string or state name tags will cause errors. Always consult map/definition.csv or check state numbering in-game to confirm.
  2. Calling under the wrong scope: Must be executed under the scope of the nation holding resource rights. If mistakenly written under the scope of the sovereign nation of the state containing the resource, it will have no effect and produce no obvious error message, making it extremely easy to overlook.