Wiki

effect · create_corps_commander

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

create corps commander for country

实战 · 配合 · 坑

实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

create_corps_commander 常用于国家焦点、事件或决议中,为玩家或 AI 国家生成具有特定特质和技能的军团指挥官,适合在 mod 中刻画历史名将登场或构建专属将领池。例如,在某位将领相关的焦点完成时触发:

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

配合关系

  • [add_trait](/wiki/effect/add_trait) — 将领生成后可追加通过脚本动态赋予的额外特质,弥补创建时特质列表的静态限制。
  • [add_corps_commander_role](/wiki/effect/add_corps_commander_role) — 创建角色后可补充其担任的特殊职务角色,用于多功能将领设计。
  • [add_country_leader_trait](/wiki/effect/add_country_leader_trait) — 当同一事件链中将领身份与政治身份并存时,常同步配置国家领袖特质。
  • [any_army_leader](/wiki/trigger/any_army_leader) — 创建前用于检查是否已存在同名或同类将领,避免重复生成。

常见坑

  1. 忘记绑定 scopecreate_corps_commander 必须在 COUNTRY scope 下执行,直接写在 STATE scope 或 unit_leader scope 里会静默失败,新手调试时往往找不到报错原因。
  2. 技能点分配超出隐性上限:各分项技能(attack/defense/planning/logistics)之和受角色总 skill 级别约束,若分项之和与 skill 值差距过大,游戏会自动修正显示数值,导致实际入库数据与预期不符。

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.