Wiki

effect · create_corps_commander

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

create corps commander for country

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

create_corps_commander is commonly used in national focuses, events, or decisions to spawn corps commanders with specific traits and skills for player or AI nations. It's ideal for depicting historical military leaders or building custom general pools in mods. For example, triggering upon completion of a focus related to a particular general:

focus = {
    id = GER_rommel_focus
    # ...
    completion_reward = {
        create_corps_commander = {
            name = "Erwin Rommel"
            portrait_path = "gfx/leaders/GER/rommel.dds"
            traits = { armor_officer desert_fox }
            skill = 4
            attack_skill = 4
            defense_skill = 3
            planning_skill = 3
            logistics_skill = 2
        }
    }
}

Synergy

  • [add_trait](/wiki/effect/add_trait) — Additional traits can be dynamically assigned to the general after creation via script, circumventing the static limitations of the initial traits list.
  • [add_corps_commander_role](/wiki/effect/add_corps_commander_role) — Specialized officer roles can be appended post-creation, enabling multi-purpose general designs.
  • [add_country_leader_trait](/wiki/effect/add_country_leader_trait) — When a leader's military and political identities coexist within the same event chain, country leader traits are often configured in parallel.
  • [any_army_leader](/wiki/trigger/any_army_leader) — Pre-creation checks to verify whether a same-named or similar general already exists, preventing duplicate spawns.

Common Pitfalls

  1. Forgetting to bind scope: create_corps_commander must execute within COUNTRY scope. Placing it directly in STATE or unit_leader scope will fail silently, and newcomers often struggle to find the error source during debugging.
  2. Overstaffing skill point allocation: The sum of individual skills (attack/defense/planning/logistics) is constrained by the character's overall skill level. If the sum of sub-skills deviates significantly from the skill value, the game auto-corrects the displayed values, causing the actual stored data to diverge from expectations.