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
- 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.
- 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.