Wiki

effect · remove_relation_modifier

Definition

  • Supported scope:COUNTRY
  • Supported target:THIS

Description

Removes a static modifier between current scope and target
Example: add_relation_modifier = {
	target = TAG # target of the relation
	modifier = static_modifier_name_here #Name of the modifier added
	}
}

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_modifier is commonly used in diplomatic events or after focus tree completion to revoke bilateral relation bonuses/penalties previously applied via add_relation_modifier. Typical scenarios include when a ceasefire agreement expires, an alliance dissolves, or a specific narrative phase ends and temporary diplomatic states need to be cleared. A classic use case is removing a relation modifier toward a target nation at the end of a reciprocal trade agreement, from the current country's perspective.

# Remove bilateral modifier when diplomatic agreement expires
country_event = {
    id = my_mod.42
    option = {
        name = my_mod.42.a
        # Remove relation modifier toward ENG from this country
        remove_relation_modifier = {
            target = ENG
            modifier = trade_pact_bonus
        }
        # Also have ENG remove the modifier toward us
        ENG = {
            remove_relation_modifier = {
                target = ROOT
                modifier = trade_pact_bonus
            }
        }
    }
}

Synergy

  • [add_relation_modifier](/wiki/effect/add_relation_modifier) — Use as a paired counterpart; add first, then remove to manage the complete lifecycle of relation modifiers.
  • [add_opinion_modifier](/wiki/effect/add_opinion_modifier) / [add_days_remove](/wiki/effect/add_days_remove) — If you need relation effects with automatic expiration, consider using modifiers with a days field instead, paired with this command to manually clear any lingering effects when needed.
  • [has_dynamic_modifier](/wiki/trigger/has_dynamic_modifier) — Before removing, use similar existence checks (or has_country_flag) to confirm the modifier actually exists, avoiding invalid calls that trigger log errors.
  • [country_event](/wiki/effect/country_event) — Frequently paired with this command within event option blocks to implement narrative flows like "player chooses to end agreement → immediately remove bilateral modifiers."

Common Pitfalls

  1. Must remove bidirectionally and manually: remove_relation_modifier only removes the modifier in the "current scope → target" direction. If you initially added the modifier on both sides using add_relation_modifier, you must call the removal separately from each scope, otherwise the other party's modifier will persist indefinitely.
  2. Modifier name spelling must match exactly when added: If the value of modifier = doesn't match the static modifier name used during add_relation_modifier (even with case differences), the game won't error but also won't actually remove anything, resulting in a difficult-to-debug "modifier won't disappear" issue.