Wiki

effect · cancel_resistance

Definition

  • Supported scope:STATE
  • Supported target:any

Description

cancels resistance activity for a core country.
use along with force_disable_resistance to disable resistance forever
Example : cancel_resistance = yes

实战 · 配合 · 坑

实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

cancel_resistance 常用于占领事件或决议完成后,配合特定剧本逻辑彻底平息某地区的抵抗运动,例如玩家完成了某项"安抚行动"决议时立即取消该州的抵抗活动。也适用于 mod 中为某些核心国家设计"永久和平"的特殊历史节点,与禁用抵抗的指令联动实现长期压制效果。

# 某占领安抚决议的 complete_effect
complete_effect = {
    every_state = {
        limit = {
            is_core_of = GER
            is_controlled_by = ROOT
        }
        cancel_resistance = yes
        force_disable_resistance = yes
    }
}

配合关系

  • [force_disable_resistance](/wiki/effect/force_disable_resistance):官方明确推荐搭配使用,cancel_resistance 仅取消当前一次抵抗活动,而 force_disable_resistance 才能从根本上阻止后续抵抗再次触发,两者缺一不可。
  • [set_occupation_law](/wiki/effect/set_occupation_law):更换占领法令往往是触发或解除抵抗的前提条件,在同一 effect 块中配合使用可保证法令与抵抗状态同步更新。
  • [has_active_resistance](/wiki/trigger/has_active_resistance):在执行 cancel_resistance 前用该触发器判断当前州是否确实存在活跃抵抗,避免对无抵抗地区执行无意义操作,逻辑更严谨。
  • [set_compliance](/wiki/effect/set_compliance):在取消抵抗的同时调整服从度,使两项数值保持一致,防止出现服从度极低却无抵抗的不合理状态。

常见坑

  1. 误以为单独使用即可永久消除抵抗cancel_resistance 只是取消当前的抵抗活动,如果不同时调用 force_disable_resistance,下一个检查周期抵抗可能重新触发,导致效果看起来"没生效"。
  2. 忽略 scope 必须是 STATE:新手有时在 COUNTRY scope 下的循环体外直接调用此命令,或忘记用 limit 筛选目标州,导致脚本报错或对错误的州生效;务必确认执行时已进入具体的 STATE scope。

Hands-On Notes

Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.

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

  1. 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.
  2. 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.