trigger · is_unit_leader
Definition
- Supported scope:
CHARACTER - Supported target:
none
Description
is_unit_leader = yes/no - Checks if the current character is a unit leader
is_unit_leaderCHARACTERnoneis_unit_leader = yes/no - Checks if the current character is a unit leader
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.
is_unit_leader is commonly used in character events or decisions to distinguish whether a character currently holds an active field command position, thereby determining whether they can transition into an advisor role or national leader. For example, in a custom character promotion system, only characters not yet assigned to unit command can be immediately appointed as political advisors:
available = {
is_unit_leader = no
is_advisor = no
}
It can also be used inversely to ensure that only generals actively commanding troops trigger specific battlefield events.
[is_corps_commander](/wiki/trigger/is_corps_commander) / [is_field_marshal](/wiki/trigger/is_field_marshal): Combined with is_unit_leader, these allow further refinement of the specific rank level of "being a commander". Use is_unit_leader = yes as a broad prerequisite check, then differentiate between corps commanders and field marshals with these two.[is_leading_army](/wiki/trigger/is_leading_army): Simply checking if a character is a commander is insufficient; adding this condition confirms they are actively commanding troops, preventing erroneous logic from triggering on generals who have been relieved of command.[remove_unit_leader](/wiki/effect/remove_unit_leader): After confirming identity with is_unit_leader = yes, use this effect to safely revoke their commander status, preventing errors or failed execution when calling this effect on non-commander characters.[add_advisor_role](/wiki/effect/add_advisor_role): The common "general-to-advisor" workflow first gates with is_unit_leader = no, then calls this effect to grant advisor functions, forming a complete identity-switching logic between the two.CHARACTER scope. Writing it directly in a limit block within country scope will silently fail or error. You must first switch to character scope using any_character or a specific character token before performing the check.is_unit_leader = yes only indicates the character holds a commander role; it returns true even if no units currently follow them. If your logic depends on "is actively commanding an army", you must additionally include [is_leading_army](/wiki/trigger/is_leading_army) to accurately filter.