Wiki

effect · give_guarantee

Definition

  • Supported scope:COUNTRY
  • Supported target:THIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITAL

Description

guarantees specified country

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

give_guarantee is commonly used in diplomatic scripted events, national focus completion effects, or post-war peace negotiation scripts to automatically establish a guarantee relationship between nations, simulating great power patronage or alliance obligations. For example, after completing a focus you might have the player nation guarantee a small nation's independence:

focus = {
    id = guarantee_small_ally
    ...
    completion_reward = {
        # Current scope is the nation executing this focus
        GER = {          # Switch to target nation's scope
            give_guarantee = ROOT   # GER guarantees the nation that triggered this focus
        }
        # Or reversed: have ROOT guarantee GER
        # Within ROOT's scope:
        give_guarantee = GER
    }
}

Remember that the executor's scope is the nation issuing the guarantee, and the target is the guaranteed nation. Always confirm which nation's scope you are in before writing.


Synergy

  • [any_guaranteed_country](/wiki/trigger/any_guaranteed_country) — Used to check a nation's guarantee list after the guarantee takes effect; useful for subsequent trigger conditions to verify if a guarantee was successfully established.
  • [all_guaranteed_country](/wiki/trigger/all_guaranteed_country) — Pairs with iteration over guaranteed nations to validate that batch guarantee scripts have complete coverage; commonly used for AI behavior debugging.
  • [create_wargoal](/wiki/effect/create_wargoal) — Guarantees typically link with war goals: once a guaranteed nation is attacked, the guarantor needs corresponding justifications for war, and the two work together to form a complete diplomatic intervention chain.
  • [diplomatic_relation](/wiki/effect/diplomatic_relation) — Used to establish or adjust other bilateral diplomatic relationships (such as non-aggression pacts) alongside issuing a guarantee, making the diplomatic package more complete.

Common Pitfalls

  1. Reversed scope causing inverted guarantee direction: The executor (current scope) of give_guarantee is the nation issuing the guarantee, and the target parameter is the nation being guaranteed. Beginners often swap the two nations' scopes, resulting in a small nation "guaranteeing" a major power—not only logically absurd, but also producing almost no practical effect in-game.

  2. Executing on nations that no longer exist or have been annexed: If the target nation no longer exists when the script executes (exists = no), give_guarantee fails silently without error messages, causing the narrative to progress while no guarantee relationship appears. It's recommended to add an [exists](/wiki/trigger/exists) check before execution to ensure the target nation is still on the map.