Wiki

effect · add_resistance_target

Definition

  • Supported scope:STATE
  • Supported target:any

Description

adds resistance target to the scoped state :
add_resistance_target = 10
add_resistance_target = { 
  id = 123 #if set, id can be used for removing an added resistance target using remove_resistance_target effect  amount = 10 #original tag of new country
  occupied = GER #if set, the resistance target will only apply if the occupied country is GER
  occupier = ENG #if set, the resistance target will only apply if the occupier country is ENG
  days = 42 #if set the newly added resistance target will be only active for this many days
  tooltip = "BLABLA" #tooltip loc key to display in resistance target tooltips
}

实战 · 配合 · 坑

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

实战用法

add_resistance_target 常用于占领事件或决策中,为特定州临时提高抵抗目标值,模拟民众对压迫性占领政策的反应,或配合叙事事件制造动荡局势。例如在"残酷镇压"决策触发后,为被占领州设置带时限的额外抵抗目标,并绑定一个 ID 以便后续通过其他事件手动移除:

# 在某占领决策的 effect 块中
123_occupied_state = {
    add_resistance_target = {
        id = brutal_crackdown_target
        amount = 15
        occupied = POL
        occupier = GER
        days = 90
        tooltip = "BRUTAL_CRACKDOWN_RESISTANCE_TT"
    }
}

配合关系

  • [remove_resistance_target](/wiki/effect/remove_resistance_target):与本命令配对使用,当设置了 id 字段后,可在条件满足时(如事件触发或决策完成)精确移除之前添加的抵抗目标,避免永久堆叠效果。
  • [resistance_target](/wiki/trigger/resistance_target):用于检测当前州的抵抗目标值是否已达到某阈值,可在 add_resistance_target 执行后作为后续触发器判断,决定是否进一步触发镇压事件。
  • [add_compliance](/wiki/effect/add_compliance):抵抗目标与顺从度是占领系统的两面,添加抵抗目标的同时往往需要配合降低顺从度,共同模拟占领状态的恶化。
  • [set_occupation_law](/wiki/effect/set_occupation_law):修改占领法律是导致抵抗目标变动的常见前提操作,两者组合可完整还原一套"政策收紧→民心动荡"的叙事逻辑。

常见坑

  1. 忘记设置 id 导致无法移除:若不填写 id 字段,后续将无法通过 remove_resistance_target 精确移除该条目,多次触发后效果会永久累加,造成州抵抗目标异常偏高且无法回滚。
  2. 在非 STATE scope 下调用:该命令必须在州 scope 内执行,若在国家或部队 scope 中直接调用会导致脚本报错或静默失效,需确保先通过州引用(如 123 = { ... })进入正确 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

add_resistance_target is commonly used in occupation events or decisions to temporarily increase the resistance target value for a specific state, simulating the population's reaction to oppressive occupation policies or creating unrest scenarios in conjunction with narrative events. For example, after a "brutal crackdown" decision is triggered, you can set a time-limited additional resistance target for the occupied state and bind it with an ID for later manual removal via other events:

# In the effect block of an occupation decision
123_occupied_state = {
    add_resistance_target = {
        id = brutal_crackdown_target
        amount = 15
        occupied = POL
        occupier = GER
        days = 90
        tooltip = "BRUTAL_CRACKDOWN_RESISTANCE_TT"
    }
}

Synergy

  • [remove_resistance_target](/wiki/effect/remove_resistance_target): Used in tandem with this command. Once the id field is set, you can precisely remove previously added resistance targets when conditions are met (such as event triggers or decision completion), avoiding permanent stacking of effects.
  • [resistance_target](/wiki/trigger/resistance_target): Used to detect whether the current state's resistance target value has reached a certain threshold. It can serve as a subsequent trigger after add_resistance_target execution to determine whether to further trigger suppression events.
  • [add_compliance](/wiki/effect/add_compliance): Resistance targets and compliance are two sides of the occupation system. When adding resistance targets, you typically need to pair it with lowering compliance to jointly simulate the deterioration of occupation status.
  • [set_occupation_law](/wiki/effect/set_occupation_law): Modifying occupation laws is a common prerequisite operation that causes resistance target fluctuations. Combined with this command, it can fully recreate a narrative logic of "policy tightening → civil unrest".

Common Pitfalls

  1. Forgetting to set id makes removal impossible: If the id field is not filled, you will be unable to precisely remove that entry later via remove_resistance_target. Multiple triggers will cause the effects to accumulate permanently, resulting in an abnormally high state resistance target that cannot be rolled back.
  2. Calling outside STATE scope: This command must be executed within a state scope. Calling it directly in a country or army scope will cause script errors or silent failures. Make sure to enter the correct scope first through state references (such as 123 = { ... }).