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

实战 · 配合 · 坑

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

实战用法

operative_leader_mission 常用于情报特工系统的 mod 场景,例如当特工正在执行特定任务时触发额外效果、奖励或惩罚事件。典型用法是在特工事件的 trigger 块中判断当前任务类型,从而让不同任务产生差异化的随机事件结果。

# 特工事件:仅当特工正在构建情报网络时才会触发此事件
country_event = {
    id = my_mod.101
    trigger = {
        any_operative_leader = {
            is_operative = yes
            operative_leader_mission = build_intel_network
        }
    }
    # ...
}

配合关系

  • [is_operative](/wiki/trigger/is_operative):在使用 operative_leader_mission 前通常先确认该角色确实是特工身份,避免在非特工角色上使用导致逻辑错误。
  • [is_operative_captured](/wiki/trigger/is_operative_captured):配合检查特工当前是否被俘,被俘状态下任务判断往往需要分支处理,两者共同构成完整的特工状态判断链。
  • [harm_operative_leader](/wiki/effect/harm_operative_leader):当确认特工正在执行某项高风险任务时,配合此 effect 在事件中对特工造成伤害,模拟任务风险。
  • [operative_leader_event](/wiki/effect/operative_leader_event):在 limit 中用 operative_leader_mission 过滤特定任务的特工,再通过此 effect 精准向该特工发送后续事件。

常见坑

  1. Scope 错误:此 trigger 必须在 CHARACTER scope 下使用,新手常将其直接写在国家 scope 的 trigger 块里而不进行 scope 切换(如 any_operative_leader = { ... }),导致游戏报错或判断永远为假。
  2. 任务名拼写错误:任务名(如 build_intel_networksteal_blueprints 等)必须与游戏内定义完全一致,填写错误时不会报错但条件永远不会为真,导致难以排查的逻辑 bug。

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.