Wiki

effect · turn_operative

Definition

  • Supported scope:COUNTRY, CHARACTER
  • Supported target:THIS, ROOT, PREV, FROM

Description

An operative is turned by the specified country.
This transfers the operative to the target country and make it appear as killed to the country of origin (increases the death counter and lock the slot).
This fires the on_action on_operative_death with as killer the target country.
If the target country is the owner of the operative, this has no effect and an error is logged.

WARN: the on_action might execute immediatly, before any effect listed after the occurence of turn_operative.

Examples:
GER = {
    turn_operative = PREV  # where PREV is an operative (unit leader)
    # or
    turn_operative = {
        operative = PREV
    }
}

turn_operative = { turned_by = GER } # where the scope is an unit leader

实战 · 配合 · 坑

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

实战用法

turn_operative 常用于谍报剧情事件或决议中,模拟敌方特工被策反并转投己方的叙事。例如在一个事件中,玩家的特工被敌国捕获后,不是被处决而是被说服倒戈,此时可用该 effect 实现情报人员的阵营转移并触发相关后续逻辑。

# 在事件 option 中:敌国 GER 的特工 PREV 被我方策反
country_event = {
    id = spy_events.5
    option = {
        name = spy_events.5.a
        # scope 为 FROM(被捕特工所属国家)的情境下
        GER = {
            turn_operative = {
                operative = PREV
            }
        }
    }
}

# 或者在 unit leader scope 下直接指定策反方
turn_operative = { turned_by = GER }

配合关系

  • [capture_operative](/wiki/effect/capture_operative):通常先捕获特工,再决定是处决还是策反,两者是同一谍报流程的前后两步。
  • [kill_operative](/wiki/effect/kill_operative):作为 turn_operative 的替代分支——在同一 option 分支逻辑中,一个选项策反、另一个选项处决,二者互斥配合构成完整的谍报事件选择。
  • [free_operative](/wiki/effect/free_operative):释放、策反、处决三选一,覆盖对被捕特工的全部处置方式,常在同一事件的不同 option 中分别使用。
  • [has_captured_operative](/wiki/trigger/has_captured_operative):触发器用于判断当前是否持有被捕特工,只有满足此条件才应出现含 turn_operative 的选项,避免对未被捕特工非法执行该 effect。

常见坑

  1. 目标国与特工归属国相同时无效:若 turned_by 指定的国家本身就是该特工的所属国,游戏会报错并跳过执行——这意味着你不能用此 effect 把自己的特工"策反回自己",策划事件时要确保策反方与特工原属国不同。
  2. on_action 执行顺序陷阱:官方明确警告 on_operative_death 这个 on_action 可能在 turn_operative 之后的 effect 执行之前就触发,若后续 effect 依赖"特工已转移"的状态,可能得到意料之外的结果,建议将依赖顺序的逻辑移至 on_action 内部或用事件延迟处理。

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

turn_operative is commonly used in espionage event chains or decisions to simulate narrative scenarios where enemy operatives are turned and defect to your side. For example, in an event where your operative is captured by a hostile nation but instead of execution is convinced to switch allegiances, this effect can be used to transfer the intelligence asset and trigger subsequent related logic.

# In an event option: enemy operative PREV from GER is turned by your side
country_event = {
    id = spy_events.5
    option = {
        name = spy_events.5.a
        # scope is FROM (the nation owning the captured operative)
        GER = {
            turn_operative = {
                operative = PREV
            }
        }
    }
}

# Or directly specify the turning party under unit leader scope
turn_operative = { turned_by = GER }

Synergy

  • [capture_operative](/wiki/effect/capture_operative): Typically the operative is captured first, then a decision is made whether to execute or turn them—the two are sequential steps in the same espionage workflow.
  • [kill_operative](/wiki/effect/kill_operative): Serves as an alternative branch to turn_operative—in the same option decision tree, one choice turns the operative while another executes them, the two are mutually exclusive and together form a complete espionage event choice.
  • [free_operative](/wiki/effect/free_operative): Release, turn, or execute—a three-way choice covering all disposal methods for captured operatives, commonly used across different options in the same event.
  • [has_captured_operative](/wiki/trigger/has_captured_operative): A trigger to check whether you currently hold a captured operative; only when this condition is met should options containing turn_operative appear, preventing illegal execution of the effect on non-captured operatives.

Common Pitfalls

  1. Ineffective when target nation and operative's home nation are identical: If the nation specified by turned_by is already the operative's home nation, the game will error and skip execution—this means you cannot use this effect to "turn your own operative back to yourself." When scripting events, ensure the turning nation differs from the operative's original nation.
  2. on_action execution order trap: The developer explicitly warns that the on_operative_death on_action may trigger before effects execute after turn_operative, so if subsequent effects depend on "operative already transferred" state, you may get unexpected results. It is recommended to move order-dependent logic inside the on_action or use event delays to handle it.