Wiki

effect · party_leader

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Executes children effects on random characters that fulfills the "limit" trigger.
Has to use has_ideology in limit to determine the party (with ideology group)
tooltip=key can be added to override tooltip title

party_leader = {
	limit = { has_ideology = communism }
	set_character_flag = whatever_flag
}

实战 · 配合 · 坑

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

实战用法

party_leader 常用于国家事件或决议触发后,对特定意识形态政党领袖执行批量状态修改,例如在内战爆发时给共产党领袖添加特殊旗帜、特质或触发后续事件。它的核心优势是无需知道角色具体 ID,只需通过意识形态筛选即可精准命中对应政党领袖。

# 示例:当法西斯执政党领袖上台时,为其添加旗帜并授予特质
party_leader = {
    limit = { has_ideology = fascism }
    set_character_flag = appointed_wartime_leader
    add_trait = { trait = war_industrialist }
}

配合关系

  • [has_ideology](/wiki/trigger/has_ideology)limit 块中必须使用此触发器来指定目标政党所属意识形态分组,这是 party_leader 正常运作的前提条件。
  • [has_country_leader_ideology](/wiki/trigger/has_country_leader_ideology) — 在外层条件中用于判断当前执政意识形态,决定是否整体执行该 effect 块,避免对错误政党触发。
  • [add_trait](/wiki/effect/add_trait) — 最常见的子效果之一,用于给筛选到的政党领袖添加人物特质,强化其能力或触发后续机制。
  • [country_event](/wiki/effect/country_event) — 可在子块中向该政党领袖所属国家触发后续事件,实现政治剧情链的推进。

常见坑

  1. limit 中漏写 has_ideology 或使用错误层级party_leader 要求 limit 必须包含 has_ideology 且使用的是意识形态分组(如 communismfascism),而非具体子意识形态(如 marxism),若漏写或写错分组会导致 effect 静默失效,游戏不报错但不执行任何操作。
  2. 误以为会遍历所有符合条件的角色party_leader 描述中含有"random"语义,当存在多个符合条件的角色时只会随机选取其中一个,而非对所有人批量执行;若需要对所有符合角色执行,应改用 [every_character](/wiki/effect/every_character) 配合相应 limit

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

party_leader is commonly used in national events or decisions to perform bulk state modifications on party leaders of a specific ideology after triggering. For example, when a civil war breaks out, you can add special flags, traits, or trigger subsequent events for communist party leaders. Its core advantage is that you don't need to know the specific character ID—you only need to filter by ideology to precisely target the corresponding party leader.

# Example: When a fascist ruling party leader comes to power, add a flag and grant traits
party_leader = {
    limit = { has_ideology = fascism }
    set_character_flag = appointed_wartime_leader
    add_trait = { trait = war_industrialist }
}

Synergy

  • [has_ideology](/wiki/trigger/has_ideology) — This trigger must be used within the limit block to specify the ideology group of the target party. This is a prerequisite for party_leader to function correctly.
  • [has_country_leader_ideology](/wiki/trigger/has_country_leader_ideology) — Used in outer conditions to check the current ruling ideology and decide whether to execute the entire effect block, preventing the effect from triggering on the wrong party.
  • [add_trait](/wiki/effect/add_trait) — One of the most common sub-effects, used to add character traits to filtered party leaders, enhancing their capabilities or triggering subsequent mechanics.
  • [country_event](/wiki/effect/country_event) — Can trigger subsequent events to the nation that the party leader belongs to within the sub-block, advancing political story chains.

Common Pitfalls

  1. Omitting has_ideology in limit or using the wrong hierarchy: party_leader requires limit to contain has_ideology using an ideology group (such as communism or fascism), not a specific sub-ideology (such as marxism). If omitted or the group is written incorrectly, the effect silently fails—the game reports no error but executes nothing.
  2. Mistakenly assuming it will iterate through all matching characters: Although party_leader's description contains "random" semantics, when multiple characters meet the conditions, only one is randomly selected rather than executing for all; if you need to execute on all matching characters, use [every_character](/wiki/effect/every_character) with the appropriate limit instead.