Wiki

trigger · is_corps_commander

Definition

  • Supported scope:CHARACTER
  • Supported target:none

Description

is_corps_commander = yes/no - Checks if the current character is a corps commander

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_corps_commander is commonly used in mods to restrict certain traits, promotion events, or advisor appointments, ensuring effects apply only to corps commanders rather than field marshals or naval leaders. For example, in a promotion event, verify the character's role first before granting traits or triggering corresponding effects:

# Only allow this trait to be granted when the character is a corps commander
add_trait = {
    token = trait_aggressive_assaulter
    available = {
        is_corps_commander = yes
    }
}

It can also be used within limit blocks to filter any_character loops, ensuring bulk operations apply only to the corps commander population.


Synergy

  • [is_field_marshal](/wiki/trigger/is_field_marshal) — Often paired with is_corps_commander in mutually exclusive branches to distinguish between corps commanders and field marshals, determining which logic path to execute.
  • [add_corps_commander_role](/wiki/effect/add_corps_commander_role) — Used alongside when a character has not yet assumed a corps commander role (is_corps_commander = no), to supplement character definitions.
  • [promote_leader](/wiki/effect/promote_leader) — Perform a prerequisite check with is_corps_commander = yes before triggering promotion to prevent mistakenly invoking promotion logic on non-corps-commander characters.
  • [has_trait](/wiki/trigger/has_trait) — Typically combined with role checks to implement dual-condition filtering like "is a corps commander and possesses a certain trait."

Common Pitfalls

  1. Incorrect scope: This trigger must be called within CHARACTER scope. If written directly in country scope (such as the top-level trigger block of a country_event) without first transitioning to character scope using any_character/random_character, the condition will never be met and no error will be reported, making it extremely difficult to debug.
  2. Confusion with is_unit_leader: Beginners sometimes use is_unit_leader = yes as a substitute for this trigger, but is_unit_leader returns true for field marshals, naval leaders, and others alike, failing to precisely target corps commanders. When strict unit type or rank distinction is needed, always use the dedicated trigger.