Wiki

effect · recall_attache

Definition

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

Description

Scope country recalls attache from target country. Example: GER = { recall_attache = CHI } means Germany recalls attache from China.

实战 · 配合 · 坑

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

实战用法

recall_attache 常用于外交关系破裂、宣战或切换阵营的 mod 场景,在双方关系恶化前自动撤回武官以保持逻辑一致性。例如在某国加入敌对阵营前,先收回派驻的武官:

# 德国对中国宣战前,先召回武官
GER = {
    recall_attache = CHI
    declare_war_on = {
        target = CHI
        type = annex_everything
    }
}

配合关系

  • [has_attache](/wiki/trigger/has_attache):在执行召回前先检查己方是否确实在目标国有武官,避免对不存在的武官触发无效指令。
  • [has_attache_from](/wiki/trigger/has_attache_from):从目标国角度验证武官派驻关系是否存在,适合在目标国 scope 内做条件判断。
  • [declare_war_on](/wiki/effect/declare_war_on):宣战往往会自动中断武官关系,但手动提前召回可确保触发相关事件链或 flag 的正确顺序。
  • [add_opinion_modifier](/wiki/effect/add_opinion_modifier):召回武官通常伴随外交关系下降,配合此命令给双边施加舆论惩罚,使外交逻辑更完整。

常见坑

  1. 忘记检查武官是否存在:直接调用 recall_attache 而不用 has_attache 做前置判断,当武官并不存在时脚本不会报错但会静默失败,导致后续依赖该状态的逻辑出现意料外的结果。
  2. Scope 方向搞反:该 effect 的逻辑是"scope 国从 target 国召回武官",新手容易把 scope 和 target 对调,结果实际上是让对方国家执行召回,而非自己主动撤回武官。

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

recall_attache is commonly used in mod scenarios involving diplomatic breakdown, declarations of war, or faction switching. It automatically withdraws attachés before relations deteriorate, ensuring logical consistency. For example, recalling an attaché before a country joins an opposing faction:

# Germany recalls its attaché from China before declaring war
GER = {
    recall_attache = CHI
    declare_war_on = {
        target = CHI
        type = annex_everything
    }
}

Synergy

  • [has_attache](/wiki/trigger/has_attache): Check whether your country actually has an attaché in the target country before executing the recall, preventing invalid commands on non-existent attachés.
  • [has_attache_from](/wiki/trigger/has_attache_from): Verify the attaché deployment relationship from the target country's perspective, suitable for conditional checks within the target country's scope.
  • [declare_war_on](/wiki/effect/declare_war_on): War declarations typically sever attaché relationships automatically, but manually recalling in advance ensures correct sequencing of related event chains or flag triggers.
  • [add_opinion_modifier](/wiki/effect/add_opinion_modifier): Recalling an attaché usually accompanies a decrease in diplomatic relations. Pair this with the command to apply opinion penalties to both sides, making diplomatic logic more complete.

Common Pitfalls

  1. Forgetting to check if the attaché exists: Calling recall_attache directly without a preceding has_attache check will silently fail when the attaché doesn't exist, causing unexpected behavior in subsequent logic that depends on this state.
  2. Reversing the scope direction: This effect's logic is "the scope country recalls an attaché from the target country." Newcomers often swap scope and target, resulting in the other country executing the recall instead of your own country actively withdrawing the attaché.