Hands-On Usage
diplomatic_relation is commonly used in events or decisions to dynamically establish or revoke diplomatic agreements between two nations. For example, in scenario mods, it grants or revokes military access or guarantees to specific countries under certain conditions. It also frequently appears in "historical revision" mods, where scripts dynamically adjust the diplomatic landscape outside the game's initial history block.
# Example: In an event option, ROOT applies to POR for military access
option = {
name = my_event.1.a
diplomatic_relation = {
country = POR
relation = military_access
active = yes
}
}
Synergy
[gives_military_access_to](/wiki/trigger/gives_military_access_to) — Check in trigger conditions whether access already exists to avoid duplicate additions or logical contradictions.
[give_guarantee](/wiki/effect/give_guarantee) — Frequently paired together; establish both a guarantee and access rights in the same event option to simulate comprehensive diplomatic agreements.
[add_opinion_modifier](/wiki/effect/add_opinion_modifier) — After establishing a diplomatic relationship, simultaneously add opinion modifiers to make relationship changes more convincing in the UI.
[declare_war_on](/wiki/effect/declare_war_on) — If military access exists before declaring war, revoke it first using active = no to avoid logical conflicts; the two typically appear in opposing event branches.
Common Pitfalls
country field contains a fixed TAG instead of a scope keyword: The country field only accepts country tags (such as POR, GER) or variables that resolve to a country—it cannot directly use scope keywords like THIS or ROOT. Beginners often inadvertently cause the effect to silently fail due to this mistake.
- Forgetting
active = no to revoke the relationship: Omitting the active field or always writing yes prevents you from removing existing diplomatic relationships through script. You must explicitly write active = no to cancel a relationship—simply executing active = yes again will not work.