Wiki

trigger · is_political_advisor

Definition

  • Supported scope:CHARACTER
  • Supported target:none

Description

is_political_advisor = yes/no - Checks if the character in scope is hired as a political advisor

实战 · 配合 · 坑

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

实战用法

is_political_advisor 常用于判断某个角色当前是否以政治顾问身份在职,典型场景包括:在 focus/event 中限制只有当政治顾问上任时才触发某段逻辑,或在 available 块中防止同一角色重复担任顾问职位时触发冲突事件。例如,检测某角色是否已是政治顾问,若是则阻止另一个事件将其解雇或调任:

# 在 event option 的 trigger 块中,仅当角色不是政治顾问时才允许选择
option = {
    name = my_event.option_a
    trigger = {
        FROM = {
            is_political_advisor = no
        }
    }
    # ... effects
}

配合关系

  • [is_hired_as_advisor](/wiki/trigger/is_hired_as_advisor):两者都检查顾问状态,但 is_hired_as_advisor 可区分具体顾问类型槽位;配合使用可做更精细的"是顾问且是政治顾问"双重确认。
  • [has_advisor_role](/wiki/trigger/has_advisor_role):用于检查角色是否拥有某顾问角色定义,与 is_political_advisor 配合可区分"拥有顾问角色配置"和"实际已被雇用上岗"两种状态。
  • [remove_advisor_role](/wiki/effect/remove_advisor_role):在确认角色确实是政治顾问(is_political_advisor = yes)之后,安全地移除其顾问角色,避免对非顾问角色执行移除操作引发报错。
  • [set_can_be_fired_in_advisor_role](/wiki/effect/set_can_be_fired_in_advisor_role):配合 is_political_advisor 的判断结果,动态控制当前政治顾问能否被解雇,常用于剧情锁定关键顾问的场景。

常见坑

  1. Scope 用错:此 trigger 必须在 CHARACTER scope 下调用,新手容易在 COUNTRY scope 的 limit 块里直接写 is_political_advisor = yes,导致 scope 不匹配而静默失败或报错,需先用 any_character/specific character 进入角色 scope 再使用。
  2. is_advisor 混淆is_advisor 检查角色是否为任意顾问类型,而 is_political_advisor 专指政治顾问;若想检查政治顾问以外的顾问(如陆军参谋长),误用此 trigger 会得到永远为假的结果却难以察觉。

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_political_advisor is commonly used to determine whether a character is currently serving as a political advisor, with typical use cases including: restricting certain logic in focus/event to only trigger when a political advisor is in office, or in available blocks to prevent the same character from being assigned to conflicting advisor positions. For example, detecting whether a character is already a political advisor and, if so, preventing another event from dismissing or reassigning them:

# In the trigger block of an event option, only allow selection when the character is not a political advisor
option = {
    name = my_event.option_a
    trigger = {
        FROM = {
            is_political_advisor = no
        }
    }
    # ... effects
}

Synergy

  • [is_hired_as_advisor](/wiki/trigger/is_hired_as_advisor): Both check advisor status, but is_hired_as_advisor can distinguish specific advisor slot types; using them together enables more granular "is an advisor AND is a political advisor" double confirmation.
  • [has_advisor_role](/wiki/trigger/has_advisor_role): Used to check whether a character possesses a defined advisor role, and when combined with is_political_advisor can distinguish between "has advisor role configuration" and "is actually hired and active" states.
  • [remove_advisor_role](/wiki/effect/remove_advisor_role): After confirming a character is indeed a political advisor (is_political_advisor = yes), safely removes their advisor role, avoiding errors from attempting to remove roles from non-advisors.
  • [set_can_be_fired_in_advisor_role](/wiki/effect/set_can_be_fired_in_advisor_role): Based on the judgment result of is_political_advisor, dynamically control whether the current political advisor can be dismissed, commonly used in story scenarios to lock down key advisors.

Common Pitfalls

  1. Incorrect scope: This trigger must be called under CHARACTER scope. Beginners often mistakenly write is_political_advisor = yes directly in a limit block within COUNTRY scope, causing scope mismatch that results in silent failure or errors. You must first enter character scope using any_character/specific character before using this trigger.
  2. Confusion with is_advisor: is_advisor checks whether a character is any type of advisor, while is_political_advisor specifically refers to political advisors. If you want to check for advisors other than political advisors (such as an army chief of staff), misusing this trigger will silently return false, making the issue hard to detect.