trigger · is_operative
Definition
- Supported scope:
CHARACTER - Supported target:
none
Description
is_operative = yes/no - Checks if the current character is an operative
is_operativeCHARACTERnoneis_operative = yes/no - Checks if the current character is an operative
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.
is_operative is commonly used in scenarios requiring distinction between character types—for example, setting trigger conditions for intelligence officer-exclusive events, or in character management mods to restrict certain traits or advisor roles to operatives only rather than unit leaders. A typical use case appears in character focus or event trigger blocks, ensuring the current character is indeed an operative before executing subsequent logic.
# Only trigger this event if the character is an operative
character_event = {
id = my_mod.1
trigger = {
is_operative = yes
is_operative_captured = no
}
...
}
[is_operative_captured](/wiki/trigger/is_operative_captured): The most common pairing—first confirm operative status, then further check capture state. These two checks together form a complete state filter.[operative_leader_mission](/wiki/trigger/operative_leader_mission): After confirming a character is an operative, check the mission type currently being executed to trigger different storylines or rewards based on specific missions.[kill_operative](/wiki/effect/kill_operative) / [free_operative](/wiki/effect/free_operative): In effect blocks, typically use is_operative = yes as a preceding limit condition before invoking these effects to avoid accidentally triggering logic on non-operative characters.[has_trait](/wiki/trigger/has_trait): Combined usage allows filtering operatives with specific traits—for example, applying subsequent checks or effects only to operatives with certain covert skill traits.is_operative is only valid within CHARACTER scope. Using it directly in country scope (such as the top-level trigger block of a country_event) will cause errors or silent failure. You must enter character scope first via any_character / every_character or similar iteration before using it.is_operative = yes is true only for intelligence operative characters. Army commanders, naval commanders, and other CHARACTER scope characters do not satisfy this condition. You cannot use it to refer generically to "all characters"—you must handle different character types separately using is_unit_leader and similar checks.