命令百科

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。