trigger · any_operative_leader
Definition
- Supported scope:
COUNTRY,OPERATION - Supported target:
none
Description
check if any operatives meets the trigger. tooltip=key can be defined to override title
any_operative_leaderCOUNTRY, OPERATIONnonecheck if any operatives meets the trigger. tooltip=key can be defined to override title
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
any_operative_leader 常用于检查某国是否拥有满足特定条件的情报人员,例如判断是否存在已被捕获、具有特定特质或执行特定任务的特工,从而触发事件或解锁决策。在间谍系统相关 mod 中,可用于 focus 的 available 块或 event 的 trigger 块做条件把关。
# 检查本国是否存在任意一个携带 seducer 特质的特工
available = {
any_operative_leader = {
has_trait = seducer
is_operative_captured = no
}
}
any_operative_leader 的子块中筛选拥有特定特质的特工,是最常见的过滤条件。any_operative_leader 只能在 COUNTRY 或 OPERATION scope 下使用,若在 CHARACTER 或 UNIT_LEADER scope 内调用则会报错或静默失败,新手容易在角色事件的 trigger 块中直接使用而忘记先切换回国家 scope。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.
any_operative_leader is commonly used to check whether a country has at least one operative matching specific criteria — for example, whether an operative has been captured, possesses a particular trait, or is currently running a specific mission — in order to fire events or unlock decisions. In intelligence-system mods, it fits naturally inside a focus's available block or an event's trigger block as a gating condition.
# Check whether the country has any operative with the seducer trait who is not captured
available = {
any_operative_leader = {
has_trait = seducer
is_operative_captured = no
}
}
any_operative_leader sub-block; this is the most common narrowing condition.any_operative_leader is only valid inside a COUNTRY or OPERATION scope. Calling it from a CHARACTER or UNIT_LEADER scope will cause an error or a silent failure. A common beginner mistake is using it directly inside a character event's trigger block without first switching back to the country scope.