Wiki

effect · remove_ideas

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

remove idea(s) from country

实战 · 配合 · 坑

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

实战用法

remove_ideas 常用于事件或决议执行后撤销某个政策/国策附带的国家思潮,例如战争结束后移除战时动员 idea,或外交谈判成功后移除制裁 idea。下面是一个典型的事件选项示例:

option = {
    name = my_event.1.a
    # 战争结束,移除战时动员思潮
    remove_ideas = war_mobilization_idea
    add_stability = 0.05
}

若要一次移除多个 idea,可传入列表形式:

remove_ideas = {
    war_mobilization_idea
    economic_crisis_idea
}

配合关系

  • [add_ideas](/wiki/effect/add_ideas) — 移除旧 idea 后立刻替换为新 idea,实现思潮"升级"或"切换"的逻辑,是最常见的配对模式。
  • [add_stability](/wiki/effect/add_stability) / [add_political_power](/wiki/effect/add_political_power) — 移除负面 idea 后往往附带资源补偿,以模拟政策解除带来的红利。
  • [has_country_flag](/wiki/trigger/has_country_flag) — 在执行 remove_ideas 前先用 flag 判断该 idea 是否由特定流程添加,避免在 idea 不存在时产生脚本报错或逻辑混乱。
  • [amount_taken_ideas](/wiki/trigger/amount_taken_ideas) — 用于触发条件判断当前持有的 idea 数量,决定是否需要批量移除,常见于清理堆积的临时 buff/debuff idea。

常见坑

  1. 移除不存在的 idea 不会报错但逻辑静默失败:如果目标国家根本没有持有该 idea,游戏不会抛出错误,这会让调试时难以察觉"移除其实没发生"的问题;建议在执行前用 has_idea 触发器(或相关 flag)做保护性判断。
  2. 混淆 idea 与 advisor(顾问):顾问在脚本层面是特殊类型的 idea,但某些通过 activate_advisor 激活的顾问需要用 deactivate_advisor 而非 remove_ideas 来移除,直接用 remove_ideas 处理顾问型 idea 可能导致槽位残留或 UI 异常。

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_ideas is commonly used in events or decisions to revoke a national idea/spirit attached to a focus, such as removing a wartime mobilization idea after war ends, or removing a sanctions idea after successful diplomatic negotiation. Below is a typical event option example:

option = {
    name = my_event.1.a
    # War ends, remove wartime mobilization spirit
    remove_ideas = war_mobilization_idea
    add_stability = 0.05
}

To remove multiple ideas at once, pass them as a list:

remove_ideas = {
    war_mobilization_idea
    economic_crisis_idea
}

Synergy

  • [add_ideas](/wiki/effect/add_ideas) — Remove an old idea and immediately replace it with a new one, implementing logic for idea "upgrades" or "switches"; this is the most common pairing pattern.
  • [add_stability](/wiki/effect/add_stability) / [add_political_power](/wiki/effect/add_political_power) — After removing negative ideas, resource compensation is often applied to simulate the benefits of policy removal.
  • [has_country_flag](/wiki/trigger/has_country_flag) — Use a flag check before executing remove_ideas to verify whether the idea was added by a specific process, avoiding script errors or logic confusion when the idea doesn't exist.
  • [amount_taken_ideas](/wiki/trigger/amount_taken_ideas) — Used in trigger conditions to check the current number of ideas held, determining whether batch removal is needed; commonly seen when cleaning up accumulated temporary buff/debuff ideas.

Common Pitfalls

  1. Removing a non-existent idea produces no error but silently fails logically: If the target country doesn't actually have that idea, the game won't throw an error, making it difficult to detect during debugging that "the removal didn't actually happen"; it's recommended to use a protective check with the has_idea trigger (or related flags) before execution.
  2. Confusing ideas with advisors: Advisors are a special type of idea at the script level, but some advisors activated via activate_advisor require deactivate_advisor rather than remove_ideas to be removed; using remove_ideas directly on advisor-type ideas may cause slot residue or UI anomalies.