Hands-On Usage
clear_rule is commonly used in country focuses, event options, or decision follow-up logic to revoke behavior restrictions previously imposed via set_rule. For example, it can lift a war declaration ban after a diplomatic crisis is resolved, or restore a nation's normal action capabilities after a specific objective is completed. Note that the parameter syntax of this effect mirrors set_rule exactly—simply specify the rule you want to clear.
# Event option: Diplomatic crisis resolved, restore war declaration capability
option = {
name = my_event.1.a
clear_rule = {
can_not_declare_war = yes
}
}
Synergy
[has_active_rule](/wiki/trigger/has_active_rule): Use this trigger to check if a rule is still active before clearing it, preventing invalid calls or logic conflicts.
[add_political_power](/wiki/effect/add_political_power): Often used in tandem within the same event option, representing a nation spending political capital in exchange for freedom of action (such as lifting war restrictions).
[add_opinion_modifier](/wiki/effect/add_opinion_modifier): After a rule is cleared, diplomatic relationship shifts typically follow. Use this command to synchronize adjustments to opinion modifiers with relevant nations.
[country_event](/wiki/effect/country_event): Trigger subsequent events after clearing a rule to construct multi-stage narrative chains and maintain narrative coherence.
Common Pitfalls
- Misspelling the rule name or value prevents clearing: The contents of the
clear_rule sub-block must match exactly what was specified in the original set_rule call (including both the rule name and value). If the spelling does not match, the game will not report an error but the rule will remain in effect—a mistake newcomers frequently overlook.
- Incorrect scope usage:
clear_rule can only be executed within a COUNTRY scope. If invoked in a STATE or CHARACTER scope (for example, written in a unit leader's effect block without switching back to country scope), the script will silently fail.