trigger · is_army_leader
Definition
- Supported scope:
CHARACTER - Supported target:
none
Description
is_army_leader = yes/no - Checks if the current character is a army leader
is_army_leaderCHARACTERnoneis_army_leader = yes/no - Checks if the current character is a army leader
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
is_army_leader 常用于角色相关事件或决策中,限定某些效果只对陆军指挥官(corps commander 或 field marshal)生效,例如给符合条件的角色添加特质或晋升。在角色 focus/event 触发时用来区分不同职能的角色,避免对顾问、科学家等误触发。
# 事件选项:只有陆军指挥官才能获得该特质
option = {
name = my_event.option_a
trigger = {
is_army_leader = yes
}
add_trait = { trait = brilliant_strategist }
}
[is_corps_commander](/wiki/trigger/is_corps_commander) / [is_field_marshal](/wiki/trigger/is_field_marshal):is_army_leader 只判断"是否是陆军指挥官",若需进一步区分兵团指挥官还是野战元帅,需配合这两个 trigger 细化判断。[is_leading_army](/wiki/trigger/is_leading_army):与 is_army_leader 搭配可以区分"有陆军指挥官身份"和"当前正在带兵作战",用于更精确的战时条件检查。[add_unit_leader_trait](/wiki/effect/add_unit_leader_trait):满足 is_army_leader = yes 后通常紧跟添加指挥官特质,该 effect 是最常见的后续动作。[promote_leader](/wiki/effect/promote_leader):确认角色是陆军指挥官后,可在满足条件时用此 effect 晋升其军衔。is_unit_leader 混淆:is_unit_leader 对所有单位指挥官(陆/海/空)均返回真,而 is_army_leader 仅针对陆军指挥官。若场景只涉及陆军却误用 is_unit_leader,会导致海军将领或空军指挥官也意外满足条件。any_character / every_character 等切换 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_army_leader is commonly used in character-related events or decisions to restrict certain effects to apply only to army commanders (corps commander or field marshal). For example, you can use it to add traits or promote characters that meet the conditions. When character focus/event triggers, it helps distinguish characters with different roles and prevents unintended effects on advisors, scientists, and similar characters.
# Event option: only army commanders can receive this trait
option = {
name = my_event.option_a
trigger = {
is_army_leader = yes
}
add_trait = { trait = brilliant_strategist }
}
[is_corps_commander](/wiki/trigger/is_corps_commander) / [is_field_marshal](/wiki/trigger/is_field_marshal): is_army_leader only checks "whether the character is an army commander". If you need to further distinguish between corps commanders and field marshals, combine it with these two triggers for more granular checks.[is_leading_army](/wiki/trigger/is_leading_army): Pairing with is_army_leader allows you to differentiate between "having an army commander position" and "currently leading troops in combat", enabling more precise wartime condition checks.[add_unit_leader_trait](/wiki/effect/add_unit_leader_trait): After confirming is_army_leader = yes, the typical follow-up action is to add commander traits using this effect.[promote_leader](/wiki/effect/promote_leader): After verifying the character is an army commander, you can use this effect to promote their military rank when conditions are met.is_unit_leader: is_unit_leader returns true for all unit commanders (army/navy/air), while is_army_leader only applies to army commanders. If your scenario involves only army units but you mistakenly use is_unit_leader, naval commanders or air force commanders will unexpectedly satisfy the condition.any_character / every_character or similar, the script will error or silently fail.