trigger · is_government_in_exile
Definition
- Supported scope:
COUNTRY - Supported target:
any
Description
Checks if scope country an exiled government. is_government_in_exile = yes
is_government_in_exileCOUNTRYanyChecks if scope country an exiled government. is_government_in_exile = yes
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
is_government_in_exile 常用于流亡政府相关的 mod 场景,例如判断某国是否处于流亡状态来决定是否开放特定决议、国策或外交选项。比如可以限制流亡国无法执行某些需要实际领土的国策,或者为流亡政府专属提供"寻求庇护"类决议。
# 某个决议的 available 块:只有流亡政府才能看到此选项
available = {
is_government_in_exile = yes
any_allied_country = {
controls_state = { state = ROOT }
}
}
[has_capitulated](/wiki/trigger/has_capitulated):流亡政府往往伴随投降状态,两者联用可精确区分"已投降且流亡"与"虽流亡但仍在抵抗"的不同情形。[controls_state](/wiki/trigger/controls_state):流亡政府通常不控制任何本国州,组合使用可校验该国是否真正失去所有领土控制权。[end_exile](/wiki/effect/end_exile):在 effect 块中配合使用,当条件满足时(如收复首都)结束流亡状态,与 trigger 形成判断→执行的完整逻辑链。[has_country_flag](/wiki/trigger/has_country_flag):用自定义 flag 标记流亡政府的特殊阶段,与本 trigger 并列使用可实现更细粒度的流亡剧情分支控制。limit 块里直接写,导致脚本报错或静默失效;正确做法是先用 owner 或 CONTROLLER 切换到国家 scope 再调用。is_government_in_exile = yes 与 has_capitulated = yes 并不等价——一个国家可以投降但未流亡,也可能通过 become_exiled_in 进入流亡而未被判定为正式投降,混用两者会造成条件判断逻辑错误。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_government_in_exile is commonly used in exile-related mod scenarios, such as determining whether a country is in exile status to decide whether to unlock specific decisions, national focuses, or diplomatic options. For example, you can restrict exiled governments from executing certain national focuses that require actual territory control, or provide exile-exclusive decisions like "Seek Asylum".
# available block of a certain decision: only exiled governments can see this option
available = {
is_government_in_exile = yes
any_allied_country = {
controls_state = { state = ROOT }
}
}
[has_capitulated](/wiki/trigger/has_capitulated): Exiled governments often accompany capitulation status. Using both together allows precise distinction between "capitulated and in exile" versus "in exile but still resisting".[controls_state](/wiki/trigger/controls_state): Exiled governments typically control no states of their own nation. Combined usage can verify whether the country has truly lost all territorial control.[end_exile](/wiki/effect/end_exile): Use in tandem within effect blocks. When conditions are met (such as recapturing the capital), end the exile status, forming a complete logic chain of condition-checking and execution with the trigger.[has_country_flag](/wiki/trigger/has_country_flag): Mark special phases of exiled governments with custom flags. Using alongside this trigger enables finer-grained control over exile storyline branches.limit block of STATE scope, causing script errors or silent failures. The correct approach is to first switch to country scope using owner or CONTROLLER before calling the trigger.is_government_in_exile = yes and has_capitulated = yes are not equivalent—a country can capitulate without going into exile, or may enter exile through become_exiled_in without being formally capitulated. Mixing the two will cause logic errors in conditional checks.