Wiki

trigger · is_leading_army_group

Definition

  • Supported scope:CHARACTER
  • Supported target:none

Description

is_leading_army_group = yes/no - Checks if the current unit leader is leading an army group (not single army)

实战 · 配合 · 坑

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

实战用法

在晋升或特性分配类 mod 中,常用于区分指挥单支军队的将领与统领集团军群的元帅级角色,从而触发不同的奖励或限制逻辑。例如,当某角色正在统领集团军群时,才允许其获得特定的高级指挥特性:

# 在某个 on_action 或 decision 的 trigger 块中
character_event = {
    trigger = {
        is_leading_army_group = yes
        is_field_marshal = yes
    }
    # 仅对正在统领集团军群的陆军元帅触发
}

配合关系

  • [is_field_marshal](/wiki/trigger/is_field_marshal):集团军群通常由陆军元帅指挥,两者组合可精确筛选"正在执行集团军群指挥职责的元帅",避免误判普通将领。
  • [is_leading_army](/wiki/trigger/is_leading_army):与 is_leading_army_group 互为补充,可用 NOT 套嵌区分"仅指挥单支军队"与"指挥集团军群"两种状态,实现分支逻辑。
  • [add_unit_leader_trait](/wiki/effect/add_unit_leader_trait):满足条件后为角色动态添加专属指挥特性,常见于"升任集团军群指挥官时解锁新特性"的 mod 设计。
  • [add_skill_level](/wiki/effect/add_skill_level):在确认角色正统领集团军群后给予技能加成,模拟大规模指挥经验带来的成长。

常见坑

  1. is_leading_army_groupis_field_marshal 混淆:角色拥有陆军元帅职位不代表其当前一定在统领集团军群(可能处于未分配状态),必须同时检查该 trigger 才能确认其实际指挥状态。
  2. 在 COUNTRY scope 下调用:该 trigger 仅在 CHARACTER scope 下有效,若在国家事件的顶层 trigger 块中直接使用而未先切换到正确的角色 scope,会导致脚本报错或永远返回 false,需配合 any_character 或具体角色 scope 进行嵌套。

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

Commonly used in promotion or trait assignment mods to distinguish between field commanders leading individual armies and marshal-level roles commanding entire army groups, thereby triggering different reward or restriction logic. For example, only allow a character to gain specific advanced command traits when they are actively leading an army group:

# In the trigger block of an on_action or decision
character_event = {
    trigger = {
        is_leading_army_group = yes
        is_field_marshal = yes
    }
    # Fires only for army marshals actively commanding an army group
}

Synergy

  • [is_field_marshal](/wiki/trigger/is_field_marshal): Army groups are typically commanded by army marshals; combining these triggers allows precise filtering of "marshals currently exercising army group command duties," preventing false positives on regular field commanders.
  • [is_leading_army](/wiki/trigger/is_leading_army): Serves as a complementary trigger to is_leading_army_group; use NOT nesting to distinguish between "commanding only a single army" and "commanding an army group" states, enabling branching logic.
  • [add_unit_leader_trait](/wiki/effect/add_unit_leader_trait): After conditions are met, dynamically add exclusive command traits to a character; commonly seen in mod designs featuring "unlock new traits upon promotion to army group commander."
  • [add_skill_level](/wiki/effect/add_skill_level): Grant skill bonuses after confirming a character is commanding an army group, simulating growth from large-scale command experience.

Common Pitfalls

  1. Confusing is_leading_army_group with is_field_marshal: A character holding the army marshal position does not necessarily mean they are currently commanding an army group (they may be in an unassigned state); this trigger must be checked simultaneously to confirm their actual command status.
  2. Calling within COUNTRY scope: This trigger is only valid in CHARACTER scope; if used directly in the top-level trigger block of a country event without first switching to the correct character scope, it will cause script errors or always return false. Use any_character or a specific character scope wrapper instead.