Wiki

trigger · has_country_leader

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

check if country has leader with specified ID. Don't localize this. Tooltip only for debug.
has_country_leader = {
	ruling_only = yes/no (default = yes)
	character = <string> # recommended criteria
	name = <string> # alternative criteria
	id = <ID> # alternative criteria
}

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

has_country_leader is commonly used to check whether a specific character is currently leading a nation, enabling you to trigger exclusive events, unlock specific decisions, or restrict technology tree branches. For example, in an alternate history mod, you might allow players to activate a particular national spirit only when a certain leader is in power:

available = {
    has_country_leader = {
        character = GER_my_custom_leader
        ruling_only = yes
    }
}

Synergy

  • [has_country_leader_with_trait](/wiki/trigger/has_country_leader_with_trait): Often paired with this trigger to confirm a leader's identity while further verifying whether they possess specific traits, avoiding misidentification of same-named or alternate versions of the same character.
  • [has_character](/wiki/trigger/has_character): Used to distinguish between "character exists in the nation's character pool" and "character is currently ruling," which can be combined with this trigger to construct more precise conditional chains.
  • [add_country_leader_trait](/wiki/effect/add_country_leader_trait): After confirming that a target leader is currently in power, use this effect to dynamically add traits to them, preventing accidental modifications to non-ruling characters.
  • [create_country_leader](/wiki/effect/create_country_leader): Commonly invoked under the condition NOT = { has_country_leader = { character = ... } } to ensure that already-existing leaders are not created twice.

Common Pitfalls

  1. Overlooking the default value of ruling_only: This field defaults to yes. If you need to check whether a character exists in the nation's character pool even if not currently ruling (such as while serving as an advisor), you must explicitly write ruling_only = no, otherwise the condition will never evaluate to true.
  2. Using this trigger in localization text: The game explicitly marks this as "Don't localize this"—do not place it inside custom_trigger_tooltip to display to players, as the tooltip will show meaningless debug text rather than readable information. Instead, use other triggers like [has_character](/wiki/trigger/has_character) paired with custom tooltips as a replacement.