Wiki

trigger · is_navy_chief

Definition

  • Supported scope:CHARACTER
  • Supported target:none

Description

_is_navy_chief_ = yes/no - Checks if the character in scope is hired as a navy chief

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_navy_chief is commonly used to restrict certain events or decisions to only apply when the triggering character currently holds the Naval High Command advisor position. For example, you can check the identity of the triggered character in advisor-related events. It can also be used in available blocks to prevent players from performing inappropriate actions on naval commanders.

# Event trigger condition: only fire when the character is a naval chief
character_event = {
    id = my_mod.101
    trigger = {
        is_navy_chief = yes
    }
    # ...
}

Synergy

  • [is_advisor](/wiki/trigger/is_advisor): First determine whether the character is an advisor, then use is_navy_chief to precisely distinguish advisor type, avoiding logical redundancy.
  • [has_advisor_role](/wiki/trigger/has_advisor_role): Combining the two allows cross-validation in more complex condition blocks to verify whether the character's advisor role definition matches their actual employed status.
  • [remove_advisor_role](/wiki/effect/remove_advisor_role): After confirming the character is indeed a naval chief, safely remove their advisor role to prevent accidental operations on characters without that position.
  • [is_hired_as_advisor](/wiki/trigger/is_hired_as_advisor): Used together with is_navy_chief to simultaneously check both "has been hired" and "specifically is a naval chief" at different levels, making the logic more rigorous.

Common Pitfalls

  1. Incorrect Scope: is_navy_chief must be used under CHARACTER scope. Writing it directly in a country scope trigger block will fail silently or produce an error. You must first switch to character scope using methods like any_character or with_character.
  2. Confusing "has role definition" with "is employed": A character may possess the navy_chief role in the advisor definition, but if they have not yet been hired, is_navy_chief will still return no. If you only want to check whether a character possesses that role definition, use has_advisor_role instead.