Wiki

effect · remove_country_leader_role

Definition

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

Description

Remove country leader role from character.
Example:
remove_country_leader_role = {
	character = "GER_Character_Token" # optional if inside character scope
	ideology = socialism
}

实战 · 配合 · 坑

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

实战用法

在政治事件或国家焦点中,当某位领导人因政变、流亡或意识形态转变而失去执政地位时,可用此 effect 将其从特定意识形态的领袖角色中移除,而不必彻底删除该角色。例如在二战后重建脚本里,将原先以法西斯主义担任领袖的角色转变为普通人物,再赋予新的意识形态角色。

# 在一个国家焦点或事件 option 里,将角色从法西斯领袖位置移除
GER = {
    remove_country_leader_role = {
        character = "GER_Adolf_Hitler"
        ideology = fascism
    }
}

配合关系

  • [add_country_leader_role](/wiki/effect/add_country_leader_role):移除旧意识形态角色后,紧接着为同一角色添加新意识形态的领袖角色,实现"意识形态转换"而不销毁角色本体。
  • [add_country_leader_trait](/wiki/effect/add_country_leader_trait) / [remove_country_leader_trait](/wiki/effect/remove_country_leader_trait):在重置领袖角色前后,同步清理或添加与该角色定位匹配的领袖特质,保持数值一致性。
  • [set_nationality](/wiki/effect/set_nationality):当角色因政权更迭需要转移到流亡政府或他国时,先移除本国领袖角色再变更国籍,逻辑更为完整。
  • [can_be_country_leader](/wiki/trigger/can_be_country_leader):执行移除前,用此触发器检查角色当前是否真正持有该领袖角色,避免脚本报错或产生意外日志警告。

常见坑

  1. 忘记指定 ideology 字段:一个角色可以同时持有多个意识形态的领袖角色(如同时是民主与中立的领袖),若不写 ideology,脚本将因缺少必要字段而无法正确执行,导致角色角色未被移除但也不报明显错误,难以排查。
  2. 在国家 scope 下漏写 character 令牌:只有在 CHARACTER scope 内部调用时 character 字段才可省略;在 COUNTRY scope 下若不指定 character,游戏无法确定目标角色,效果会静默失效。

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

In political events or national focuses, when a leader loses their position of power due to a coup, exile, or ideological shift, you can use this effect to remove them from their leader role under a specific ideology without completely deleting the character. For example, in post-war reconstruction scripts, you can transform a character who previously held a fascist leader role into a regular person, then assign them a new ideological leader role.

# Within a national focus or event option, remove a character from their fascist leader position
GER = {
    remove_country_leader_role = {
        character = "GER_Adolf_Hitler"
        ideology = fascism
    }
}

Synergy

  • [add_country_leader_role](/wiki/effect/add_country_leader_role): After removing the old ideological role, immediately assign a new ideological leader role to the same character, achieving "ideological conversion" without destroying the character itself.
  • [add_country_leader_trait](/wiki/effect/add_country_leader_trait) / [remove_country_leader_trait](/wiki/effect/remove_country_leader_trait): Before and after resetting a leader role, synchronously clean up or add leader traits matching the character's new position to maintain numerical consistency.
  • [set_nationality](/wiki/effect/set_nationality): When a character needs to be transferred to an exile government or another nation due to regime change, first remove their leader role from the original nation before changing nationality for a more complete logical flow.
  • [can_be_country_leader](/wiki/trigger/can_be_country_leader): Before executing the removal, use this trigger to verify whether the character currently actually holds that leader role, avoiding script errors or unexpected log warnings.

Common Pitfalls

  1. Forgetting to specify the ideology field: A character can simultaneously hold leader roles across multiple ideologies (such as being both a democratic and neutral leader). If you omit ideology, the script will fail to execute properly due to missing required fields, resulting in the character not being removed while also producing no obvious error—making it difficult to debug.
  2. Omitting the character token when in country scope: The character field can only be omitted when calling within CHARACTER scope; if you don't specify character under COUNTRY scope, the game cannot determine the target character and the effect silently fails.