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
- 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.
- 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.