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