Hands-On Usage
set_country_leader_description is commonly used in mods to dynamically update a leader's biography text based on storyline branches. For example, when a nation completes a specific national focus or triggers a key event, the leader's self-introduction updates to reflect their new political stance or historical position. Additionally, in scenarios where multiple ideologies coexist for the same character (such as when one person holds both democratic and fascist ideology positions), you can maintain separate description text for each ideological path.
# After a nation completes a national focus, update the current ruling leader's biography
complete_national_focus = SOV_great_purge
hidden_effect = {
set_country_leader_description = {
ideology = stalinism
desc = "SOV_STALIN_POST_PURGE_DESC"
}
}
Synergy
[create_country_leader](/wiki/effect/create_country_leader): When creating a new leader, an initial description is attached. Subsequently use set_country_leader_description for dynamic updates. Together they form a complete "create→update" leader management workflow.
[add_country_leader_trait](/wiki/effect/add_country_leader_trait): Adding traits to a leader often accompanies changes to the character's background. Synchronizing the description text update at this point maintains UI narrative consistency.
[has_country_leader](/wiki/trigger/has_country_leader): Before modifying a description, use this trigger first to confirm that a leader of the target ideology actually exists, avoiding commands executed on empty positions.
[set_country_leader_description](/wiki/effect/set_country_leader_description) (multiple calls): Calling it in different options within the same event enables branching narrative effects where "player choices influence the leader's self-description."
Common Pitfalls
- Overlooking the requirement that localization keys must exist: The
desc field contains a key name from the localization file, not direct text. If the corresponding language's .yml file lacks that key, the game displays the raw key string instead of the intended description. New modders often mistakenly assume the effect itself has failed.
- Misunderstanding the target when omitting
ideology: Omitting the ideology field does not affect all leaders; it only modifies the description of the currently ruling leader (i.e., the leader of the nation's current ideology path). If you want to modify a leader's description under a non-ruling ideology, you must explicitly specify ideology, otherwise you will modify the wrong target.