Modding Documentation
These guides cover setting up the Unreal Engine editor, writing AngelScript gameplay code, creating Blueprints and assets, and packaging mods for distribution.
Pages#
Scope#
Mods have access to the full Unreal Engine editor and the game's C++ class hierarchy. This includes:
- Gameplay content - 14 content types are auto-discovered at startup. Create an AngelScript class extending a base type and it appears in-game with no registration code:
- Blueprints - Blueprint classes can extend any game type (
UTrait,UBuilding,AFaction,APopulationCentre, etc.) - UI - Widget layouts in the UMG editor, bound to AngelScript logic via
UPROPERTY(BindWidget) - Maps - New maps or modifications to existing ones
- Assets - Textures, meshes, materials, sounds, and other asset types via the content browser
- Data - Icons, glossary entries, resources, loading tips, event images, and other data through DataTable merging
Getting Started#
- Set up the editor - build UE4 from source with AngelScript, extract game content, install the mod SDK
- Open the Mod Tools tab and create a new mod
- Use content wizards to scaffold AngelScript classes, or create Blueprints and assets directly
- Test with Play In Editor
- Package your mod for distribution
For a walkthrough of writing AngelScript gameplay code, see Getting Started.
Example Mod#
Mods/ExampleMod/ (included with the mod SDK) contains a working trait, building, diplomacy interaction, and scripted event.
Architecture#
Two C++ subsystems power the mod system:
UModLoadingSubsystemMods/, mounts PAK files, registers script directories with AngelScriptUGameDataSubsystemGetDerivedClasses(), merges DataTables from content directoriesBoth run at startup before gameplay begins.