Wiki

effect · add_compliance

Definition

  • Supported scope:STATE
  • Supported target:any

Description

add compliance to a state. Example: add_compliance = 30

实战 · 配合 · 坑

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

实战用法

add_compliance 常用于占领事件或决议中奖励玩家的管理行为,例如完成某项基础设施建设后提升被占领州的服从度,或通过特定国策为所有被占领州批量增加服从度。下面是一个在决议 option 中使用的简单示例:

option = {
    name = my_decision.opt_a
    # 对当前 STATE scope 增加服从度
    add_compliance = 15
}

配合关系

  • [compliance](/wiki/trigger/compliance) — 先用此 trigger 检查服从度是否达到阈值,再决定是否触发奖励逻辑,避免浪费效果或触发不必要的连锁。
  • [set_occupation_law](/wiki/effect/set_occupation_law) — 服从度与占领法令密切相关,常在切换法令后同步调整服从度以模拟政策效果。
  • [add_resistance](/wiki/effect/add_resistance) — 服从度与抵抗度呈反向关系,同时操作两者可精确模拟占领地区的政治稳定状态。
  • [add_state_modifier](/wiki/effect/add_state_modifier) — 配合自定义 modifier 为服从度高的州添加生产或人力加成,实现"高服从=更多产出"的设计逻辑。

常见坑

  1. Scope 写错add_compliance 必须在 STATE scope 下执行。新手常在 COUNTRY scope 下直接调用,导致脚本报错或静默失效;正确做法是先用 every_state / capital_scope 等切换到州 scope 再调用。
  2. set_compliance 混淆add_compliance增量叠加,set_compliance直接赋值;在循环或事件链中误用 set_compliance 会覆盖之前所有积累,而误用 add_compliance 则无法将服从度重置到特定基准值。

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_compliance is commonly used in occupation events or decisions to reward player administrative actions—for example, increasing the compliance of an occupied state after completing infrastructure construction, or batch-adding compliance to all occupied states via a specific national focus. Below is a simple example of usage within a decision option:

option = {
    name = my_decision.opt_a
    # Adds compliance to the current STATE scope
    add_compliance = 15
}

Synergy

  • [compliance](/wiki/trigger/compliance) — Use this trigger first to check if compliance reaches the threshold, then decide whether to trigger reward logic, avoiding wasted effects or unnecessary cascades.
  • [set_occupation_law](/wiki/effect/set_occupation_law) — Compliance is closely tied to occupation law; it's common to adjust compliance synchronously after switching laws to simulate policy effects.
  • [add_resistance](/wiki/effect/add_resistance) — Compliance and resistance have an inverse relationship; operating both simultaneously allows precise simulation of political stability in occupied territories.
  • [add_state_modifier](/wiki/effect/add_state_modifier) — Pair with custom modifiers to add production or manpower bonuses to high-compliance states, implementing a "high compliance = more output" design logic.

Common Pitfalls

  1. Incorrect Scope: add_compliance must execute within a STATE scope. Beginners often call it directly under COUNTRY scope, causing script errors or silent failure; the correct approach is to switch to state scope first using every_state / capital_scope or similar, then call the effect.
  2. Confusion with set_compliance: add_compliance is incremental stacking, while set_compliance is direct assignment; misusing set_compliance in loops or event chains will overwrite all previous accumulation, while misusing add_compliance prevents resetting compliance to a specific baseline value.