trigger · has_resistance
Definition
- Supported scope:
STATE - Supported target:
any
Description
returns true if state has a resistance
has_resistanceSTATEanyreturns true if state has a resistance
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_resistance is commonly used in occupation system-related mods to check whether a state has active resistance movements, allowing you to trigger special decisions, events, or restrict certain actions. For example, when you want to apply suppression decisions only to states with resistance activity, you can use it as a filter condition in available.
# Decision: Suppress Resistance (available only when state has resistance)
available = {
FROM = {
has_resistance = yes
is_controlled_by = ROOT
}
}
[resistance](/wiki/trigger/resistance): Knowing "resistance exists" is often insufficient. Combine it with resistance to further evaluate the specific numerical range of resistance values and implement tiered response logic.[has_active_resistance](/wiki/trigger/has_active_resistance): These two triggers distinguish between "resistance value exists" and "resistance activity is actually activated." Using them together allows precise differentiation between dormant and active phases.[add_resistance](/wiki/effect/add_resistance) / [set_resistance](/wiki/effect/set_resistance): Dynamically adjust resistance values based on trigger results within effect blocks, forming a complete "check → modify" workflow.[cancel_resistance](/wiki/effect/cancel_resistance): When conditions are met, completely eliminate resistance. Commonly paired with has_resistance as a pre-check during mission completion or event resolution.has_resistance must be called within a STATE scope. Beginners often write it directly in country or province scopes, causing script errors or silent failures. You need to switch to the correct state scope first using commands like every_neighbor_state or capital_scope.has_active_resistance: has_resistance returns true whenever a state's resistance value is non-zero, even if resistance hasn't yet "activated." If your logic needs to check whether resistance has actually begun affecting gameplay, use has_active_resistance instead. Otherwise, you risk triggering subsequent logic prematurely when resistance values are extremely low.