Hands-On Usage
num_finished_operations is commonly used in intelligence/espionage mods to unlock decisions, rewards, or trigger events based on the number of operations a country has completed against a specific target. For example, after the player completes enough infiltration operations against Italy, they can gain additional intelligence bonuses or unlock subsequent mission chains:
# available condition for unlocking a decision: completed 5+ infiltration operations against Italy
available = {
num_finished_operations = {
target = ITA
operation = operation_infiltrate_armed_forces_navy
value > 5
}
}
Synergy
[add_operation_token](/wiki/effect/add_operation_token): Once the operation completion threshold is met, this effect can reward operation tokens, creating a closed-loop incentive cycle of "complete operations → gain resources".
[has_completed_focus](/wiki/trigger/has_completed_focus): Commonly paired with focus completion conditions, requiring players to both complete a specific focus tree branch and accumulate a certain number of finished operations, establishing a dual gate to prevent decisions from triggering prematurely.
[any_operative_leader](/wiki/trigger/any_operative_leader): While checking the count of completed operations, this further restricts the requirement that operatives with specific traits must exist, making conditions more precisely aligned with intelligence gameplay flow.
[add_intel](/wiki/effect/add_intel): Serves as the reward effect after satisfying num_finished_operations conditions, granting intelligence points, which aligns with the narrative logic of gaining intelligence after operation completion.
Common Pitfalls
- Overlooking the necessity of the
target field: target cannot be omitted and must contain a valid country TAG (such as ITA) or legitimate scope reference. Writing any as a literal value is invalid. Beginners often mistakenly believe target can be excluded to count total operations against all countries.
- Incorrect placement of comparison operators: In
value > 35, the comparison operator and number must immediately follow the line containing operation = <operation_id>, or be written as an independent field within the curly braces. Splitting it into forms like value = > 35 will cause parsing errors and silently fail without any error message.