effect · add_resistance
Definition
- Supported scope:
STATE - Supported target:
any
Description
add resistance to a state. Example: add_resistance = 30
add_resistanceSTATEanyadd resistance to a state. Example: add_resistance = 30
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.
add_resistance is commonly used in events or decisions to simulate the outbreak of resistance movements in occupied territories, such as public backlash following the implementation of harsh occupation policies. It can also be combined with other state penalties in scripted effects to create "occupation cost" gameplay mechanics.
# Example: After a decision is executed, resistance breaks out in the target state
state_event = {
...
immediate = {
add_resistance = 30
}
}
[has_resistance](/wiki/trigger/has_resistance): Check the current resistance value in trigger conditions to determine whether add_resistance needs to be executed, avoiding unreasonable stacking to excessively high values.[set_resistance](/wiki/effect/set_resistance): Complements add_resistance—the former sets an absolute value directly, while the latter makes incremental adjustments; using them together allows precise control over resistance trends.[add_compliance](/wiki/effect/add_compliance): Resistance and compliance typically move in opposite directions; simultaneously reducing compliance makes the script logic more coherent.[set_occupation_law](/wiki/effect/set_occupation_law): Occupation laws directly affect the growth rate of resistance and compliance; modifying the law followed immediately by add_resistance allows the policy consequences to take effect instantly.add_resistance must be executed within a STATE scope. If written in a COUNTRY scope execution block without first switching scopes using every_controlled_state or similar, the game will silently error and the effect will not take place—a mistake easily overlooked during debugging.set_resistance = 0 to wipe it clean, breaking the resistance accumulation logic across event chains; incremental operations should be prioritized to maintain numerical continuity.