Hands-On Usage
set_collaboration is commonly used in espionage/infiltration-themed mod scenarios, such as directly setting a target nation's collaboration to a specific value after the player completes a particular national focus or decision, rather than relying on organic growth. Unlike add_collaboration, it performs a direct assignment rather than addition, making it ideal for initializing collaboration values or force-resetting to a specific stage in scripted events.
# After Germany completes the "Infiltrate Poland" focus, forcibly set collaboration with Poland to 30%
focus = {
id = GER_infiltrate_POL
# ...
completion_reward = {
GER = {
set_collaboration = {
target = POL
value = 0.3
}
}
}
}
Synergy
[has_collaboration](/wiki/trigger/has_collaboration): Use before or after set to check whether collaboration has reached a threshold, determining whether to trigger subsequent options or events.
[add_collaboration](/wiki/effect/add_collaboration): Combining both enables "reset to baseline, then stack additively as needed" precision control logic.
[activate_targeted_decision](/wiki/effect/activate_targeted_decision): When collaboration reaches a specific value, unlock exclusive decisions targeting that nation, forming a complete infiltration progression chain.
[add_opinion_modifier](/wiki/effect/add_opinion_modifier): Resetting collaboration often accompanies synchronized adjustments to diplomatic relations; pairing both maintains narrative consistency.
Common Pitfalls
- Incorrect scope assignment: The effect sets collaboration from the "current scope nation" toward the "target nation", so the scope must be the actor (e.g., GER), and target must be the infiltrated nation (e.g., POL). Beginners often reverse the two, causing collaboration to apply in the wrong direction, resulting in complete ineffectiveness or impact on the wrong bilateral relationship in-game.
- Logic confusion when mixing with
add_collaboration: set_collaboration is an assignment override; if you set then add within the same execution block, the final value is the set baseline plus the add increment, not two independent operations stacking separately. Clarify execution order to achieve the intended value.