trigger · is_operation_type
Definition
- Supported scope:
OPERATION - Supported target:
THIS,ROOT,PREV,FROM,OWNER,CONTROLLER,OCCUPIED,CAPITAL
Description
checks the type of operation
is_operation_typeOPERATIONTHIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITALchecks the type of operation
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_operation_type is commonly used in intelligence and operative system mods to execute differentiated logic for different types of operations, such as distinguishing between infiltration, sabotage, or assassination operations to trigger different subsequent events or constraints. A typical scenario is within an operation's available or trigger block, where only specific operation types are allowed to satisfy the condition.
# Example: Allow execution only when the current operation is of a specific type
available = {
is_operation_type = operation_steal_the_enigma
}
[any_operative_leader](/wiki/trigger/any_operative_leader): Commonly used in combination. First use is_operation_type to confirm the operation type, then check through any_operative_leader whether operatives involved in that operation type meet specific trait or skill requirements.[all_operative_leader](/wiki/trigger/all_operative_leader): When strict restrictions need to be applied to all operatives in an operation, combine with is_operation_type to ensure only specific operation types trigger a full-team check.[every_operative](/wiki/effect/every_operative): In effect blocks, first use is_operation_type as a prerequisite condition, then apply effects in bulk to all operatives involved in that operation using every_operative, with clear logical hierarchy.OPERATION scope. Beginners often call it directly in country scope or operative scope, causing script errors or conditions that always evaluate to false. Ensure you have correctly entered the OPERATION scope through events or operation context.id field defined in the common/operations/ directory. Guessing type names carelessly will cause conditions to fail silently without error reporting, making debugging extremely difficult.