trigger · num_of_operatives
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
Checks the number of operatives the country controls
num_of_operativesCOUNTRYnoneChecks the number of operatives the country controls
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
num_of_operatives 常用于情报体系 mod 中,限制某些决策或国策只有在特工数量达到一定规模后才能触发,比如解锁高级渗透任务或允许大规模破坏行动。也可用于 AI 策略条件中,判断玩家或 AI 国家是否已具备足够的情报力量来执行特定计划。
# 只有当国家拥有足够特工时,才允许激活某个破坏决策
available = {
num_of_operatives > 3
has_country_flag = intelligence_network_established
}
[has_active_mission](/wiki/trigger/has_active_mission):检查是否有特工任务正在执行,与 num_of_operatives 搭配可构建"有任务 + 有人手"的双重门槛。[any_operative_leader](/wiki/trigger/any_operative_leader):在确认特工数量足够后,进一步筛选特定特质或级别的特工,实现更精细的条件判断。[create_operative_leader](/wiki/effect/create_operative_leader):当特工数量不足时在 effect 块中创建新特工,与该 trigger 的阈值检查形成"不足则补充"的逻辑闭环。[capture_operative](/wiki/effect/capture_operative):常在 trigger 判断敌方特工规模后,决定是否触发抓捕效果,两者结合用于反情报类决策。num_of_operatives 只能在 COUNTRY scope 下使用,若误放在 STATE 或 CHARACTER scope 的 limit 块内会导致脚本报错或静默返回假,调试时难以发现。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.
num_of_operatives is commonly used in intelligence system mods to restrict certain decisions or focuses so they only trigger once a country has accumulated a sufficient operative workforce. This might unlock advanced infiltration tasks or enable large-scale sabotage operations. It can also be used in AI behavior conditions to determine whether the player or an AI nation has built up enough intelligence capacity to execute specific plans.
# Only allow activating a sabotage decision when the country has enough operatives
available = {
num_of_operatives > 3
has_country_flag = intelligence_network_established
}
[has_active_mission](/wiki/trigger/has_active_mission): Checks whether operative missions are currently running. Pairing it with num_of_operatives creates a dual threshold—"has active missions AND has personnel available."[any_operative_leader](/wiki/trigger/any_operative_leader): After confirming sufficient operative count, further refine by filtering for specific traits or ranks, enabling more granular condition logic.[create_operative_leader](/wiki/effect/create_operative_leader): When operative count falls short, create new operatives in the effect block. Combined with this trigger's threshold checks, it forms a "replenish if insufficient" feedback loop.[capture_operative](/wiki/effect/capture_operative): Often used after a trigger assesses enemy operative strength to decide whether to trigger a capture effect. Together they support counter-intelligence style decisions.num_of_operatives only works within COUNTRY scope. Accidentally placing it in a limit block under STATE or CHARACTER scope causes script errors or silent failure, making debugging difficult to track down.