Wiki

trigger · has_active_resistance

Definition

  • Supported scope:STATE
  • Supported target:any

Description

returns true if state has an active resistance (above zero)

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

has_active_resistance is commonly used in occupation-system-related mods. You can use it to trigger events, restrict decision availability, or unlock special countermeasures when active resistance exists in a specific state. For example, you can prevent players from executing certain appeasement policies before resistance is suppressed:

available = {
    NOT = { has_active_resistance = yes }
}

Synergy

  • [resistance](/wiki/trigger/resistance): Use resistance first to check the exact resistance value, then use has_active_resistance for simple yes/no judgments. Combining both allows precise layered handling of different resistance intensities.
  • [compliance](/wiki/trigger/compliance): Resistance and compliance are inversely related. Checking compliance alongside this trigger provides a more comprehensive assessment of occupation status and prevents logical gaps.
  • [add_resistance](/wiki/effect/add_resistance): When conditions are met, add resistance to the state. This is a common pairing in event chains like "detected resistance → further escalation".
  • [set_occupation_law](/wiki/effect/set_occupation_law): After detecting active resistance, switch occupation law. This is a typical follow-up effect in suppression or appeasement logic.

Common Pitfalls

  1. Confusing scope: has_active_resistance must be used under STATE scope. Beginners often write it directly in trigger blocks under COUNTRY scope, causing script errors or silent failures. You need to switch to state scope first using any_state / every_state and similar constructs.
  2. Misunderstanding the "strictly greater than zero" condition: This trigger returns true only when resistance is strictly greater than 0. If your logic needs to distinguish between "exactly 0" and "slightly above 0" boundary cases, use [resistance](/wiki/trigger/resistance) to set precise thresholds instead of relying solely on this trigger for fine-grained numeric judgments.