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

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.