Wiki

trigger · is_running_operation

Definition

  • Supported scope:COUNTRY
  • Supported target:any

Description

checks if running a specific operation. operation can be ommitted to check for any operation
Example: 
is_running_operation = { 
 target = ITA 
 operation = operation_infiltrate_armed_forces_navy}

实战 · 配合 · 坑

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

实战用法

is_running_operation 常用于间谍/情报 mod 中,根据某国是否正在对自己执行特定渗透行动来动态触发事件或解锁反制选项。例如在一个反间谍事件的 trigger 块中检测敌国是否正对本国运行某渗透行动,从而决定是否显示该事件选项。

# 检测德国是否正在对本国执行任意情报行动
country_event = {
    id = counterspy.1
    trigger = {
        is_running_operation = {
            target = GER
        }
    }
}

# 检测意大利是否正在执行特定的海军渗透行动
available = {
    is_running_operation = {
        target = ITA
        operation = operation_infiltrate_armed_forces_navy
    }
}

配合关系

  • [has_captured_operative](/wiki/trigger/has_captured_operative):当判定敌国正在运行行动的同时,检查本国是否已捕获对方特工,两者组合可构成"正在被渗透且已抓获线人"的完整反情报条件链。
  • [has_active_mission](/wiki/trigger/has_active_mission):与本 trigger 搭配,可区分"对方正在对我执行行动"与"我方是否有激活的反制任务",形成攻防双向判断。
  • [capture_operative](/wiki/effect/capture_operative):在 is_running_operation 确认敌国行动存在后,用此 effect 触发抓获特工的结果,逻辑上构成"发现行动→实施抓捕"的完整流程。
  • [add_operation_token](/wiki/effect/add_operation_token):在检测到对方行动后,为己方情报机构补充行动令牌资源,配合反制行动的消耗机制使用。

常见坑

  1. 省略 operation 字段时误以为无效:不填 operation 是合法写法,表示检查目标国是否有任意行动在运行,但新手常以为必须指定行动名才能生效,导致写了冗余的多重 OR 块来枚举所有行动。
  2. target 方向搞反target 指的是行动的目标国(即被渗透方),不是执行行动的发起国;该 trigger 的 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

is_running_operation is commonly used in espionage/intelligence mods to dynamically trigger events or unlock countermeasures based on whether a specific nation is executing a particular operation against your country. For example, in a trigger block of a counterintelligence event, you can check whether an enemy nation is running an operation against you, thereby determining whether to display the event option.

# Check if Germany is running any intelligence operation against this country
country_event = {
    id = counterspy.1
    trigger = {
        is_running_operation = {
            target = GER
        }
    }
}

# Check if Italy is running a specific naval infiltration operation
available = {
    is_running_operation = {
        target = ITA
        operation = operation_infiltrate_armed_forces_navy
    }
}

Synergy

  • [has_captured_operative](/wiki/trigger/has_captured_operative): When determining that an enemy nation is running an operation, also check whether your country has captured their operative. Together, these form a complete counterintelligence condition chain for "being infiltrated while having captured the operative."
  • [has_active_mission](/wiki/trigger/has_active_mission): Paired with this trigger, you can differentiate between "the opponent is executing an operation against me" and "do I have an active countermeasure mission," creating bidirectional offensive and defensive logic.
  • [capture_operative](/wiki/effect/capture_operative): After confirming with is_running_operation that an enemy operation exists, use this effect to trigger the operative capture outcome, logically forming a complete "detect operation → execute capture" workflow.
  • [add_operation_token](/wiki/effect/add_operation_token): After detecting an opponent's operation, use this to replenish your intelligence agency's operation token resources, complementing the resource consumption mechanics of countermeasures.

Common Pitfalls

  1. Mistakenly thinking the condition is invalid when omitting the operation field: Leaving out operation is a valid syntax that checks whether the target nation has any operation running at all. However, beginners often assume that the operation name must be specified for it to work, leading them to write redundant multiple OR blocks that enumerate all possible operations.
  2. Reversing the target direction: target refers to the target nation of the operation (i.e., the nation being infiltrated), not the nation initiating the operation. The scope of this trigger is the initiating nation (the nation executing the intelligence operation). Beginners frequently swap these two, causing the condition to never evaluate true.