Wiki

effect · remove_relation_rule_override

Definition

  • Supported scope:COUNTRY
  • Supported target:THIS

Description

Removes an override rule to the country's relation to other countries.The desc key can be used to supply a custom description for the effect when a named trigger is used as key
Alternative 1:
remove_relation_rule_override = { 
 target = GER # [Required] Target country can_not_declare_war = yes 
}
Alternative 2:
remove_relation_rule_override = { 
 trigger = is_democratic_country # [Required] Named trigger can_not_declare_war = yes 
}

Hands-On Notes

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.

Hands-On Usage

remove_relation_rule_override is commonly used to revoke diplomatic relationship restrictions previously set via add_relation_rule_override. For example, when an event concludes or a focus completes, you can lift prohibitions on declaring war against specific countries or groups of countries (such as all democratic nations). Typical scenario: after a peace agreement event triggers, remove rules that previously forced the AI not to declare war on a target, allowing normal diplomatic logic to resume.

# When a peace treaty expiration event fires, lift the war declaration restriction against Germany
country_event = {
    id = my_mod.42
    option = {
        name = my_mod.42.a
        remove_relation_rule_override = {
            target = GER
            can_not_declare_war = yes
        }
    }
}

Synergy

  • [add_relation_rule_override](/wiki/effect/add_relation_rule_override): This is the complementary add command. Typically you first use add to establish rules, then use remove to revoke them, forming a complete lifecycle for diplomatic restriction management.
  • [has_active_rule](/wiki/trigger/has_active_rule): Check whether the rule actually exists before executing removal using this trigger, avoiding ineffective removal operations when the rule hasn't been added, which could cause logical confusion.
  • [diplomatic_relation](/wiki/effect/diplomatic_relation): Also used to modify diplomatic state between two countries, commonly paired with rule override additions/removals to build complex diplomatic event chains.
  • [has_completed_focus](/wiki/trigger/has_completed_focus): Often serves as a prerequisite condition for rule removal. When a specific focus completes, it triggers revocation, binding diplomatic restrictions to focus tree progress.

Common Pitfalls

  1. Removal fields must exactly match addition fields: The values of target or trigger, and specific rule fields (such as can_not_declare_war) must correspond exactly to what was written in add_relation_rule_override. If fields don't match, the removal won't take effect and the original restriction remains, but the game won't report an error, causing "ghost rules" that are difficult to debug.
  2. target and trigger cannot be mixed: If you used target = GER (for a specific country) during addition, but write trigger = is_democratic_country during removal, these are different types of override entries and cannot cancel each other out. You must use the same method to correctly remove the corresponding rule.