Wiki

effect · set_country_leader_ideology

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

change the ideology of active leader

实战 · 配合 · 坑

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

实战用法

set_country_leader_ideology 常用于国家焦点树或事件中动态改变当前领导人的子意识形态,例如让一个最初属于"民族主义"派系的领袖转变为"法西斯"意识形态,以配合政治路线的剧情演变。此外,在内战或政变事件中也常用它来即时刷新领导人立场,确保 AI 和玩家的外交行为与新意识形态一致。

# 在焦点完成效果中,将当前领导人意识形态切换为法西斯主义
focus = {
    id = MY_FASCIST_COUP
    ...
    completion_reward = {
        set_country_leader_ideology = fascism_ideology
    }
}

配合关系

  • [has_country_leader_ideology](/wiki/trigger/has_country_leader_ideology):在执行切换前先检测当前领导人的意识形态,避免重复触发或产生逻辑冲突。
  • [add_popularity](/wiki/effect/add_popularity):切换领导人意识形态后,通常需要同步提升对应意识形态的支持率,使政治面貌保持自洽。
  • [add_country_leader_trait](/wiki/effect/add_country_leader_trait):意识形态改变后,往往需要为领导人追加或替换符合新立场的性格特质,增强叙事合理性。
  • [country_event](/wiki/effect/country_event):切换意识形态后触发一个后续事件,让玩家感知到政治转变带来的连锁反应。

常见坑

  1. 目标是"活跃领导人"而非所有角色:该命令只作用于当前执政的国家领袖,若此时没有活跃领导人(如角色尚未通过 create_country_leader 或焦点激活),命令会静默失效,不会报错但也不产生任何效果,新手容易误以为脚本有 bug。
  2. 意识形态 token 必须与 ideologies 定义完全一致:填写的值必须是在 common/ideologies/ 中定义的子意识形态 token(如 fascism_ideology),而非意识形态组名(如 fascism);写错名称同样不会报错,但切换不会生效。

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

set_country_leader_ideology is commonly used in national focus trees or events to dynamically shift the ruling leader's sub-ideology. For example, you might convert a leader initially aligned with the "Nationalism" faction to "Fascism" to match the story progression of political realignment. It's also frequently employed in civil war or coup events to instantly refresh the leader's ideological stance, ensuring both AI and player diplomatic behavior aligns with the new ideology.

# In focus completion effects, switch the current leader's ideology to fascism
focus = {
    id = MY_FASCIST_COUP
    ...
    completion_reward = {
        set_country_leader_ideology = fascism_ideology
    }
}

Synergy

  • [has_country_leader_ideology](/wiki/trigger/has_country_leader_ideology): Check the current leader's ideology before executing the switch to avoid redundant triggers or logical conflicts.
  • [add_popularity](/wiki/effect/add_popularity): After switching the leader's ideology, you typically need to simultaneously boost support for the corresponding ideology to maintain political consistency.
  • [add_country_leader_trait](/wiki/effect/add_country_leader_trait): Following an ideology change, it's often necessary to add or replace character traits that align with the new political stance to strengthen narrative coherence.
  • [country_event](/wiki/effect/country_event): Trigger a follow-up event after the ideology switch so players perceive the cascading effects of political transformation.

Common Pitfalls

  1. The target is the "active leader," not all characters: This command only affects the currently ruling state leader. If no active leader exists at that moment (e.g., the character hasn't been created via create_country_leader or activated by a focus), the command silently fails without throwing an error or producing any effect—newcomers often mistakenly believe this is a script bug.
  2. The ideology token must exactly match the ideologies definition: The value you provide must be a sub-ideology token defined in common/ideologies/ (such as fascism_ideology), not an ideology group name (such as fascism). Misspelling the name won't raise an error either, but the switch won't take effect.