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 块内会导致脚本报错或静默返回假,调试时难以发现。