Wiki

trigger · operative_leader_mission

Definition

  • Supported scope:CHARACTER
  • Supported target:none

Description

Checks whether the operative is performing the given mission:
operative_leader_mission = build_intel_network

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

operative_leader_mission is commonly used in intelligence operative system mod scenarios, such as triggering additional effects, rewards, or punitive events when an operative is executing a specific mission. A typical usage pattern is to check the current mission type within the trigger block of an operative event, allowing different missions to produce differentiated random event outcomes.

# Operative event: triggers only when the operative is building an intelligence network
country_event = {
    id = my_mod.101
    trigger = {
        any_operative_leader = {
            is_operative = yes
            operative_leader_mission = build_intel_network
        }
    }
    # ...
}

Synergy

  • [is_operative](/wiki/trigger/is_operative): Before using operative_leader_mission, it's standard practice to first confirm the character is actually an operative to avoid logic errors when applied to non-operative characters.
  • [is_operative_captured](/wiki/trigger/is_operative_captured): Pair with this to check whether an operative is currently captured; captured operatives often require branching logic, and together they form a complete operative state verification chain.
  • [harm_operative_leader](/wiki/effect/harm_operative_leader): Once an operative is confirmed to be executing a high-risk mission, combine with this effect to inflict damage to the operative within the event, simulating mission risk.
  • [operative_leader_event](/wiki/effect/operative_leader_event): Use operative_leader_mission in a limit clause to filter operatives on specific missions, then dispatch subsequent events to those operatives precisely via this effect.

Common Pitfalls

  1. Scope Error: This trigger must be used under CHARACTER scope. Beginners often write it directly in the trigger block of country scope without performing scope switching (e.g., any_operative_leader = { ... }), resulting in game errors or conditions that always evaluate to false.
  2. Mission Name Typos: Mission names (such as build_intel_network, steal_blueprints, etc.) must match the in-game definitions exactly. Typos won't generate errors but the condition will never evaluate to true, leading to hard-to-debug logic bugs.