Wiki

effect · add_field_marshal_role

Definition

  • Supported scope:COUNTRY, CHARACTER
  • Supported target:none

Description

add field marshall role to character

Example:
add_field_marshal_role = {
	character = GER_Character_token # optional if inside character scope
	traits = {  }
	skill = 4
	attack_skill = 2
	defense_skill = 3
	planning_skill = 3
	logistics_skill = 5
	}
}

实战 · 配合 · 坑

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

实战用法

add_field_marshal_role 常用于剧情事件或国策完成时,将某个角色提升为陆军元帅,赋予其统帅大型集团军群的能力。例如在德国剧情线中,通过国策任命曼施泰因为元帅:

focus = {
    id = GER_appoint_manstein
    ...
    completion_reward = {
        add_field_marshal_role = {
            character = GER_erich_von_manstein
            traits = { brilliant_strategist }
            skill = 4
            attack_skill = 3
            defense_skill = 3
            planning_skill = 4
            logistics_skill = 2
        }
    }
}

配合关系

  • [create_field_marshal](/wiki/effect/create_field_marshal):若角色尚未存在于游戏中,需先用此命令动态创建角色实体,再用 add_field_marshal_role 赋予其元帅职能。
  • [add_trait](/wiki/effect/add_trait):在赋予元帅职位后追加额外将领特质,实现更精细的能力定制。
  • [promote_character](/wiki/effect/promote_character):用于将角色从较低职位提升时搭配使用,确保角色在组织层级上的状态一致。
  • [has_character](/wiki/trigger/has_character):在执行前校验目标角色是否存在于当前国家,避免因角色未加载而导致脚本静默失败。

常见坑

  1. 在 COUNTRY scope 下忘写 character 字段:只有在 CHARACTER scope 内部时可以省略 character = ...,若在国家事件的 option 块中直接使用却不指定角色 token,脚本会因找不到目标而无效执行且不报错,极难排查。
  2. 五项技能值之和与 skill 不匹配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

add_field_marshal_role is commonly used in scripted events or national focus completions to promote a character to field marshal, granting them the ability to command large army groups. For example, in the German focus tree, you can appoint Manstein as field marshal through a national focus:

focus = {
    id = GER_appoint_manstein
    ...
    completion_reward = {
        add_field_marshal_role = {
            character = GER_erich_von_manstein
            traits = { brilliant_strategist }
            skill = 4
            attack_skill = 3
            defense_skill = 3
            planning_skill = 4
            logistics_skill = 2
        }
    }
}

Synergy

  • [create_field_marshal](/wiki/effect/create_field_marshal): If the character does not yet exist in the game, you must first use this command to dynamically create the character entity, then use add_field_marshal_role to grant them the field marshal role.
  • [add_trait](/wiki/effect/add_trait): Add additional general traits after assigning the field marshal position to achieve more fine-grained ability customization.
  • [promote_character](/wiki/effect/promote_character): Use in conjunction when promoting a character from a lower position to ensure consistency in their organizational hierarchy status.
  • [has_character](/wiki/trigger/has_character): Verify before execution that the target character exists in the current country, avoiding silent script failures due to unloaded characters.

Common Pitfalls

  1. Forgetting the character field in COUNTRY scope: You can only omit character = ... when inside CHARACTER scope. If used directly in a country event's option block without specifying the character token, the script will fail silently without error reporting, making it extremely difficult to debug.
  2. Mismatch between the sum of five skill values and skill: skill represents the field marshal's overall level display, while the five sub-skills are the actual calculation source. Inconsistency between them won't produce an error but will cause numerical values to differ from expectations. It's recommended to plan the total skill tier reasonably based on sub-skills.