Hands-On Usage
operative_leader_operation is commonly used in intelligence mods to dynamically alter operative behavior or trigger story events during specific operations—for example, allowing certain option activations only when an operative is executing a "rescue operative" mission, or locking player intervention choices during the operation. Below is a typical event condition example:
# In an operative event, display this option only when the operative is executing a rescue operation
option = {
name = my_operative_event.option_a
trigger = {
FROM = {
operative_leader_operation = operation_rescue_operative
}
}
# ... subsequent effects
}
Synergy
[is_operative](/wiki/trigger/is_operative): Before use, confirm the current scope is an operative character to avoid false positives on non-operative CHARACTERs that could cause errors.
[operative_leader_mission](/wiki/trigger/operative_leader_mission): Commonly used alongside this trigger—the former checks the specific operation being executed, while the latter checks the current mission mode, and combining them allows precise matching of the operative's complete work status.
[force_operative_leader_into_hiding](/wiki/effect/force_operative_leader_into_hiding): After confirming an operative is executing a certain operation, you can forcibly place them into hiding based on this condition, commonly seen in follow-up logic for "mission failure" or "exposure risk" scenarios.
[harm_operative_leader](/wiki/effect/harm_operative_leader): Similarly triggers after the operation check returns true, used to simulate story consequences where the operative takes damage during high-risk operations.
Common Pitfalls
- Scope in wrong location: This trigger must be called within a
CHARACTER scope. Beginners often write it directly in a country scope (such as when ROOT or FROM points to a country), causing the game to error or the condition to always return false. You must first switch to operative character scope using methods like country_leader or every_operative before checking the condition.
- Operation token spelling depends on actual operation definition: The parameter passed in (such as
operation_rescue_operative) must exactly match the operation key actually defined in common/operations/. If a custom operation added by a mod has the wrong key spelling, the condition will silently return false without throwing an error, making it extremely difficult to debug.