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#

PageDescriptionEditor SetupBuild the UE4 editor from source, extract game content, install the Mod Tools pluginGetting StartedCreate your first mod, learn AngelScript basics, build a trait from scratchContent TypesReference for traits, buildings, units, cultures, religions, diseases, and battle actionsInteractionsDiplomacy, espionage, person, and power bloc interactions, plus policies and edictsEventsScripted event system: context slots, effects, options, and event chainsAssets & PackagingDataTables, icons, localisation, PAK packaging, debugging, and distribution

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:
CategoryContent TypesCharactersTraits, DiseasesSettlementsBuildingsMilitaryArmy Units, Battle ActionsWorldCultures, ReligionsActionsDiplomacy Interactions, Spy Interactions, Person Interactions, Power Bloc Interactions, Policies, EdictsNarrativeScripted Events
  • 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#

  1. Set up the editor - build UE4 from source with AngelScript, extract game content, install the mod SDK
  2. Open the Mod Tools tab and create a new mod
  3. Use content wizards to scaffold AngelScript classes, or create Blueprints and assets directly
  4. Test with Play In Editor
  5. 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:

SubsystemRoleUModLoadingSubsystemDiscovers mods in Mods/, mounts PAK files, registers script directories with AngelScriptUGameDataSubsystemAuto-discovers gameplay classes via GetDerivedClasses(), merges DataTables from content directories

Both run at startup before gameplay begins.