Important
This only guide applies when there are NOT .ucas
or .utoc
files inside Content/Paks
folder. There may be .pak
, .sig
or other files or folders.
To ensure your mod is loaded by the game, it needs to be in a .pak
file.
There are two ways you can pack your mod files into a .pak
file:
- UnrealPak - a commandlet within UE
- repak - a third party commandlet
UnrealPak and repak are fine to use with any UE version. repak is generally faster and has more advanced features like configurable mount points & pak version, but is not required for the majority of users, and overall ease of use is slightly more difficult than the below UnrealPak scripts. But if one doesn't work for you, you at least can try the other.
UnrealPak is present in every UE install, but can be extracted into a standalone program.
You can download the standalone version from here: UnrealPak by FluffyQuack , which also comes with a couple of batch scripts to make calling the program easier for you.
You can also install repak_wrappers, which has an identical user experience to UnrealPak. If you download this, you can follow the "If using UnrealPak" parts of the guide.
If using UnrealPak:
Create a folder that will contain the scripts, raw mod folder and output pak files, similar to this:
(Extract the provided UnrealPak zip file)
If using repak:
Follow the installation and usage instructions in the Extracting cooked with repak guide.
For every mod, regardless of the packing tool, a mod folder with the exact folder structure is required.
Modname_P\GameName\Content\...
Structure
- Replace the modname with your actual mod name.
- Ensure the folder ends with
_P
(important). - Replace GameName with the binary name of your game.
Depending on the mod and which files it overrides, it will have the same folder hierarchy followed by the original game folder hierarchy, which is visible in FModel and UModel.
Examples
A mod folder for a mod that replaces textures in Ghostrunner;
\NewTex_P\Ghostrunner\Content\Visual\Characters\Hero_Swords\Mat\Tex
A mod folder for a mod that replaces a weapon model in Trepang2;
\newPistol_P\CPPFPS\Content\Weapon\Pistol
Once the folder structure is created, copy the necessary files, that needs to be overwritten or added.
If you compiled the project content within UE editor - copy the files you want to be included in the mod.
In order to modify/overwrite the game's files with your custom files, you have to have the same folder structure and the same file names for the files, matching the original file paths/files.
For example
In an example of a texture mod, the following folder stucture is used:
\modname_P\Ghostrunner\Content\Visual\Characters\Hero_Swords\Mat\Tex\
The content of the following folder is:
If using UnrealPak:
Simple, just drag the mod folder onto the UnrealPak-With-compression.bat
to begin packaging the mod folder.
Shortly after, a pak file with the same name will be created.
If using repak:
Simply run the command repak pack <mod directory to pack>
inside the directory containing your mod folder.
If you wish to see the file paths it is packing, use the -v
option.
If you wish to use compression, add the --compression <method>
option. You can see supported compression formats with repak pack -h
. gzip
, zlib
and zstd
formats are recommended. If the game fails to load the pak file, one of the things to try is to pack without compression.
E.g. repak pack -v --compression Gzip Modname_P
- Navigate to the Paks folder of the game.
Usually it's following this pattern:
...\GameName\GameName\Content\Paks
For example, Ghostrunner game:
...\Ghostrunner\Ghostrunner\Content\Paks
- Copy the generated pak file into the game's Paks folder.
- Rename the pak file to suit your mod purpose.
- Make sure the name ends with
_P
(IMPORTANT).
For example:myMod_P.pak