Wiki

effect · remove_wargoal

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

removes war goal type targetting nation targetExample:
remove_wargoal = {
	type = take_state
	target = FRA
}

实战 · 配合 · 坑

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

实战用法

remove_wargoal 常用于外交事件链中,当两国谈判成功或签订协议后,撤销之前通过 create_wargoal 施加的战争目标,避免战争仍因残留目标而持续。例如在一个"和平谈判"事件选项里,玩家接受条件后移除对目标国的领土主张战争目标:

option = {
    name = peace_negotiation.opt_accept
    remove_wargoal = {
        type = take_state
        target = FRA
    }
    add_political_power = -50
}

配合关系

  • [create_wargoal](/wiki/effect/create_wargoal):与 remove_wargoal 是互逆操作,通常在同一事件链的不同分支中成对出现,一个施加战争目标,另一个撤销。
  • [declare_war_on](/wiki/effect/declare_war_on):宣战后若特定条件满足(如对方达成让步),需要先移除战争目标再通过其他手段结束冲突,两者配合管理战争生命周期。
  • [has_annex_war_goal](/wiki/trigger/has_annex_war_goal):在执行 remove_wargoal 前用此触发器检查该战争目标是否真实存在,防止无效调用或脚本报错。
  • [add_state_claim](/wiki/effect/add_state_claim):有时移除战争目标后,通过添加领土主张来替代原有目的,实现"降级"的外交压力。

常见坑

  1. type 与实际战争目标类型不匹配:若当前对目标国挂载的战争目标类型并非填写的 type(例如实际是 puppet 而写了 take_state),指令会静默失败,战争目标不会被移除,且游戏通常不会报错提示,务必确保类型与 create_wargoal 时一致。
  2. 在没有战争目标存在时调用:对一个当前并无该类型战争目标的国家执行此命令不会崩溃,但也没有实际效果;新手容易误以为命令已生效,建议搭配 [has_annex_war_goal](/wiki/trigger/has_annex_war_goal) 等触发器做前置判断,或通过日志确认状态。

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_wargoal is commonly used in diplomatic event chains to revoke war goals previously imposed via create_wargoal after successful negotiations or treaty agreements between nations, preventing continued warfare due to lingering objectives. For example, in a "peace negotiation" event option, after the player accepts the terms, the territorial claim war goal against the target nation is removed:

option = {
    name = peace_negotiation.opt_accept
    remove_wargoal = {
        type = take_state
        target = FRA
    }
    add_political_power = -50
}

Synergy

  • [create_wargoal](/wiki/effect/create_wargoal): The inverse operation of remove_wargoal, typically appearing as paired actions across different branches of the same event chain—one imposing a war goal while the other revokes it.
  • [declare_war_on](/wiki/effect/declare_war_on): After declaring war, if specific conditions are met (such as the opponent making concessions), the war goal must be removed first before resolving the conflict through other means, with both effects managing the war lifecycle.
  • [has_annex_war_goal](/wiki/trigger/has_annex_war_goal): Check with this trigger whether the war goal actually exists before executing remove_wargoal to prevent invalid calls or script errors.
  • [add_state_claim](/wiki/effect/add_state_claim): Sometimes after removing a war goal, a territorial claim is added as a replacement to achieve a "downgraded" form of diplomatic pressure.

Common Pitfalls

  1. type mismatch with the actual war goal type: If the war goal currently attached to the target nation does not match the specified type (for example, the actual type is puppet but take_state was written), the command fails silently and the war goal is not removed; the game typically provides no error message, so ensure the type matches what was used in create_wargoal.
  2. Calling when no war goal exists: Executing this command on a nation that currently has no war goal of that type will not crash the game but has no practical effect; beginners often mistakenly believe the command succeeded, so it is recommended to use a pre-check with triggers like [has_annex_war_goal](/wiki/trigger/has_annex_war_goal), or verify the state through logs.