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
}

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.