Wiki

trigger · is_country_leader

Definition

  • Supported scope:CHARACTER
  • Supported target:none

Description

is_country_leader = yes/no - Checks if the current character is a country leader

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_country_leader is commonly used in character events or decisions to check whether the triggering character currently holds the position of national leader, thereby distinguishing different handling logic for the same person in different roles. For example, after a political advisor becomes a national leader, it must be used to prevent duplicate assignment of leader traits:

# Within character scope, add trait only if the character is already a national leader
if = {
    limit = {
        is_country_leader = yes
    }
    add_country_leader_trait = war_industrialist
}

Synergy

  • [can_be_country_leader](/wiki/trigger/can_be_country_leader): Typically used after checking whether a character can "become" a leader, then use is_country_leader to confirm whether they "already are" a leader, forming a dual judgment of prerequisite and current state.
  • [add_country_leader_trait](/wiki/effect/add_country_leader_trait): After confirming the character is already a national leader, safely add leader traits to them, avoiding invalid calls or errors when invoking this effect on non-leader characters.
  • [remove_country_leader_role](/wiki/effect/remove_country_leader_role): In exit logic, first use is_country_leader = yes to confirm their status, then remove their leader role, preventing accidental triggers on non-leader characters.
  • [is_advisor](/wiki/trigger/is_advisor): Combined with this trigger, you can detect the rare state of "serving as both national leader and advisor," useful for conditional branching in special dual-role scenarios.

Common Pitfalls

  1. Wrong Scope: This trigger can only be used within CHARACTER scope. Beginners often directly write is_country_leader = yes in the trigger block under COUNTRY scope, causing silent script failure or errors—you must first switch scope to a specific character using country_leader = { … } or related events.
  2. Confusing "Leader Role Exists" with "Currently in Power": A character may possess a leader role definition through add_country_leader_role, but if their ideology does not match the currently ruling ideology, is_country_leader will still return no. Beginners often mistakenly assume that having a leader role guarantees a true result; you must judge comprehensively in combination with the nation's current ruling ideology.