effect · remove_resistance_target
Definition
- Supported scope:
STATE - Supported target:
any
Description
removes a previously added resistance target using its id. No tooltips are generated.:
remove_resistance_target = 42
remove_resistance_targetSTATEanyremoves a previously added resistance target using its id. No tooltips are generated.:
remove_resistance_target = 42
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.
remove_resistance_target is used to clean up resistance target markers previously added via add_resistance_target after a mission or decision completes, preventing stale resistance target entries from accumulating in game memory. A typical scenario is in occupation event chains, where when a special event-triggered enhanced resistance phase ends, the corresponding target is precisely removed by id.
# After a decision completes, remove the previously added special resistance target
123 = { # Execute in STATE scope
remove_resistance_target = 42
}
[add_resistance_target](/wiki/effect/add_resistance_target): Use as a paired operation. First register the target with add_resistance_target to obtain an id, then remove it by the same id with remove_resistance_target when the event concludes, forming a complete lifecycle management.[resistance_target](/wiki/trigger/resistance_target): Before executing removal, use this trigger to verify whether the target id still exists, avoiding script exceptions from attempting to remove non-existent targets.[cancel_resistance](/wiki/effect/cancel_resistance): Commonly used in combination within the same execution block. When completely ending a region's resistance state, both terminate the ongoing resistance logic and clean up the corresponding resistance target marker.[has_active_resistance](/wiki/trigger/has_active_resistance): Serves as a prerequisite condition to confirm the STATE is currently in active resistance state before deciding whether to execute the removal operation, making the logic more robust.add_resistance_target. Beginners often hardcode a guessed number (such as 42) instead of recording the real assigned id, resulting in removal failure with no error messages, leaving the resistance target permanently orphaned.