Editor Setup

To mod Fall of an Empire you need the Unreal Engine editor built from source with AngelScript support. This gives you full access to the engine: Blueprints, UMG widgets, levels, materials, the content browser, and all of the game's C++ classes.

This guide walks through the entire setup process.

What You Get#

Once set up, you can:

  • Write AngelScript gameplay logic with hot-reload
  • Create Blueprints extending any game class (UTrait, UBuilding, AFaction, etc.)
  • Design UI layouts in the UMG widget editor
  • Build new maps and levels
  • Import textures, meshes, materials, and sounds
  • Use the Mod Tools plugin for guided content creation and PAK packaging
  • Reference and inspect all base game content

Prerequisites#

  • Epic Games account linked to GitHub (for UE4 source access)
  • Visual Studio 2019 (Community edition or higher) with the following workloads:
    • Desktop development with C++
    • Game development with C++ (optional but recommended)
    • .NET desktop development (for UnrealBuildTool)
  • At least 200 GB of free disk space (source + build + content)
  • 16 GB RAM minimum, 32 GB recommended
  • Fall of an Empire installed (to extract content from)

Step 1: Get the UE4 Source#

  1. Go to unrealengine.com and sign in with your Epic Games account
  2. Go to your account settings and link your GitHub account
  3. Accept the invitation to the EpicGames GitHub organisation

This gives you access to the Unreal Engine source repositories.

Clone UE4 4.27

Clone the 4.27 branch of the Unreal Engine repository:

terminal
git clone -b 4.27 https://github.com/EpicGames/UnrealEngine.git UE4-AngelScript

This downloads approximately 10 GB. The branch name 4.27 corresponds to UE 4.27.x, which is the engine version Fall of an Empire uses.

Step 2: Add AngelScript#

The AngelScript plugin integrates a scripting layer into the engine. All gameplay logic in Fall of an Empire is written in AngelScript, so this is essential.

Clone the AngelScript Plugin

terminal
cd UE4-AngelScript
git clone https://github.com/Hazelight/UnrealEngine-Angelscript.git Engine/Plugins/Angelscript

Apply Engine Patches

The AngelScript plugin requires small modifications to the engine source. The plugin repository includes patch files:

terminal
cd Engine/Plugins/Angelscript
# Apply the engine patches (check the plugin's README for exact instructions)

Follow the instructions in the AngelScript plugin's README.md for the exact patch process. The patches modify a handful of engine files to add script compilation hooks and Blueprint integration points.

Step 3: Generate Project Files#

Before compiling, generate the Visual Studio solution:

terminal
cd UE4-AngelScript
./Setup.bat
./GenerateProjectFiles.bat

Setup.bat downloads engine dependencies (binary content, third-party libraries). This can take a while on the first run.

GenerateProjectFiles.bat creates UE4.sln in the root directory.

Step 4: Compile the Editor#

Open UE4.sln in Visual Studio 2019 and build:

  1. Set the solution configuration to Development Editor
  2. Set the solution platform to Win64
  3. Right-click the UE4 project in the Solution Explorer and select Build

The first build takes 30-60 minutes depending on your hardware. Subsequent builds are incremental and much faster.

Once complete, the editor binary is at:

UE4-AngelScript/Engine/Binaries/Win64/UE4Editor.exe

Verify the Build

Launch the editor without a project to verify it starts:

terminal
./Engine/Binaries/Win64/UE4Editor.exe

You should see the Unreal Project Browser. Close it for now.

Step 5: Set Up the Game Project#

Install the Mod SDK

The mod SDK is distributed separately and contains everything you need to compile against the game's code. Extract it to create your modding project:

File Structure
FallOfAnEmpire-Modding
FallOfAnEmpire.uproject
Source
Strategy
Public# Game headers
Mods
ExampleMod# Reference mod
YourMod# Your mod goes here
Script# Base game AngelScript
Content# Extracted game content (Step 6)
Config# Game configuration
Plugins
FOAEModRuntime# Mod runtime plugin
FOAEModTools# Mod tools plugin

The SDK includes:

ComponentPurposeStrategy.dll + Strategy.libCompiled game module - gives you access to all game C++ classesSource/Strategy/Public/Game headers (class definitions, types, enums)Script/Base game AngelScript source (all gameplay logic)Plugins/FOAEModRuntime/Runtime mod loading, PAK mounting, AngelScript registrationPlugins/FOAEModTools/Editor tools: mod workspace, content wizards, PAK packagingMods/ExampleMod/Reference mod with working trait, building, event, and interaction

Associate with Your Engine Build

