effect · demote_leader
Definition
- Supported scope:
CHARACTER - Supported target:
none
Description
Demotes field marshal to general
demote_leaderCHARACTERnoneDemotes field marshal to general
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
demote_leader 常用于剧本事件或决议中,将某位元帅因战败、政治失势或受伤等情节强制降级为将领,实现动态的指挥体系变动。例如在一个"指挥失误"事件中,让玩家控制角色自动降级:
character_event = {
id = my_mod.101
title = "指挥失误"
option = {
name = "接受处分"
# scope 已是 CHARACTER
demote_leader = yes
}
}
[is_field_marshal](/wiki/trigger/is_field_marshal):在执行降级前用此触发器校验角色确实是元帅身份,避免对普通将领调用该指令造成逻辑错误。[add_corps_commander_role](/wiki/effect/add_corps_commander_role):降级后若角色原本没有将领角色数据,可以用此命令补充配置,确保降级后能正常上任。[is_leading_army_group](/wiki/trigger/is_leading_army_group):降级前检查角色是否正在统帅集团军,若仍在指挥则可能需要额外处理部队归属逻辑。[promote_leader](/wiki/effect/promote_leader):与 demote_leader 形成对称操作,可在奖惩事件链中互相搭配,实现晋升/降级的双向剧情。is_corps_commander)调用 demote_leader 不会产生预期效果,应先用 [is_field_marshal](/wiki/trigger/is_field_marshal) 确认角色确实持有元帅职衔再执行。CHARACTER scope 下使用,若写在国家 scope 中而未通过 every_character 或具体角色变量切入,脚本将静默失败且不会报错,排查时容易遗漏。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.
demote_leader is commonly used in scripted events or decisions to forcibly demote a field marshal to general rank due to narrative reasons such as military defeat, political setback, or injury, enabling dynamic changes to the command structure. For example, in a "command failure" event where the player-controlled character is automatically demoted:
character_event = {
id = my_mod.101
title = "Command Failure"
option = {
name = "Accept Punishment"
# scope is already CHARACTER
demote_leader = yes
}
}
[is_field_marshal](/wiki/trigger/is_field_marshal): Use this trigger before executing the demotion to verify the character is actually a field marshal, avoiding logic errors from calling this command on ordinary generals.[add_corps_commander_role](/wiki/effect/add_corps_commander_role): After demotion, if the character lacks a corps commander role definition, use this command to supplement the configuration and ensure the character can assume command normally after demotion.[is_leading_army_group](/wiki/trigger/is_leading_army_group): Before demotion, check whether the character is currently commanding an army group; if still in command, additional handling of unit assignment logic may be required.[promote_leader](/wiki/effect/promote_leader): Forms a symmetric operation with demote_leader, allowing mutual pairing in reward/punishment event chains to create bidirectional promotion/demotion narratives.demote_leader directly on an ordinary general (is_corps_commander) will not produce the expected effect; you should first use [is_field_marshal](/wiki/trigger/is_field_marshal) to confirm the character actually holds field marshal rank before executing.CHARACTER scope. If written in a country scope without transitioning via every_character or a specific character variable, the script will fail silently without error messages, making it easy to miss during debugging.