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#
Link Your GitHub Account
- Go to unrealengine.com and sign in with your Epic Games account
- Go to your account settings and link your GitHub account
- Accept the invitation to the
EpicGamesGitHub 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:
git clone -b 4.27 https://github.com/EpicGames/UnrealEngine.git UE4-AngelScriptThis 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
cd UE4-AngelScript
git clone https://github.com/Hazelight/UnrealEngine-Angelscript.git Engine/Plugins/AngelscriptApply Engine Patches
The AngelScript plugin requires small modifications to the engine source. The plugin repository includes patch files:
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:
cd UE4-AngelScript
./Setup.bat
./GenerateProjectFiles.batSetup.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:
- Set the solution configuration to Development Editor
- Set the solution platform to Win64
- 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.exeVerify the Build
Launch the editor without a project to verify it starts:
./Engine/Binaries/Win64/UE4Editor.exeYou 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:
The SDK includes:
Strategy.dll + Strategy.libSource/Strategy/Public/Script/Plugins/FOAEModRuntime/Plugins/FOAEModTools/Mods/ExampleMod/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:
# 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:
"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:
"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, theScript/andContent/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:
- Prompts you for the key properties (name, description, stats, category, etc.)
- Generates a correctly structured AngelScript
.asfile in your mod'sScript/directory - Creates icon DataTable entries where needed
- 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:
- Navigate to your mod's
Content/directory (e.g.,Content/Mods/YourMod/) - Right-click and select Blueprint Class
- Choose a parent class (e.g.,
Trait,Building,UserWidget) - 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:
- Create a Widget Blueprint in your mod's
Content/directory - Design the layout in the UMG editor - add buttons, text blocks, images, lists
- Name each widget you want to access from code (e.g.,
TitleText,AcceptButton) - Create a matching AngelScript class with
UPROPERTY(BindWidget)properties referencing those names - The AngelScript class handles logic; the Blueprint handles layout
This is the same pattern the base game uses for all its UI.
Troubleshooting#
Strategy.dll and Strategy.lib are in the correct location and the module is referenced in .uprojectContent/ directoryScript/ directory is present and that your mod scripts have no syntax errorsUnrealPak.exe exists in your engine's Binaries/Win64/ directoryNext Steps#
- Getting Started - AngelScript fundamentals and a full trait tutorial
- Content Types - Property and method reference for all 14 content types
- Assets & Packaging - DataTables, icons, localisation, and distribution