trigger · has_guaranteed
Definition
- Supported scope:
COUNTRY - Supported target:
THIS,ROOT,PREV,FROM,OWNER,CONTROLLER,OCCUPIED,CAPITAL
Description
check if country has guaranteed specified country
has_guaranteedCOUNTRYTHIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITALcheck if country has guaranteed specified country
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
has_guaranteed 常用于外交事件或国策脚本中,判断某国是否已对目标国发出保证,以决定是否触发连锁外交反应或解锁特定选项。例如在事件中检查玩家是否已经保证了某个小国,从而开放"拉入同盟"或"施压"的选项:
# 在事件选项的 trigger 中检查本国是否保证了波兰
option = {
name = my_event.1.a
trigger = {
has_guaranteed = POL
}
# 仅当本国已保证波兰时此选项可见
add_political_power = -20
}
[any_guaranteed_country](/wiki/trigger/any_guaranteed_country) — 当需要检查"是否对任意国家有保证"而非特定国家时,与 has_guaranteed 互补使用,覆盖更广泛的条件分支。[has_defensive_war_with](/wiki/trigger/has_defensive_war_with) — 保证触发战争介入后,可搭配此 trigger 验证被保证国是否已进入防御战,形成完整的"保证→介入"逻辑链。[exists](/wiki/trigger/exists) — 使用 has_guaranteed 前通常需先确认目标国仍然存在,避免指向已灭亡国家时产生意外结果。[give_guarantee](/wiki/effect/give_guarantee) — 在 effect 块中给予保证,与 has_guaranteed 形成"若未保证则执行保证"的条件-效果对。has_guaranteed 的主体必须是拥有保证的国家 scope,而括号内填写的是被保证的国家标签。新手容易将两者写反,例如误在被保证国 scope 内使用此 trigger,导致条件永远不成立。exists = TAG 保证目标国有效,再使用 has_guaranteed 进行判断。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.
has_guaranteed is commonly used in diplomatic events or national focus scripts to check whether a nation has issued a guarantee to a target nation, allowing you to trigger cascading diplomatic responses or unlock specific options. For example, in an event you might check whether the player has guaranteed a minor nation, and if so, open options for "invite to faction" or "pressure":
# Check in event option trigger whether this nation has guaranteed Poland
option = {
name = my_event.1.a
trigger = {
has_guaranteed = POL
}
# This option is only visible if this nation has guaranteed Poland
add_political_power = -20
}
[any_guaranteed_country](/wiki/trigger/any_guaranteed_country) — When you need to check "whether there is a guarantee to any nation" rather than a specific one, use this alongside has_guaranteed to cover broader conditional branches.[has_defensive_war_with](/wiki/trigger/has_defensive_war_with) — After a guarantee triggers war intervention, pair this trigger to verify whether the guaranteed nation has entered a defensive war, forming a complete "guarantee → intervention" logic chain.[exists](/wiki/trigger/exists) — Before using has_guaranteed, first confirm that the target nation still exists to avoid unexpected results when referencing an eliminated nation.[give_guarantee](/wiki/effect/give_guarantee) — Issue a guarantee in an effect block, pairing with has_guaranteed to create an "if not guaranteed, then guarantee" condition-effect pair.has_guaranteed must be the nation scope that holds the guarantee, while the tag in parentheses is the guaranteed nation. Beginners often reverse these, for example mistakenly using this trigger within the guaranteed nation's scope, causing the condition to never evaluate true.exists = TAG check first to ensure the target nation is valid before using has_guaranteed for evaluation.