Wiki

effect · remove_unit_leader_role

Definition

  • Supported scope:COUNTRY, CHARACTER
  • Supported target:none

Description

Remove unit leader role to character

Example:
remove_corps_commander_role = {
	character = GER_Character_token 
}
remove_corps_commander_role = yes # inside a character scope

实战 · 配合 · 坑

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

实战用法

当你需要将一个角色从野战指挥官转型为政治顾问或科学家时,必须先用此命令剥夺其军事职责,再赋予新角色,常见于角色成长事件链或政治清洗事件中。例如,某将领因受伤退出战场转任顾问:

# 在 country scope 内,将某将领的军团指挥官职移除
remove_unit_leader_role = {
    character = GER_von_manstein
}
# 随后赋予顾问角色
add_advisor_role = {
    character = GER_von_manstein
    advisor = {
        slot = theorist
        idea_token = GER_von_manstein_theorist
        cost = 0
    }
}

配合关系

  • [add_advisor_role](/wiki/effect/add_advisor_role):移除军事职位后,紧接着赋予顾问职位,是角色转型的标准搭档。
  • [remove_unit_leader](/wiki/effect/remove_unit_leader):若不再需要该角色继续存在于游戏中,可在移除职位后彻底删除该单位领导者。
  • [add_corps_commander_role](/wiki/effect/add_corps_commander_role) / [add_field_marshal_role](/wiki/effect/add_field_marshal_role):先移除旧军事职位再添加新军事职位,用于在角色晋升或降职事件中切换指挥层级。
  • [has_advisor_role](/wiki/trigger/has_advisor_role):在执行移除前,用于条件检查角色当前担任的职位,防止对已不具备该职位的角色重复操作。

常见坑

  1. 在错误 scope 下调用:若在 state scope 或其他非 COUNTRY/CHARACTER scope 内调用此命令,脚本会静默失败且不报错,务必确认外层 scope 是国家或角色本身。
  2. 移除职位后忘记处理角色状态:移除军事职位并不会自动赋予角色新职位,若角色此后既无军事职位也无顾问职位,角色仍会滞留在游戏中占用资源却没有任何功能,应配合后续命令明确赋予新角色或用 [remove_unit_leader](/wiki/effect/remove_unit_leader) 将其清除。

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

When you need to transition a character from a field commander to a political advisor or scientist, you must first use this command to strip their military responsibilities, then assign a new role. This is commonly seen in character growth event chains or political purge events. For example, a general wounded and withdrawn from combat to take up an advisory position:

# Within country scope, remove the corps commander role from a specific general
remove_unit_leader_role = {
    character = GER_von_manstein
}
# Subsequently assign an advisor role
add_advisor_role = {
    character = GER_von_manstein
    advisor = {
        slot = theorist
        idea_token = GER_von_manstein_theorist
        cost = 0
    }
}

Synergy

  • [add_advisor_role](/wiki/effect/add_advisor_role): Removing a military position followed immediately by assigning an advisor role is the standard pairing for character transitions.
  • [remove_unit_leader](/wiki/effect/remove_unit_leader): If the character no longer needs to exist in the game, you can completely remove the unit leader after stripping their position.
  • [add_corps_commander_role](/wiki/effect/add_corps_commander_role) / [add_field_marshal_role](/wiki/effect/add_field_marshal_role): Remove the old military position before adding a new one to switch command hierarchy during promotion or demotion events.
  • [has_advisor_role](/wiki/trigger/has_advisor_role): Before executing removal, use this to check the character's current position via conditional, preventing duplicate operations on characters who no longer hold that role.

Common Pitfalls

  1. Calling in the wrong scope: If you call this command within a state scope or other non-COUNTRY/CHARACTER scope, the script will fail silently without error messages. Always verify that the outer scope is a country or the character themselves.
  2. Forgetting to handle character status after role removal: Removing a military position does not automatically assign the character a new role. If a character subsequently has neither a military position nor an advisor position, they will remain in the game consuming resources with no actual function. You should pair this with subsequent commands to explicitly assign a new role or use [remove_unit_leader](/wiki/effect/remove_unit_leader) to remove them entirely.