Wiki

trigger · amount_taken_ideas

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

has current country picked specified amount of ideas. Category and slots is optional.
Excludes national_spirit, hidden, law = yes
amount_taken_ideas = {
	amount < <int> (mandatory)
	categories = { military_staff } (optional)
	slots = { army_chief political_advisor } (optional)
}

实战 · 配合 · 坑

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

实战用法

amount_taken_ideas 常用于检测某国是否已配置了足够数量的顾问或参谋槽位,从而解锁特定决议或国策。例如在军事改革类 mod 中,可以要求玩家先填满若干军事参谋职位才能触发后续事件,或作为决议 available 的前置条件防止玩家跳过建设阶段。

# 仅当国家已选取至少 2 个军事类顾问时,该决议才可用
available = {
    amount_taken_ideas = {
        amount > 2
        categories = { military_staff }
    }
}

配合关系

  • [has_available_idea_with_traits](/wiki/trigger/has_available_idea_with_traits):先用此 trigger 检查是否存在可选的顾问人才,再配合 amount_taken_ideas 确认当前已选数量,两者组合构成"有人可用且已充分任用"的完整判断链。
  • [add_ideas](/wiki/effect/add_ideas):当 amount_taken_ideas 条件满足后,通过此 effect 额外授予国家精神奖励,实现"组建完整顾问团队 → 获得加成"的游戏循环。
  • [has_allowed_idea_with_traits](/wiki/trigger/has_allowed_idea_with_traits):与 amount_taken_ideas 配合,可区分"国家理论上允许雇用某类顾问"与"实际已雇用多少个",用于设计分阶段解锁的任务链。
  • [activate_decision](/wiki/effect/activate_decision):在 amount_taken_ideas 达标后触发决议激活,适合实现"填满参谋部解锁战略命令"等设计。

常见坑

  1. 误以为会统计国家精神(national_spirit)和隐藏 idea:该 trigger 明确排除 national_spirithidden 以及 law = yes 类型的 idea,如果你的统计目标恰好是国家精神或隐性 buff,用此 trigger 将永远无法计入,需改用其他方式检测。
  2. amount 字段不可省略且比较符号易写错amount 是强制字段,漏写会导致脚本报错;同时要注意使用 > / < 时的语义("大于"而非"大于等于"),若想要"至少 2 个"应写 amount > 1 而非 amount > 2,否则实际门槛会比预期高一档。

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

amount_taken_ideas is commonly used to check whether a nation has configured a sufficient number of advisor or staff slots, thereby unlocking specific decisions or national focuses. For example, in military reform mods, you can require players to fill a certain number of military staff positions before triggering subsequent events, or use it as a prerequisite in a decision's available condition to prevent players from skipping the development phase.

# This decision is only available once the nation has selected at least 2 military advisors
available = {
    amount_taken_ideas = {
        amount > 2
        categories = { military_staff }
    }
}

Synergy

  • [has_available_idea_with_traits](/wiki/trigger/has_available_idea_with_traits): First use this trigger to check whether suitable advisor candidates exist, then combine with amount_taken_ideas to confirm the current number already selected. Together they form a complete logic chain verifying "talent is available AND sufficiently deployed."
  • [add_ideas](/wiki/effect/add_ideas): Once the amount_taken_ideas condition is met, use this effect to grant the nation a spirit bonus, creating a gameplay loop of "assemble a complete advisor team → receive bonuses."
  • [has_allowed_idea_with_traits](/wiki/trigger/has_allowed_idea_with_traits): Combined with amount_taken_ideas, this distinguishes between "the nation is theoretically allowed to hire a certain type of advisor" and "how many are actually hired," useful for designing phased unlock quest chains.
  • [activate_decision](/wiki/effect/activate_decision): Trigger decision activation once amount_taken_ideas is met, ideal for designs like "fill the general staff to unlock strategic commands."

Common Pitfalls

  1. Mistakenly assuming it counts national spirits and hidden ideas: This trigger explicitly excludes national_spirit, hidden, and law = yes type ideas. If your counting target happens to be national spirits or hidden buffs, this trigger will never count them and you'll need to use alternative detection methods.
  2. The amount field is mandatory and comparison operators are easily mistyped: amount is a required field; omitting it causes script errors. Additionally, pay attention to the semantics when using > / < operators ("greater than" rather than "greater than or equal to"). If you want "at least 2," write amount > 1 instead of amount > 2, otherwise the actual threshold will be one notch higher than intended.