Open FallOfAnEmpire.uproject and set the EngineAssociation to point to your compiled engine. The simplest way is to right-click the .uproject file in Windows Explorer and select Switch Unreal Engine version, then choose your build.

Alternatively, set the association manually in the .uproject file or through a registry entry pointing to your UE4-AngelScript directory.

Step 6: Extract Game Content#

The game ships its assets in PAK files. Extract them so you can reference base game Blueprints, textures, maps, and other assets in the editor.

Locate the PAK Files

The game's PAK files are in the installation directory:

[GameInstallDir]/FallOfAnEmpire/Content/Paks/

The main file is typically named FallOfAnEmpire-WindowsNoEditor.pak.

Extract with UnrealPak

Use the UnrealPak tool from your compiled engine:

terminal
# List contents (optional, to see what is inside)
"UE4-AngelScript/Engine/Binaries/Win64/UnrealPak.exe" "[path-to-pak-file]" -List

# Extract everything
"UE4-AngelScript/Engine/Binaries/Win64/UnrealPak.exe" "[path-to-pak-file]" -Extract "[output-directory]"

For example:

terminal
"C:/UE4-AngelScript/Engine/Binaries/Win64/UnrealPak.exe" "C:/Program Files/Steam/steamapps/common/FallOfAnEmpire/FallOfAnEmpire/Content/Paks/FallOfAnEmpire-WindowsNoEditor.pak" -Extract "C:/FallOfAnEmpire-Modding/Content"

Place the extracted content in your project's Content/ directory so the editor can load it. Extraction can take several minutes and requires significant disk space.

You only need to re-extract when the base game updates.

Step 7: Open the Project#

Launch the editor with your project:

terminal
"UE4-AngelScript/Engine/Binaries/Win64/UE4Editor.exe" "C:/FallOfAnEmpire-Modding/FallOfAnEmpire.uproject"

The first launch compiles shaders and builds the derived data cache. This can take 15-30 minutes. Subsequent launches are fast.

Using the Mod Tools#

The Mod Tools tab is available from the editor's Window menu. It is the central hub for mod development.

Mod Workspace

  • Create New Mod - generates mod.json, the Script/ and Content/ directory structure, and sets the new mod as active
  • Open Existing Mod - switch between mods in your Mods/ directory
  • Mod Settings - edit mod name, version, author, description, and load order through a panel rather than hand-editing JSON
  • Open Folder - jump to the mod's directory in your file manager

Content Wizards

The Mod Tools tab includes buttons for all 14 moddable content types. Each wizard:

  1. Prompts you for the key properties (name, description, stats, category, etc.)
  2. Generates a correctly structured AngelScript .as file in your mod's Script/ directory
  3. Creates icon DataTable entries where needed
  4. Opens the generated file in your text editor

Available wizards: Trait, Building, Army Unit, Battle Action, Culture, Religion, Disease, Diplomacy Interaction, Spy Interaction, Person Interaction, Power Bloc Interaction, Policy, Edict, Scripted Event.

The generated files are starting points. Edit them to add your own logic, conditions, and effects.

Packaging

The Package Mod button cooks your mod's content, creates a PAK file, and copies scripts into a distributable folder ready to share.

Creating Blueprints#

In the Content Browser:

  1. Navigate to your mod's Content/ directory (e.g., Content/Mods/YourMod/)
  2. Right-click and select Blueprint Class
  3. Choose a parent class (e.g., Trait, Building, UserWidget)
  4. Name and configure it

Blueprint-created content is auto-discovered by UGameDataSubsystem the same way AngelScript classes are. No registration code needed.

Widget Blueprints

To create custom UI:

  1. Create a Widget Blueprint in your mod's Content/ directory
  2. Design the layout in the UMG editor - add buttons, text blocks, images, lists
  3. Name each widget you want to access from code (e.g., TitleText, AcceptButton)
  4. Create a matching AngelScript class with UPROPERTY(BindWidget) properties referencing those names
  5. The AngelScript class handles logic; the Blueprint handles layout

This is the same pattern the base game uses for all its UI.

Troubleshooting#

ProblemSolutionEditor crashes on launchEnsure you built the correct engine branch (4.27) with AngelScript patches appliedMissing classes in Blueprint pickerVerify Strategy.dll and Strategy.lib are in the correct location and the module is referenced in .uprojectContent appears as pink/missingRe-extract PAK files; ensure extracted content is in the project's Content/ directoryShader compilation takes foreverNormal on first launch. Subsequent launches use the cached shaders.AngelScript compilation errorsCheck that the base game's Script/ directory is present and that your mod scripts have no syntax errorsPackage Mod failsEnsure UnrealPak.exe exists in your engine's Binaries/Win64/ directory

Next Steps#