Hands-On Usage
cancel_resistance is commonly used in occupation events or decision completion to fully suppress resistance movements in a region through specific scripting logic. For example, when a player completes a "pacification action" decision, it immediately cancels resistance activity in that state. It is also suitable for designing "permanent peace" special historical nodes in mods for certain core nations, working in conjunction with resistance-disabling commands to achieve long-term suppression effects.
# complete_effect for a certain occupation pacification decision
complete_effect = {
every_state = {
limit = {
is_core_of = GER
is_controlled_by = ROOT
}
cancel_resistance = yes
force_disable_resistance = yes
}
}
Synergy
[force_disable_resistance](/wiki/effect/force_disable_resistance): Officially recommended to use in combination. cancel_resistance only cancels the current resistance activity, while force_disable_resistance fundamentally prevents subsequent resistance from triggering again. Both are essential.
[set_occupation_law](/wiki/effect/set_occupation_law): Changing occupation laws is often the prerequisite condition for triggering or lifting resistance. Using them together in the same effect block ensures that law changes and resistance status update synchronously.
[has_active_resistance](/wiki/trigger/has_active_resistance): Before executing cancel_resistance, use this trigger to check whether the state actually has active resistance, avoiding meaningless operations on regions without resistance and ensuring more rigorous logic.
[set_compliance](/wiki/effect/set_compliance): While canceling resistance, adjust compliance simultaneously to keep both values in sync, preventing the illogical situation of very low compliance without any resistance.
Common Pitfalls
- Mistakenly believing standalone use can permanently eliminate resistance:
cancel_resistance only cancels the current resistance activity. If force_disable_resistance is not called simultaneously, resistance may retrigger during the next check cycle, making the effect appear to have "not worked". Always pair it with force_disable_resistance for permanent suppression.
- Overlooking that scope must be STATE: Beginners sometimes call this command outside a loop body in COUNTRY scope, or forget to use
limit to filter target states, causing script errors or effects on wrong states. Always ensure you have entered the specific STATE scope before execution.