Wiki

effect · set_compliance

Definition

  • Supported scope:STATE
  • Supported target:any

Description

set compliance of a state. Example: set_compliance = 30

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

set_compliance is commonly used in scripted events or decisions to forcibly reset the compliance of an occupied state to a specific value. For example, after a "suppress uprising" event, you might pull compliance back to a stable threshold, or during mod initialization, preset reasonable compliance starting points for specific historical scenarios. Unlike the incremental add_compliance, it performs a direct value assignment, making it suitable for situations requiring precise numerical control.

# After executing a decision, forcibly set target state compliance to 50
effect_tooltip = {
    set_compliance = 50
}
hidden_effect = {
    123 = {           # STATE scope, e.g., a French state
        set_compliance = 50
    }
}

Synergy

  • [compliance](/wiki/trigger/compliance) — Use before executing set_compliance to check whether current compliance meets conditions, avoiding meaningless repeated assignments or logic conflicts.
  • [add_compliance](/wiki/effect/add_compliance) — The two are complementary: set_compliance performs absolute assignment, add_compliance performs relative adjustment. They are often used separately in different options of the same event.
  • [set_resistance](/wiki/effect/set_resistance) — Compliance and resistance typically need synchronized adjustments. In suppression or liberation scenarios, both are usually called together to maintain logical consistency in values.
  • [set_occupation_law](/wiki/effect/set_occupation_law) — Occupation law directly affects compliance cap and growth rate. When modifying occupation law, pairing it with set_compliance can immediately reflect the effect of policy changes.

Common Pitfalls

  1. Incorrect scope placement: set_compliance must be called under a STATE scope. Writing it directly in a country scope (e.g., GER = { set_compliance = 50 }) will silently fail without error messages, which is why novices often cannot find the reason the effect doesn't work.
  2. Assignment instead of accumulation: Novices often confuse this with add_complianceset_compliance will directly replace the current value. If the intention was to reward the player with "additional compliance" but set_compliance was mistakenly used instead, it can result in low-compliance states being unexpectedly raised or high-compliance states being forcibly lowered.