effect · retire
Definition
- Supported scope:
CHARACTER - Supported target:
none
Description
Retires character, use in character scope
retireCHARACTERnoneRetires character, use in character scope
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
retire 用于在剧情事件或决议中强制让某个角色"退役/卸任",常见于历史事件触发时淘汰老将、或在政治清洗事件中移除某位顾问/将领。例如,当某个将领因伤病或政治原因离开舞台,可在事件的 option 块中调用:
character_event = {
id = my_mod.1
option = {
name = my_mod.1.a
# 先切换到角色 scope,再执行退役
GER_erich_von_manstein = {
retire = yes
}
}
}
[is_corps_commander](/wiki/trigger/is_corps_commander) / [is_field_marshal](/wiki/trigger/is_field_marshal):退役前先判断角色当前是否处于活跃指挥职位,避免对未激活角色触发无效逻辑。[remove_unit_leader](/wiki/effect/remove_unit_leader):若需彻底从游戏中移除角色(而非仅退役),可在 retire 之后补充调用,确保角色不残留在领导人列表中。[promote_character](/wiki/effect/promote_character):常与 retire 配对使用,在一位角色退役的同时提拔另一位角色,实现"新老交替"的叙事效果。[set_character_flag](/wiki/effect/set_character_flag):在执行 retire 前打标记,防止同一角色被多个事件重复触发退役流程。retire 必须在角色自身的 scope 内调用,若直接写在国家 scope(如 GER = { retire = yes })会报错或静默失效,需要用 角色TAG = { retire = yes } 或 any_character = { limit = { ... } retire = yes } 的方式先切换到角色 scope。remove_unit_leader)从游戏中移除,再对其执行 retire 不会报显式错误,但可能产生意料之外的 scope 解析警告,建议配合 [is_unit_leader](/wiki/trigger/is_unit_leader) 或 [is_advisor](/wiki/trigger/is_advisor) 先做存在性检查。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.
retire is used to forcibly retire or remove a character from active duty, typically triggered during historical events to phase out veteran commanders, or in political purge scenarios to remove an advisor or general. When a character leaves the stage due to injury, illness, or political reasons, you can invoke it within an event's option block:
character_event = {
id = my_mod.1
option = {
name = my_mod.1.a
# Switch to character scope first, then execute retire
GER_erich_von_manstein = {
retire = yes
}
}
}
[is_corps_commander](/wiki/trigger/is_corps_commander) / [is_field_marshal](/wiki/trigger/is_field_marshal): Check if the character is currently in an active command position before retiring, to avoid triggering invalid logic on inactive characters.[remove_unit_leader](/wiki/effect/remove_unit_leader): If you need to completely remove a character from the game (rather than just retiring them), call this after retire to ensure the character doesn't linger in the leader list.[promote_character](/wiki/effect/promote_character): Often paired with retire to promote another character at the same time one character retires, creating a narrative effect of "succession of old and new".[set_character_flag](/wiki/effect/set_character_flag): Flag the character before executing retire to prevent the same character from being triggered by multiple events to retire multiple times.retire must be called within the character's own scope. Writing it directly in country scope (e.g., GER = { retire = yes }) will error or silently fail. Use character_tag = { retire = yes } or any_character = { limit = { ... } retire = yes } to switch to character scope first.remove_unit_leader), executing retire again on them won't produce an explicit error, but may generate unexpected scope resolution warnings. It's recommended to check existence first using [is_unit_leader](/wiki/trigger/is_unit_leader) or [is_advisor](/wiki/trigger/is_advisor).