Wiki

effect · create_country_leader

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

creates a leader and adds it to proper party in country
if a character with the same token, or the same name already exists, then just add the country leader role.

Example:
create_country_leader = {
	name = "Leader Name"
	name = XXX_leader_name # optional, faster to find an already existing character
	desc = "LEADER_DESC_LOCALIZATION_TAG"
	picture = "Portrait_leader_name.dds" # picture = "...." also supported for backwards compatibility
	expire = "1965.1.1"
	ideology = despotism
	traits = {
		the_director
	}
}

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

create_country_leader is most commonly used in mods for adding new factions, political upheaval, or civil war events, allowing you to instantly generate and assign a leader of a specific ideology to a country. For example, in an alternate history mod, when a country completes a coup through a focus tree, you can automatically replace the original leader:

# Completion reward for a coup focus in a certain country
GER = {
    create_country_leader = {
        name = "Heinrich Müller"
        desc = "MUELLER_DESC"
        picture = "Portrait_GER_mueller.dds"
        expire = "1965.1.1"
        ideology = fascism_ideology
        traits = {
            ruthless_dictator
        }
    }
}

Synergy

  • [has_country_leader](/wiki/trigger/has_country_leader): Before creating a new leader, use this to check if a specific leader already exists, avoiding duplicate triggers or conflicts.
  • [add_country_leader_role](/wiki/effect/add_country_leader_role): When a character already exists in the game as a general or advisor, use this command instead to append a leader role, covering different character creation scenarios alongside create_country_leader.
  • [add_country_leader_trait](/wiki/effect/add_country_leader_trait): Dynamically add traits to a leader immediately after creation, compensating for the limitation that the traits block only supports static initial traits.
  • [has_country_leader_with_trait](/wiki/trigger/has_country_leader_with_trait): In event or decision trigger conditions, verify whether the current leader carries a specific trait, forming a complete "condition → create → verify" workflow with the creation logic.

Common Pitfalls

  1. Incorrect hierarchy in ideology field: The ideology field expects a sub-ideology (such as despotism or fascism_ideology), not a parent ideology group (such as neutrality or fascism). Beginners often fill in the parent name, causing the leader to fail binding to the party correctly, yet no error is reported—it silently fails.
  2. Same-named/same-token character not properly reused: The official description states that if a character with the same name already exists, a leader role is directly appended. However, if the picture or desc fields are inconsistent with the existing character, the behavior may not match expectations. The safest approach is: for characters already defined in the characters block, use add_country_leader_role instead of calling this command repeatedly.