trigger · is_leading_army
Definition
- Supported scope:
CHARACTER - Supported target:
none
Description
is_leading_army = yes/no - Checks if the current unit leader is leading a single army (not army group)
is_leading_armyCHARACTERnoneis_leading_army = yes/no - Checks if the current unit leader is leading a single army (not army group)
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
is_leading_army 常用于判断某个将领当前是否正在指挥一支单独的军队(而非集团军群),适合在特质解锁、事件触发或将领升级逻辑中作为前置条件。例如,你希望只有"正在单独带兵"的将领才能触发某个战斗事件或获得特定增益:
# 在 unit_leader_event 的 trigger 块中,确保只对正在指挥单一军队的将领触发
unit_leader_event = {
id = my_mod.1
trigger = {
is_leading_army = yes
is_corps_commander = yes
skill >= 3
}
}
[is_leading_army_group](/wiki/trigger/is_leading_army_group):与其形成互斥对比判断,当你需要区分"指挥集团军群"与"指挥单支军队"的将领执行不同逻辑时配合使用。[is_corps_commander](/wiki/trigger/is_corps_commander):军团指挥官通常以指挥单一军队为主,两者联合可精确筛选出"正在实际带兵的军团指挥官"。[add_timed_unit_leader_trait](/wiki/effect/add_timed_unit_leader_trait):确认将领正在带领单一军队后,为其临时附加作战特质,避免将特质错误赋予未出征或指挥集团军群的将领。[num_units](/wiki/trigger/num_units):在确认 is_leading_army = yes 后,进一步检查其麾下部队数量,实现更精细的条件分层。yes,但集团军群司令(Field Marshal 带领的 Army Group)并不满足条件,必须搭配 [is_leading_army_group](/wiki/trigger/is_leading_army_group) 才能覆盖所有出征将领。false 且不报错,务必确认当前 scope 已经切换到具体的 CHARACTER(如通过 any_character、unit_leader_event 等进入角色 scope)再使用。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.
is_leading_army is commonly used to determine whether a specific general is currently commanding an independent army (rather than an army group). This is useful as a prerequisite condition in trait unlocks, event triggers, or general promotion logic. For example, if you want only generals "actively commanding a single army" to trigger certain combat events or receive specific bonuses:
# In the trigger block of unit_leader_event, ensure the event only fires for generals commanding a single army
unit_leader_event = {
id = my_mod.1
trigger = {
is_leading_army = yes
is_corps_commander = yes
skill >= 3
}
}
[is_leading_army_group](/wiki/trigger/is_leading_army_group): Forms a mutually exclusive contrast with this trigger. Use both together when you need to distinguish between generals "commanding an army group" and "commanding a single army" to execute different logic branches.[is_corps_commander](/wiki/trigger/is_corps_commander): Corps commanders typically focus on commanding a single army. Combined with this trigger, you can precisely filter "corps commanders actively leading troops."[add_timed_unit_leader_trait](/wiki/effect/add_timed_unit_leader_trait): After confirming a general is leading a single army, use this to temporarily attach combat traits, avoiding mistakenly assigning traits to generals not deployed or commanding army groups.[num_units](/wiki/trigger/num_units): After confirming is_leading_army = yes, further check the number of units under their command to implement more granular condition layers.yes for all generals on the battlefield, but Field Marshals commanding Army Groups do not satisfy this condition. You must use [is_leading_army_group](/wiki/trigger/is_leading_army_group) in combination to cover all deployed generals.false without errors. Always ensure the current scope has switched to a specific CHARACTER (such as through any_character, unit_leader_event, etc.) before using it.