Wiki

trigger · is_exiled_leader_from

Definition

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

Description

Checks if scope leader is from specified exiled government. is_exiled_leader_from = FRA

实战 · 配合 · 坑

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

实战用法

is_exiled_leader_from 常用于流亡政府相关的 mod 场景,例如判断某个角色是否来自特定国家的流亡政府,从而触发专属事件、解锁特殊顾问职位或限制某些决策的可用性。典型场景是在法国沦陷后,检查某指挥官是否隶属于自由法国流亡政府,以决定是否允许其担任要职。

# 在某个角色的 available 条件中,检查其是否来自法国流亡政府
some_character = {
    has_advisor_role = {
        slot = high_command
    }
    available = {
        is_exiled_leader_from = FRA
    }
}

配合关系

  • [is_exiled_leader](/wiki/trigger/is_exiled_leader):先用 is_exiled_leader 确认角色当前处于流亡状态,再用 is_exiled_leader_from 精确锁定来源国,避免误判同为流亡身份但来源不同的角色。
  • [has_advisor_role](/wiki/trigger/has_advisor_role):配合使用可筛选出"来自某流亡政府且担任特定顾问角色"的角色,用于流亡政府顾问体系的精细化管理。
  • [remove_exile_tag](/wiki/effect/remove_exile_tag):当满足条件(角色确实来自指定流亡政府)后,可以通过此 effect 移除流亡标签,实现流亡政府回归本土的剧情逻辑。
  • [has_nationality](/wiki/trigger/has_nationality):与 is_exiled_leader_from 联用可区分"国籍归属"和"流亡政府归属"这两个概念,适合处理多重身份角色的复杂判断。

常见坑

  1. scope 类型错误:此 trigger 只能在 CHARACTER scope 下使用,直接写在国家 scope(如 capital_scope 或普通国家事件的 trigger 块根层)会导致脚本报错或静默失败,需先通过 any_characterevery_character 等方式进入角色 scope 后再调用。
  2. 流亡标签与来源国混淆:参数填写的是流亡政府的来源国 tag(如 FRA),而非流亡政府本身的专属 tag(如 F15),新手容易将二者对调导致条件永远不成立。

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_leader_from is commonly used in mod scenarios involving exiled governments, such as determining whether a character belongs to an exiled government from a specific nation, thereby triggering exclusive events, unlocking special advisor positions, or restricting the availability of certain decisions. A typical scenario is checking whether a commander belongs to the Free French exiled government after France's collapse, to decide whether to allow them to assume important posts.

# In a character's available condition, check if they originate from the French exiled government
some_character = {
    has_advisor_role = {
        slot = high_command
    }
    available = {
        is_exiled_leader_from = FRA
    }
}

Synergy

  • [is_exiled_leader](/wiki/trigger/is_exiled_leader): First use is_exiled_leader to confirm that the character is currently in exile, then use is_exiled_leader_from to precisely identify the country of origin, avoiding misidentification of characters with different origin countries who share the same exile status.
  • [has_advisor_role](/wiki/trigger/has_advisor_role): Combined usage allows filtering characters that are "from a specific exiled government and serving in a specific advisor role," useful for fine-grained management of exiled government advisor systems.
  • [remove_exile_tag](/wiki/effect/remove_exile_tag): Once conditions are met (the character indeed originates from the specified exiled government), you can use this effect to remove the exile tag, implementing narrative logic for exiled governments returning to their homeland.
  • [has_nationality](/wiki/trigger/has_nationality): Combined use with is_exiled_leader_from allows distinguishing between the concepts of "nationality affiliation" and "exiled government affiliation," suitable for handling complex judgments involving characters with multiple identities.

Common Pitfalls

  1. Incorrect scope type: This trigger can only be used within CHARACTER scope. Placing it directly in country scope (such as capital_scope or the root level of a trigger block in a standard country event) will cause script errors or silent failures. You must first enter character scope through methods like any_character or every_character before invoking this trigger.
  2. Confusion between exile tag and country of origin: The parameter specifies the country tag of the exiled government's origin (such as FRA), not the exiled government's own unique tag (such as F15). Beginners often swap these two, resulting in conditions that never evaluate to true.