trigger · is_guaranteed_by
Definition
- Supported scope:
COUNTRY - Supported target:
THIS,ROOT,PREV,FROM,OWNER,CONTROLLER,OCCUPIED,CAPITAL
Description
check if guaranteed by specified country
is_guaranteed_byCOUNTRYTHIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITALcheck if guaranteed by specified country
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.
is_guaranteed_by is commonly used to check whether a nation is protected by a guarantee from a specified country, enabling the triggering of diplomatic events or preventing the generation of certain war goals. For example, in a minor nation scenario, when a player attempts to annex another country, you can first check whether it is guaranteed by a major power to decide whether to display a warning event or modify AI decision logic.
# Check if the current nation is guaranteed by Germany; if so, trigger a diplomatic warning event
trigger = {
is_guaranteed_by = GER
}
[any_guaranteed_country](/wiki/trigger/any_guaranteed_country): Iterates through all countries guaranteed by this nation, forming a bidirectional query relationship with is_guaranteed_by — one checks "who guarantees me," the other checks "whom do I guarantee."[has_defensive_war_with](/wiki/trigger/has_defensive_war_with): The chain participation triggered by a guarantee often results in defensive wars; combine with this trigger to further check whether the guarantor has actually entered the war.[can_declare_war_on](/wiki/trigger/can_declare_war_on): Use alongside war declaration condition blocks; when the target nation is guaranteed by a major power, restrict or prevent AI from launching attacks, avoiding unreasonable chain wars.[give_guarantee](/wiki/effect/give_guarantee): After establishing a guarantee relationship in the effect block, commonly use is_guaranteed_by in subsequent trigger blocks to verify whether the guarantee has been successfully established, forming a "write-and-verify" loop.is_guaranteed_by must be the guaranteed nation; beginners often call it under state scope or character scope, leading to script errors or silent failures. Always confirm the current scope has switched to the target nation before checking.any_guaranteed_country / all_guaranteed_country instead.