Hands-On Usage
set_faction_name is commonly used for dynamic faction renaming scenarios, such as when a player nation completes a national focus and renames an existing faction to match a new ideology or narrative. It is also frequently paired with create_faction to assign a localized name immediately upon faction creation, providing players with a more immersive faction title in the interface.
# After a nation completes a national focus, rename the faction it leads
complete_national_focus = GER_new_order
hidden_effect = {
set_faction_name = GER_new_faction_name # Corresponds to the key defined in localisation
}
Synergy
[create_faction](/wiki/effect/create_faction): Call set_faction_name immediately after establishing a new faction to ensure the faction has the correct localized name upon creation rather than displaying the default tag name.
[add_to_faction](/wiki/effect/add_to_faction): Trigger a simultaneous rename when inviting new members to join, working in conjunction with narrative events to reflect the faction's evolving nature.
[dismantle_faction](/wiki/effect/dismantle_faction): Dismantle an old faction, then rebuild and rename it—commonly used in story branches that completely reshape the alignment system.
[has_capitulated](/wiki/trigger/has_capitulated): Use as a conditional trigger to determine when a major power has capitulated, then call set_faction_name within an option block to mark a shift in faction power.
Common Pitfalls
- Localization key does not exist and will display as gibberish without throwing an error: Beginners often enter the faction's display text directly instead of the key defined in the localisation file, resulting in the game displaying the raw key string. Always define key-value pairs in the appropriate language file under
localisation/ before referencing them.
- Calling the command is ineffective when the scope lacks a faction leader: If the current scope's nation or state does not belong to any faction (or the nation is not the faction leader), the command silently fails. It is recommended to validate faction existence beforehand using conditions like
[has_capitulated](/wiki/trigger/has_capitulated), or ensure the scope is switched to the faction leader's nation before execution.