Wiki

trigger · num_operative_slots

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Checks the number of available operative slots a country has.
If this differs from the number of operative, this does not mean the country can recruit an operative, but that it will eventually be able to.

实战 · 配合 · 坑

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

实战用法

num_operative_slots 常用于判断一个国家当前是否还有空余的情报人员槽位,适合在决策、焦点或任务的 available 条件中,防止玩家或 AI 在没有槽位时触发相关效果。例如在一个"派遣特工渗透"决策中,可要求国家至少拥有一定数量的可用槽位才能执行:

available = {
    num_operative_slots > 0
}

配合关系

  • [any_operative_leader](/wiki/trigger/any_operative_leader):可用来进一步检查已有特工的状态,与槽位数量结合判断"有空槽且某类特工未被部署"的复合条件。
  • [create_operative_leader](/wiki/effect/create_operative_leader):当槽位充足时才执行创建新特工的效果,避免逻辑上的冲突。
  • [has_completed_focus](/wiki/trigger/has_completed_focus):很多国策会解锁额外的特工槽位,配合使用可以校验先决国策是否完成再判断槽位是否已生效。
  • [agency_upgrade_number](/wiki/trigger/agency_upgrade_number):情报机构的升级同样会影响特工槽位上限,两者组合可精准描述情报体系的发展程度。

常见坑

  1. 把"槽位数"与"可立即招募"画等号:该 trigger 检测的是槽位总数,而非"现在就能招募"的状态——当某个槽位被占用的特工正在执行任务时,槽位数不变,但实际并不能立刻填入新特工,新手容易因此产生逻辑误判。
  2. 在非 COUNTRY scope 下使用:该 trigger 只在国家 scope 下有效,若不小心写在 STATE 或 CHARACTER scope 的条件块内,游戏会报错或静默失败,需注意用 ROOT/FROM 等明确切换回国家 scope 再调用。

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

num_operative_slots is commonly used to check whether a country currently has available operative slots, making it ideal for conditions in decisions, focuses, or missions' available blocks to prevent players or AI from triggering related effects when slots are exhausted. For example, in a "Deploy Operative for Infiltration" decision, you can require the country to possess a minimum number of available slots before execution:

available = {
    num_operative_slots > 0
}

Synergy

  • [any_operative_leader](/wiki/trigger/any_operative_leader): Can be used to further check the status of existing operatives, combined with slot count to evaluate compound conditions like "has free slots AND specific operative type is not deployed".
  • [create_operative_leader](/wiki/effect/create_operative_leader): Execute operative creation effects only when slots are sufficient, avoiding logical conflicts.
  • [has_completed_focus](/wiki/trigger/has_completed_focus): Many national focuses unlock additional operative slots; using them together allows you to verify whether prerequisite focuses are completed before checking if slot benefits are active.
  • [agency_upgrade_number](/wiki/trigger/agency_upgrade_number): Intelligence agency upgrades also affect operative slot caps; combining both enables precise description of intelligence system development level.

Common Pitfalls

  1. Conflating "slot count" with "can recruit immediately": This trigger detects total available slots, not "can recruit right now" status—when an operative occupying a slot is executing a mission, the slot count remains unchanged, but you cannot immediately fill that slot with a new operative. Newcomers often make logical errors due to this confusion.
  2. Using outside COUNTRY scope: This trigger only works under country scope; accidentally placing it in STATE or CHARACTER scope condition blocks will cause the game to error or silently fail. Be sure to explicitly switch back to country scope using ROOT/FROM before calling it.