Hands-On Usage
This trigger is commonly used in spy/intelligence-focused mods to detect whether a nation has completed intelligence resource gathering for a specific operation, thereby unlocking subsequent decisions or triggering scripted events. For example, before the player executes an "Infiltrate Navy" operation against Italy, you can first confirm that resources are in place before displaying a notification event:
# Used within the available block of a decision
available = {
has_finished_collecting_for_operation = {
target = ITA
operation = operation_infiltrate_armed_forces_navy
}
}
Synergy
[add_operation_token](/wiki/effect/add_operation_token): Immediately adds a token to the operation upon collection completion, which is the natural next step in advancing the intelligence operation workflow.
[has_active_mission](/wiki/trigger/has_active_mission): Works in conjunction to determine whether the current operation task is still ongoing, preventing duplicate trigger logic.
[has_country_flag](/wiki/trigger/has_country_flag): Typically sets a country flag after confirming collection completion, then uses this trigger to prevent repeated condition block evaluation.
[country_event](/wiki/effect/country_event): Triggers the corresponding scripted event upon collection completion, driving the narrative progression of the intelligence operation.
Common Pitfalls
- Forgetting to specify the
target field: target is a required field that points to the country scope targeted by the operation. If omitted, the game will not produce an error but the condition will never return true, causing subsequent logic to silently fail and making debugging difficult.
- Writing the operation value as a localization string instead of a script key: The
operation field expects the operation's scripted definition name (such as operation_infiltrate_armed_forces_navy), not the localized display name. Copying interface text directly will result in matching failure.