Wiki

effect · deactivate_advisor

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Dismiss an advisor from their currently occupied role slot

Example:
deactivate_advisor = GER_character_token_air_chief

实战 · 配合 · 坑

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

实战用法

deactivate_advisor 常用于剧本事件或国家焦点中动态撤换顾问——例如当某位空军参谋在特定历史节点战败或被政治清洗时,自动将其从职位上解雇。配合角色系统,也常用于在内战或政变事件中批量清除旧政权的顾问阵容。

country_event = {
    id = my_mod.42
    title = "政变清洗"
    # ...
    option = {
        name = "清除旧势力顾问"
        deactivate_advisor = GER_character_token_air_chief
        deactivate_advisor = GER_character_token_political_advisor
        add_political_power = -50
    }
}

配合关系

  • [activate_advisor](/wiki/effect/activate_advisor) — 与 deactivate_advisor 互为一对,先解雇旧顾问再立即启用新顾问,实现顾问替换逻辑。
  • [add_ideas](/wiki/effect/add_ideas) / [add_advisor_role](/wiki/effect/add_advisor_role) — 解雇顾问后往往需要通过添加新角色或思潮来填补其带来的国家加成空缺。
  • [has_country_leader_with_trait](/wiki/trigger/has_country_leader_with_trait) — 常作为前置判断,在特定领袖执政时才触发顾问解雇,避免错误时机下的状态异常。
  • [country_event](/wiki/effect/country_event) — 顾问被解雇后触发后续事件(如新顾问上任通知),形成完整叙事链。

常见坑

  1. Token 拼写错误导致静默失效deactivate_advisor 使用的是角色的 token 字符串,若 token 与 create_corps_commander / generate_character 等处定义的 token 不一致,游戏不会报错但顾问不会被解雇,极难排查。
  2. 对未激活的顾问执行指令:若目标顾问当前并未占据任何顾问槽位(即本就未激活),该指令不会产生任何效果,但也不会报错——新手容易误以为逻辑已正确执行,实际上前置 [has_allowed_idea_with_traits](/wiki/trigger/has_allowed_idea_with_traits) 检查可避免此类无效调用。

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

deactivate_advisor is commonly used in scripted events or national focuses to dynamically remove advisors—for example, automatically dismissing an air force chief of staff from their position when they suffer a military defeat or fall victim to political purges at a specific historical juncture. In conjunction with the character system, it is also frequently employed to batch-remove advisors from the old regime during civil war or coup events.

country_event = {
    id = my_mod.42
    title = "Purge from Coup"
    # ...
    option = {
        name = "Remove Old Regime Advisors"
        deactivate_advisor = GER_character_token_air_chief
        deactivate_advisor = GER_character_token_political_advisor
        add_political_power = -50
    }
}

Synergy

  • [activate_advisor](/wiki/effect/activate_advisor) — Forms a complementary pair with deactivate_advisor; fire the old advisor and immediately activate a new one to achieve advisor replacement logic.
  • [add_ideas](/wiki/effect/add_ideas) / [add_advisor_role](/wiki/effect/add_advisor_role) — After dismissing an advisor, it is often necessary to add new roles or ideas to compensate for the national bonuses they provided.
  • [has_country_leader_with_trait](/wiki/trigger/has_country_leader_with_trait) — Commonly used as a precondition to trigger advisor dismissal only when a specific leader is in power, preventing state anomalies at incorrect timing.
  • [country_event](/wiki/effect/country_event) — Fire a follow-up event after an advisor is dismissed (such as a notification of the new advisor taking office), forming a complete narrative chain.

Common Pitfalls

  1. Silent failure due to token typos: deactivate_advisor uses the character's token string; if the token is inconsistent with those defined in create_corps_commander / generate_character and similar commands, the game will not report an error but the advisor will not be dismissed—extremely difficult to debug.
  2. Executing the command on an inactive advisor: If the target advisor is not currently occupying any advisor slot (i.e., not already activated), the command will have no effect and produce no error—novices easily mistake this for successful execution when a preceding [has_allowed_idea_with_traits](/wiki/trigger/has_allowed_idea_with_traits) check could prevent such ineffectual calls.