Hands-On Usage
can_be_country_leader is commonly used to verify whether a character possesses a country leader role, enabling safe execution of leader-related operations within focus, decision, or on_action blocks while avoiding unintended actions on non-leader characters. For example, when determining a successor after a character's death, you can first filter out candidates who lack the leader role:
# In the available block of a decision, check whether the target character can serve as a country leader
available = {
GER_erwin_rommel = {
can_be_country_leader = yes
}
}
Synergy
[add_country_leader_role](/wiki/effect/add_country_leader_role): If a character does not yet possess a leader role, you can add one first. Combined with can_be_country_leader, this creates an "if present skip, otherwise add" logic pattern.
[remove_country_leader_role](/wiki/effect/remove_country_leader_role): Only safely remove a leader role after confirming the character actually holds it (can_be_country_leader = yes), preventing errors when attempting to remove a role from a character who doesn't have it.
[has_character](/wiki/trigger/has_character): Before cross-scope invocation, first verify that the character exists in the target country. Combined with can_be_country_leader, this forms a dual-check chain of "character exists → character has leader role".
[promote_character](/wiki/effect/promote_character): Verify a character's leader eligibility before promotion to avoid mistakenly elevating ordinary advisors or generals to country leader status.
Common Pitfalls
- Scope Confusion: This trigger can be invoked under COUNTRY scope using the syntax
TAG = { can_be_country_leader = yes }, but this actually checks a specific character under that TAG. Many beginners mistakenly believe this determines "whether the country has any country leader at all," when in fact it requires explicit reference to a specific character to be meaningful.
- Mixing with
has_advisor_role: can_be_country_leader only checks whether a character holds a country leader role, while advisor roles must be checked using [has_advisor_role](/wiki/trigger/has_advisor_role). These two cannot be used interchangeably; doing so will cause conditions to fail silently without error messages.