Hands-On Usage
create_faction is commonly used in custom national focus tree mods to establish faction-exclusive alliances when specific focuses or events are triggered—for example, enabling a historically non-aligned nation to form its own power bloc under certain conditions. Since the developers have marked it as deprecated, it is recommended to use this command only in lightweight mods that do not enable the Deeper Factions DLC. Otherwise, you should migrate to create_faction_from_template instead.
# Create a new faction as a focus completion reward
focus = {
id = form_new_alliance
...
completion_reward = {
create_faction = NEW_ALLIANCE_NAME
}
}
Synergy
[add_to_faction](/wiki/effect/add_to_faction): Immediately invite allies to join the newly created faction. This is the most common companion operation.
[create_wargoal](/wiki/effect/create_wargoal): Generate war goals against mutual enemies after establishing the faction to drive the narrative forward.
[dismantle_faction](/wiki/effect/dismantle_faction): In certain branching narratives, you may need to dismantle an old faction before rebuilding. Often paired with create_faction.
[has_completed_focus](/wiki/trigger/has_completed_focus): Used to verify prerequisites for faction creation, ensuring the effect only triggers after a specific focus is completed.
Common Pitfalls
- Scope Errors:
create_faction can only be executed under COUNTRY scope. If used within STATE or CHARACTER scope, it will error or fail silently. Beginners often forget to switch scope when nesting blocks.
- Missing Localization Keys: The parameter expects a localization key for the faction name (e.g.,
MY_FACTION_NAME). If the key is not defined in the corresponding .yml localization file, the game will display the raw key instead of a readable name, which is easily mistaken for a scripting error.