Wiki

effect · set_leader_description

Definition

  • Supported scope:CHARACTER
  • Supported target:any

Description

changes the description of unit leader. no tooltip is generated
set_leader_description = "DESC_KEY"

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_leader_description is commonly used in narrative-driven mods to dynamically inject biographical text into a character's profile when they experience specific events (such as promotion, injury, or defection). This creates a sense of "living" character development. It's also frequently seen in historical accuracy mods, where it's used to swap out a leader's official biography at key historical moments to match period-appropriate historical descriptions.

# Update a leader's description after a historical event is triggered
character_event = {
    id = my_mod.100
    hidden = yes
    immediate = {
        FROM = {
            set_leader_description = "CHAR_ROMMEL_PROMOTED_DESC"
        }
    }
}

Synergy

  • [set_leader_name](/wiki/effect/set_leader_name): Often called together with this effect to synchronously update both the leader's display name and biographical description at narrative turning points, maintaining profile consistency.
  • [set_leader_portrait](/wiki/effect/set_leader_portrait): Pair portrait changes with description text replacement so that both visual and textual presentation evolve with the storyline.
  • [set_character_flag](/wiki/effect/set_character_flag): Use a flag to record the "description updated" state first, then combine with [has_character_flag](/wiki/trigger/has_character_flag) for conditional logic to prevent description text from being repeatedly overwritten.
  • [add_unit_leader_trait](/wiki/effect/add_unit_leader_trait): Update the description when adding new traits to a leader, allowing the trait's backstory to be explained through the biographical text.

Common Pitfalls

  1. Referencing undefined localization keys: The parameter for set_leader_description must be a string key already declared in .yml localization files. If the key doesn't exist, the game won't throw an error, but the profile page will display blank or show the raw key name—easily mistaken for a script failure.
  2. Calling outside CHARACTER scope: This effect only works within CHARACTER scope. If mistakenly called under COUNTRY or STATE scope, the game log will emit a scope mismatch warning and the command silently fails. When debugging, carefully verify the calling hierarchy.