Wiki

effect · add_country_leader_trait

Definition

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

Description

Add country leader trait to the scoped character or scoped country's leader.
In scoped character, will need to give the ideology if the character has several country leader roles.
Example 1: SOV_joseph_stalin = { add_country_leader_trait = underage_monarch }
Example 2: HUN_miklos_horthy = { add_country_leader_trait = { ideology = oligarchism trait = anti_communist } }
Example 3: SOV = { add_country_leader_trait = underage_monarch }

实战 · 配合 · 坑

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

实战用法

add_country_leader_trait 常用于剧本事件或国策完成后为领导人动态添加特质,例如在玩家完成某条意识形态路线国策后,给当前国家领袖赋予象征其政策风格的特质。当一个角色同时拥有多个领导人角色(如同时担任不同意识形态路线的领袖)时,必须通过 ideology 字段指定目标意识形态,否则脚本将报错或行为不可预期。

# 国策完成后,为匈牙利的霍尔蒂在寡头主义意识形态下添加反共产主义特质
complete_national_focus = HUN_anti_communist_pact
HUN_miklos_horthy = {
    add_country_leader_trait = {
        ideology = oligarchism
        trait = anti_communist
    }
}

配合关系

  • [remove_country_leader_trait](/wiki/effect/remove_country_leader_trait):与本命令对应,用于动态切换领袖特质,例如在某一事件触发时先移除旧特质再添加新特质,实现特质的替换逻辑。
  • [add_country_leader_role](/wiki/effect/add_country_leader_role):当角色尚未拥有某意识形态的领导人角色时,需先赋予角色该角色身份,再用本命令添加对应特质,两者顺序依赖明确。
  • [can_be_country_leader](/wiki/trigger/can_be_country_leader):在添加特质前用于条件判断,确认目标角色当前确实可以成为国家领袖,避免对无效角色执行效果。
  • [create_country_leader](/wiki/effect/create_country_leader):在从零创建领袖角色的场景中,可先用 create_country_leader 建立角色,再用本命令补充追加额外特质,分步构建完整的领袖属性。

常见坑

  1. 多意识形态角色忘填 ideology 字段:若某角色同时持有多个 country_leader 角色(对应不同意识形态),直接写 add_country_leader_trait = some_trait 而不指定 ideology 会导致游戏无法确定目标角色身份,特质可能加到错误的角色或完全无效,应始终使用带 ideology 的块写法。
  2. 在国家 scope 下期望精确控制特定角色:在 SOV = { ... } 这样的国家 scope 下使用时,效果作用于当前执行政府的领袖,而非指定角色;若需要精确控制某个具体角色(尤其是非执政领袖),必须切换到角色 scope(如 SOV_joseph_stalin = { ... })来调用命令。

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

add_country_leader_trait is commonly used in scripted events or upon completion of national focuses to dynamically assign traits to a leader. For example, after a player completes a national focus along a certain ideological path, you can grant the current nation's leader a trait that symbolizes their policy style. When a character simultaneously holds multiple leader roles (such as serving as leader for different ideological paths), you must specify the target ideology via the ideology field; otherwise, the script will error or behave unexpectedly.

# After completing a national focus, add the anti-communist trait to Hungary's Horthy under oligarchism ideology
complete_national_focus = HUN_anti_communist_pact
HUN_miklos_horthy = {
    add_country_leader_trait = {
        ideology = oligarchism
        trait = anti_communist
    }
}

Synergy

  • [remove_country_leader_trait](/wiki/effect/remove_country_leader_trait): The counterpart to this command, used for dynamically switching leader traits. For example, when an event triggers, remove the old trait first and then add the new one to implement trait replacement logic.
  • [add_country_leader_role](/wiki/effect/add_country_leader_role): When a character does not yet possess a leader role for a certain ideology, you must first grant them that role identity before using this command to add the corresponding trait. The order of these two operations has a clear dependency.
  • [can_be_country_leader](/wiki/trigger/can_be_country_leader): Use before adding traits as a conditional check to confirm the target character can currently serve as a national leader, avoiding applying effects to invalid characters.
  • [create_country_leader](/wiki/effect/create_country_leader): In scenarios where you create a leader from scratch, you can first use create_country_leader to establish the character, then use this command to append additional traits, building up the complete leader attributes step by step.

Common Pitfalls

  1. Forgetting the ideology field for multi-ideology characters: If a character holds multiple country_leader roles (corresponding to different ideologies), writing add_country_leader_trait = some_trait directly without specifying ideology will cause the game to be unable to determine the target character's identity, and the trait may be applied to the wrong character or be completely ineffective. Always use the block syntax with the ideology field.
  2. Expecting precise control of a specific character within a country scope: When used under a country scope like SOV = { ... }, the effect applies to the leader of the currently executing government, not a designated character. If you need precise control over a specific character (especially a non-ruling leader), you must switch to a character scope (such as SOV_joseph_stalin = { ... }) to invoke the command.