Wiki

trigger · is_exiled_in

Definition

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

Description

Checks if scope country is a government in exile in target tag. is_exiled_in = ENG

实战 · 配合 · 坑

实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

is_exiled_in 常用于流亡政府相关的 mod 场景,例如判断某国是否正流亡于英国,从而解锁专属决策或触发特殊事件链。也可在 available 块中限制某些专注或决策只对流亡状态的国家开放。

# 示例:只有当波兰流亡于英国时,才允许触发该事件
country_event = {
    id = exile_events.1
    trigger = {
        tag = POL
        is_exiled_in = ENG
    }
}

配合关系

  • [has_capitulated](/wiki/trigger/has_capitulated) — 通常与 is_exiled_in 搭配,先确认目标国已投降,再进一步检查其是否已转为流亡状态,逻辑更严谨。
  • [become_exiled_in](/wiki/effect/become_exiled_in) — 这是将国家设为流亡政府的 effect,is_exiled_in 常作为其后续条件判断,验证流亡操作是否已生效。
  • [end_exile](/wiki/effect/end_exile) — 结束流亡状态的 effect,通常在 trigger 块中先用 is_exiled_in 确认流亡身份,再决定是否触发结束流亡。
  • [exists](/wiki/trigger/exists) — 用于在检查流亡关系之前确保目标国家标签在游戏中仍然存在,避免空指针式逻辑错误。

常见坑

  1. target 写成具体国家标签以外的值时容易出错is_exiled_in 的 target 支持 THIS/ROOT 等代词,但新手往往直接硬写标签(如 ENG),却忘记在动态 scope 切换后 ROOT 已指向其他国家,导致判断对象不符合预期,需特别留意当前 scope 是哪个国家。
  2. has_capitulated 混淆:流亡(exile)和投降(capitulate)是两种不同状态,一个国家可能已投降但尚未成为流亡政府,也可能成为流亡政府但技术上并未通过 has_capitulated 检测,两者不能互相替代。

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

is_exiled_in is commonly used in mod scenarios involving exiled governments—for example, checking whether a nation is currently exiled in Britain to unlock exclusive decisions or trigger special event chains. It can also be placed in available blocks to restrict certain focuses or decisions to only exiled nations.

# Example: Only allow this event to trigger when Poland is exiled in England
country_event = {
    id = exile_events.1
    trigger = {
        tag = POL
        is_exiled_in = ENG
    }
}

Synergy

  • [has_capitulated](/wiki/trigger/has_capitulated) — Often paired with is_exiled_in to first confirm the target nation has capitulated, then further verify whether it has transitioned to exile status, resulting in more rigorous logic.
  • [become_exiled_in](/wiki/effect/become_exiled_in) — The effect that establishes a nation as an exiled government; is_exiled_in commonly serves as a follow-up condition to verify the exile operation has taken effect.
  • [end_exile](/wiki/effect/end_exile) — The effect that terminates exile status; typically is_exiled_in is used in the trigger block first to confirm exile identity before deciding whether to execute the end-exile effect.
  • [exists](/wiki/trigger/exists) — Used to ensure the target nation tag still exists in the game before checking exile relationships, preventing null-pointer-like logic errors.

Common Pitfalls

  1. Errors when target is set to values other than concrete nation tags: While is_exiled_in supports pronouns like THIS/ROOT, beginners often hardcode tags directly (e.g., ENG) but forget that ROOT may point to a different nation after a scope switch, resulting in the check targeting an unintended subject. Pay close attention to which nation is currently in scope.
  2. Confusion with has_capitulated: Exile and capitulation are two distinct states. A nation may have capitulated but not yet become an exiled government, or may become an exiled government without technically passing a has_capitulated check. The two cannot be used interchangeably.