Wiki

effect · set_party_name

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

change partyname for an ideology in a country

实战 · 配合 · 坑

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

实战用法

set_party_name 常用于政治改革 mod 中,当玩家通过国策或决议改变国家政体时,将对应意识形态的政党名称替换为更符合剧情的称呼(例如将某国的法西斯党重命名为本土化的党派名)。也可用于历史还原 mod,在特定时间节点触发事件后动态更新政党名,使其与历史一致。

# 在某国策完成后,将法西斯意识形态政党改为自定义名称
focus = {
    id = rename_party_fascism
    ...
    completion_reward = {
        set_party_name = {
            ideology = fascism
            long_name = "国家联合阵线"
            name = "国联阵线"
        }
    }
}

配合关系

  • [add_popularity](/wiki/effect/add_popularity):修改政党名称的同时提升该意识形态的支持率,使政治改革在数值与表现上同步生效。
  • [create_country_leader](/wiki/effect/create_country_leader):为新命名的政党创建或更换领导人,让政党改名与人事变动形成完整的政治事件链。
  • [add_ideas](/wiki/effect/add_ideas):配合政党改名加入对应的国家精神,强化该意识形态派系的政策效果叙事。
  • [has_country_leader_ideology](/wiki/trigger/has_country_leader_ideology):在触发条件中检查当前执政意识形态,确保只在正确的执政党掌权时才改名,避免逻辑错误。

常见坑

  1. ideology 字段填写错误:必须使用游戏内部意识形态 key(如 fascismdemocraticcommunismneutrality),不能填写子意识形态或自造字符串,否则命令静默失效且不会报错,非常难以排查。
  2. 忽略 long_namename 的区别:两者均需填写,name 是简称(用于界面空间有限处),long_name 是全称(用于政党列表等),只填一个会导致另一处显示空白或回退到默认值。

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_party_name is commonly used in political reform mods to replace party names with more lore-appropriate titles when players change their nation's ideology through focuses or decisions (for example, renaming a fascist party to a localized variant). It can also be used in historical accuracy mods to dynamically update party names after events trigger at specific timestamps, ensuring alignment with historical records.

# After a focus completes, rename the fascist ideology party to a custom name
focus = {
    id = rename_party_fascism
    ...
    completion_reward = {
        set_party_name = {
            ideology = fascism
            long_name = "National United Front"
            name = "Nat'l United"
        }
    }
}

Synergy

  • [add_popularity](/wiki/effect/add_popularity): Increase the popularity of an ideology while renaming its party, ensuring political reforms take effect consistently in both mechanics and presentation.
  • [create_country_leader](/wiki/effect/create_country_leader): Create or replace the leader of a newly renamed party, forming a complete political event chain linking party renaming with leadership transitions.
  • [add_ideas](/wiki/effect/add_ideas): Pair party renaming with corresponding national spirits to reinforce the narrative and policy effects of the ideology faction.
  • [has_country_leader_ideology](/wiki/trigger/has_country_leader_ideology): Check the current ruling ideology in trigger conditions to ensure renaming only occurs when the correct ruling party is in power, preventing logical errors.

Common Pitfalls

  1. Incorrect ideology field: Must use the game's internal ideology key (such as fascism, democratic, communism, neutrality). Do not use sub-ideologies or custom strings, or the command will silently fail without error messages, making it extremely difficult to debug.
  2. Confusing long_name and name: Both must be filled in. name is the short form (used where interface space is limited), while long_name is the full form (used in party lists, etc.). Omitting one will leave the other blank or revert to the default value.