effect · remove_ideas_with_trait
Definition
- Supported scope:
COUNTRY - Supported target:
THIS,ROOT,PREV,FROM,OWNER,CONTROLLER,OCCUPIED,CAPITAL
Description
Remove all ideas with specified trait from country
remove_ideas_with_traitCOUNTRYTHIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITALRemove all ideas with specified trait from country
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
remove_ideas_with_trait 常用于事件或决议中批量清理某一类顾问/国策思潮,例如当一个政权倒台时自动移除所有带有特定意识形态标记的思潮,避免手动逐一列出 remove_ideas。在动态政治变革 mod 中也常用于"清洗"带有某阵营 trait 的所有在位顾问,一行代码完成多个思潮的同步移除。
# 某国发生革命,清除所有带 fascist_ideology trait 的思潮
country_event = {
id = my_mod.42
...
option = {
name = my_mod.42.a
remove_ideas_with_trait = fascist_ideology
}
}
[add_ideas](/wiki/effect/add_ideas) — 先用本命令批量清除旧思潮,再用 add_ideas 添加新思潮,实现思潮集体替换,常见于政体转型事件。[add_popularity](/wiki/effect/add_popularity) — 清除某意识形态相关思潮后,往往需要同步调整该意识形态的民众支持度,保持数值逻辑自洽。[has_allowed_idea_with_traits](/wiki/trigger/has_allowed_idea_with_traits) — 作为前置触发器检测是否存在带特定 trait 的思潮,确认有目标后再执行移除,避免无意义调用。[remove_ideas_with_trait](/wiki/effect/remove_ideas_with_trait) 与 [has_available_idea_with_traits](/wiki/trigger/has_available_idea_with_traits) 联用 — 在 limit 块中先判断思潮是否可用,保证移除操作有对象可操作,防止报错或静默失败。traits = { ... } 字段的精确名称,若 trait 名拼写错误或根本未在 ideas 文件中声明,命令会静默执行但不产生任何效果,极难排查。character 系统定义的顾问角色;若目标是同时解除顾问职位,还需配合 deactivate_advisor 单独处理,否则顾问仍在位但思潮加成已消失,造成数据不一致。