Wiki

trigger · all_army_leader

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Checks if All Army Leader of the Country in scope match the triggers.
tooltip=key can be defined to override title.
ex: GER = {
  all_army_leader = {
	tooltip = my_loc_key # Optional
	include_invisible = yes # Optional - default = no
    ... character scope triggers ...
  }
}

实战 · 配合 · 坑

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

实战用法

all_army_leader 常用于检查某国所有陆军将领是否都满足特定条件,例如在国家焦点或决议的 available 块中验证全体将领是否都达到一定技能或特质门槛,从而解锁奖励或触发事件。典型场景:检查德国所有陆军将领是否都拥有某个特质,以决定是否允许触发军事改革焦点。

GER = {
    focus = {
        available = {
            GER = {
                all_army_leader = {
                    is_field_marshal = yes
                }
            }
        }
    }
}

或在事件 trigger 中使用:

trigger = {
    all_army_leader = {
        tooltip = ger_all_marshal_check
        is_field_marshal = yes
        skill > 2
    }
}

配合关系

  • is_field_marshal — 配合 all_army_leader 检查所有将领中是否每人都已被晋升为陆军元帅,用于高级军事成就判断。
  • has_trait — 在 all_army_leader 块内检查每位将领是否都具备某项特质(如 trait = trickster),常见于特殊国策门槛设定。
  • planning_skill_level — 配合 all_army_leader 检查所有将领的计划技能是否达到要求,用于验证国家军队整体指挥素质。
  • custom_trigger_tooltip — 包裹 all_army_leader 以提供更友好的本地化提示文本,让玩家清晰看到条件要求。

常见坑

  1. 误将其用于非 COUNTRY scopeall_army_leader 仅在 COUNTRY scope 下有效,若写在 STATE、CHARACTER 等 scope 内将导致脚本解析错误或静默失败,使用前务必确认当前 scope 是国家。
  2. 遗漏 include_invisible = yes 导致统计不完整:默认情况下不可见将领(如尚未解锁的预设角色)不纳入检查范围,若 mod 中存在通过 set_portraits 等手段管理的隐藏将领,遗漏此参数会使条件判断结果与预期不符。

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

all_army_leader is commonly used to check whether all army leaders of a given country meet specific conditions — for example, inside the available block of a national focus or decision, to verify that every leader has reached a certain skill level or trait threshold before unlocking a reward or firing an event. A typical scenario: checking whether all of Germany's army leaders possess a particular trait in order to determine whether a military reform focus may be taken.

GER = {
    focus = {
        available = {
            GER = {
                all_army_leader = {
                    is_field_marshal = yes
                }
            }
        }
    }
}

Or used inside an event trigger:

trigger = {
    all_army_leader = {
        tooltip = ger_all_marshal_check
        is_field_marshal = yes
        skill > 2
    }
}

Synergy

  • is_field_marshal — Pairs with all_army_leader to verify that every leader has been promoted to field marshal; useful for evaluating high-level military achievements.
  • has_trait — Used inside an all_army_leader block to confirm that every leader possesses a specific trait (e.g. trait = trickster); commonly seen as a threshold condition in special national focuses.
  • planning_skill_level — Pairs with all_army_leader to check whether all leaders meet a required planning skill level, validating the overall command quality of a country's military.
  • custom_trigger_tooltip — Wraps all_army_leader to provide a more player-friendly localized tooltip, making the condition requirements clearly visible in the UI.

Common Pitfalls

  1. Using it outside a COUNTRY scope: all_army_leader is only valid within a COUNTRY scope. Writing it inside a STATE, CHARACTER, or other scope will cause a script parse error or a silent failure. Always confirm the current scope is a country before using it.
  2. Omitting include_invisible = yes leads to incomplete checks: By default, invisible leaders (such as preset characters that have not yet been unlocked) are excluded from the check. If your mod manages hidden leaders via mechanisms like set_portraits, leaving out this parameter will cause the condition to evaluate differently than expected.