Wiki

effect · add_relation_modifier

Definition

  • Supported scope:COUNTRY
  • Supported target:THIS

Description

Adds 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

add_relation_modifier is commonly used in diplomatic system mods to apply persistent static modifiers between two specific countries, such as granting additional trade benefits or diplomatic pressure bonuses to both parties after signing a secret agreement. Unlike the generic add_opinion_modifier, it binds to a static modifier and can carry richer numerical effects.

# When the player completes a certain diplomatic decision, add a relation modifier to the target country
effect_on_complete = {
    GER = {
        add_relation_modifier = {
            target = ITA
            modifier = secret_pact_bonus
        }
    }
}

Synergy

  • [add_opinion_modifier](/wiki/effect/add_opinion_modifier) — Often used alongside relation modifiers; opinion modifiers handle displaying diplomatic affinity changes while relation modifiers apply actual numerical effects, complementing each other.
  • [add_dynamic_modifier](/wiki/effect/add_dynamic_modifier) — If you need modifiers with expiration times or dynamic variables, pair with add_relation_modifier: relation modifiers handle bilateral relations while dynamic modifiers handle domestic effects.
  • [has_dynamic_modifier](/wiki/trigger/has_dynamic_modifier) — Check in trigger conditions whether a modifier already exists to prevent stacking the same relation modifier multiple times and causing numerical anomalies.
  • [diplomatic_relation](/wiki/effect/diplomatic_relation) — Call alongside establishing formal diplomatic relations (such as non-aggression pacts) to keep diplomatic status consistent with relation modifiers.

Common Pitfalls

  1. The modifier must be predefined in static_modifiers: Beginners often directly enter a name not declared in common/modifiers/, causing the modifier to silently fail without error messages and have no effect in-game.
  2. The target direction is easily reversed: This effect executes on the current scope's country, with target pointing to the other party; the modifier applies to the "current country → target country" relationship, not bidirectionally. If bidirectional effects are needed, execute once in each country's scope.