trigger · has_active_resistance
Definition
- Supported scope:
STATE - Supported target:
any
Description
returns true if state has an active resistance (above zero)
has_active_resistanceSTATEanyreturns true if state has an active resistance (above zero)
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.
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 }
}
[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.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.[resistance](/wiki/trigger/resistance) to set precise thresholds instead of relying solely on this trigger for fine-grained numeric judgments.