Wiki

trigger · amount_research_slots

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

check number of research current research slots 
 amount_research_slots > 2

实战 · 配合 · 坑

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

实战用法

amount_research_slots 常用于国策、决策或事件的 available / trigger 块中,限制只有研究槽数量达到一定水平的国家才能解锁某些高级内容,例如科技强国专属选项或科研加成奖励。也可搭配 AI 逻辑,让 AI 仅在研究槽充足时才触发特定行为。

# 示例:某决策仅在拥有超过 2 个研究槽时才可用
available = {
    amount_research_slots > 2
}

配合关系

  • [add_research_slot](/wiki/effect/add_research_slot):在通过条件判断后为国家增加研究槽,常用于奖励链——先检测当前槽位数量再决定是否继续叠加,避免无上限堆积。
  • [has_completed_focus](/wiki/trigger/has_completed_focus):通常与国策完成状态联合使用,确保研究槽扩充是在特定国策路线完成后才发放奖励的前置检查。
  • [add_tech_bonus](/wiki/effect/add_tech_bonus):研究槽充足时才给予科技加成,二者配合可构成"科研能力越强·解锁越多"的正向激励设计。
  • [can_research](/wiki/trigger/can_research):与之搭配可同时检查"槽位数量"和"是否具备研究某项科技的资格",形成更完整的科研条件门控。

常见坑

  1. 比较运算符混淆amount_research_slots > 2 表示"严格大于 2"(即至少 3 槽),如果本意是"至少 2 槽"应写 >= 2,新手容易少算一格导致条件比预期更严苛。
  2. 在非 COUNTRY scope 下使用:此 trigger 仅对国家 scope 有效,若不小心写在 state scope(如某些 any_owned_state 的子块内)会导致脚本报错或静默失效,务必确认当前 scope 是否为 COUNTRY。

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_research_slots is commonly used in the available / trigger blocks of national focuses, decisions, or events to restrict access to advanced features to only those nations meeting a minimum research slot threshold. Examples include exclusive options for research-focused nations or research bonuses. It can also be paired with AI logic to trigger specific behaviors only when research slots are sufficiently abundant.

# Example: A decision becomes available only when the nation has more than 2 research slots
available = {
    amount_research_slots > 2
}

Synergy

  • [add_research_slot](/wiki/effect/add_research_slot): Grants additional research slots to a nation after condition checks pass. Commonly used in reward chains—check current slot count first before deciding whether to continue stacking to avoid unlimited accumulation.
  • [has_completed_focus](/wiki/trigger/has_completed_focus): Usually paired with national focus completion status to ensure research slot expansions are only awarded after specific focus paths are completed, serving as a prerequisite check.
  • [add_tech_bonus](/wiki/effect/add_tech_bonus): Awards technology bonuses only when research slots are sufficient. Together these create a positive incentive design where "stronger research capability unlocks more benefits."
  • [can_research](/wiki/trigger/can_research): Pairing with this allows simultaneous checks of both "slot quantity" and "whether the nation qualifies to research a specific technology," forming more comprehensive research condition gating.

Common Pitfalls

  1. Comparison operator confusion: amount_research_slots > 2 means "strictly greater than 2" (i.e., at least 3 slots). If you intend "at least 2 slots," write >= 2 instead. Newcomers often miscalculate by one, making conditions stricter than intended.
  2. Usage outside COUNTRY scope: This trigger only functions within COUNTRY scope. If accidentally placed in a state scope (such as within any_owned_state sub-blocks), it will cause script errors or silent failures. Always verify the current scope is COUNTRY.