Wiki

trigger · compliance_speed

Definition

  • Supported scope:STATE
  • Supported target:any

Description

Compares the current compliance speed of a state to a value. Example: compliance_speed > 50

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

compliance_speed is commonly used in occupation system-related mods, such as dynamically unlocking decisions or switching occupation laws based on the current compliance growth rate——for example, when a region's compliance growth is too slow, automatically trigger punitive events or restrict construction options. It's also suitable for AI logic judgments, allowing resource allocation to infrastructure construction only when compliance growth speed reaches a threshold.

# Only allow activating this decision when the state's compliance growth speed is high enough
available = {
    compliance_speed > 10
    compliance > 50
}

Synergy

  • [compliance](/wiki/trigger/compliance): The two almost always appear in pairs; compliance checks the current absolute value, while compliance_speed checks the growth trend. Combined use enables more precise description of occupation status.
  • [resistance_speed](/wiki/trigger/resistance_speed): Compliance speed and resistance speed are mirror images of each other. Checking both simultaneously allows you to determine if the situation is truly stabilizing, rather than misjudging based on a single metric.
  • [occupation_law](/wiki/trigger/occupation_law): The current occupation law directly affects compliance growth speed. Combined use enables building complete conditional chains like "trigger remedial logic when law is X and growth speed is insufficient."
  • [set_occupation_law](/wiki/effect/set_occupation_law): Commonly serves as the consequent effect to the above judgments, automatically switching to a more lenient occupation law when compliance growth speed falls short.

Common Pitfalls

  1. Mistaking it for absolute compliance value: compliance_speed compares the growth rate per day/week, not the compliance value itself; to check whether compliance has already exceeded a certain number, use compliance instead, otherwise the logic will be completely wrong.
  2. Overlooking negative values: Compliance growth speed can be negative (meaning compliance is decreasing). Conditions like compliance_speed > 0 are necessary to truly distinguish between "currently increasing" and "currently decreasing." Beginners often only set positive thresholds while missing handling for negative growth speeds, causing decisions to remain available even when compliance collapses.