Installation¶
Prerequisites¶
- Unreal Engine 5.4 or later
- C++ project (or a Blueprint project with the plugin pre-compiled)
FWFactionSystem has no external dependencies. It uses only core engine modules (Core, CoreUObject, Engine, AIModule, GameplayTags, NetCore).
Step 1: Add the Plugin¶
Step 2: Enable the Plugin¶
Open Edit > Plugins in the Unreal Editor, search for "FW Faction System", and enable it. Restart the editor when prompted.
Alternatively, add it directly to your .uproject file:
Step 3: Add Module Dependency¶
If you need to reference FWFactionSystem types from your game module's C++ code, add the module dependency in your Build.cs:
Step 4: Register the PrimaryAssetType¶
FWFactionSystem uses Unreal's AssetManager to discover UFWFactionDefinition DataAssets at startup. You need to register the asset type so the subsystem can find your faction definitions.
Open Project Settings > Game > Asset Manager and add a new entry to Primary Asset Types to Scan:
| Field | Value |
|---|---|
| Primary Asset Type | FactionDef |
| Asset Base Class | FWFactionDefinition |
| Directories | /Game/Data/Factions/ (or wherever you store them) |
| Rules > Apply Recursively | Checked |
Missing Asset Registration
If you skip this step, UFWFactionSubsystem::GetFactionDefinition() will return nullptr for all factions. The subsystem logs a warning at startup if no faction definitions are found.
Step 5: Create Your First Faction¶
- Right-click in the Content Browser.
- Select Miscellaneous > Data Asset.
- Choose
FWFactionDefinitionas the class. - Name it (e.g.,
DA_Faction_Ironclad). - Set the FactionId, DisplayName, TeamId, and other properties.
See Configuration for a detailed walkthrough of each property.
Verification¶
After restarting the editor with the plugin enabled:
- Open Window > Developer Tools > Output Log.
- Search for
LogFWFactionSystem. You should see a log entry confirming the number of faction definitions loaded. - Place an actor with a
UFWFactionComponentin your level, set itsDefaultFactionId, and press Play. The component should register with the subsystem automatically.
Tip
Use the console command FWFaction.ListFactions (non-shipping builds) to verify all definitions loaded correctly.