Wiki

trigger · is_advisor

Definition

  • Supported scope:CHARACTER
  • Supported target:none

Description

is_advisor = yes/no - Checks if the current character is an advisor

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_advisor is commonly used to check whether a character is currently serving in an advisor position. It's useful for restricting options in focuses, decisions, or events—for example, "allow this upgrade event only if the character is already in an advisor slot," or in an available block to prevent operations on non-advisor characters.

# Event option: only allow promoting the character's skill level if they are an advisor
option = {
    name = my_event.1.a
    trigger = {
        FROM = {
            is_advisor = yes
        }
    }
    FROM = {
        add_skill_level = 1
    }
}

Synergy

  • [has_advisor_role](/wiki/trigger/has_advisor_role) — Use together with is_advisor to simultaneously confirm that the character is "in office" and "holds a specific advisor type," preventing accidental operations on other characters.
  • [advisor_can_be_fired](/wiki/trigger/advisor_can_be_fired) — Before removing an advisor, first use is_advisor = yes to confirm they are employed, then use this trigger to check if removal is allowed for more robust logic.
  • [remove_advisor_role](/wiki/effect/remove_advisor_role) — Typical workflow: use is_advisor = yes as a limit first, then execute the removal effect, preventing errors or silent failures when called on non-advisor characters.
  • [is_hired_as_advisor](/wiki/trigger/is_hired_as_advisor) — While semantically similar, using both provides dual validation to distinguish between "character has advisor status" and "character is currently employed as an advisor," capturing the subtle semantic difference.

Common Pitfalls

  1. Incorrect scope: is_advisor must be used within CHARACTER scope. Beginners sometimes write it directly in country scope (such as at the root level of country_event), causing the trigger to always return false without error messages and making debugging difficult. Always use characters iteration or correctly switch scopes via FROM/PREV to enter character scope first.
  2. Confusion with is_hired_as_advisor: is_advisor checks whether a character "has advisor status at the character definition level," not their real-time employment state. If the goal is to check whether the character is currently hired by a specific country, use [is_hired_as_advisor](/wiki/trigger/is_hired_as_advisor) instead, otherwise your logic will be off.