Download these 2 files :
Place them in the same folder. The location doesn't matter.
Rename those files by your map name.
In Mapname.bat (open with right click -> modify):
Replace D:\UE_4.20 with your UE4 installation folder.
In this example C:\Paks\ is where i decided my .pak file will be generated. Select your own location, just make sure the folder exists.
Replace the “Mapname” occurrences in this file with your own map name.
In Mapname.txt :
The first parameter is where your cooked level is. In this example, C:/Mapname/. This is the path that UE will use to know what files it has to place in the .pak. Make sure it points to the folder containing your cooked level and your eventual additionnal assets folder . End your path with *.* so that it will package all the files in this folder.
If your path contain spaces, wrap it in quotes : "C:/Map name/*.*"
The second parameter is meant to define where your map will be mounted ("extracted") when it will be downloaded by players/servers. In our case, it is in the /Maps folder of the Mordhau installation.
Simply replace Mapname by your map name folder.
If you deviate from the format that is given as an example here, it won't work. Do not remove *.*, nor the ../../../, let one space between the 2 paths, and use quotes (") if the path has spaces.
Run the .bat
Your .pak file has been generated in the location you specified in the .bat :
If running the .bat doesn't create a .pak file, or if the .pak file is empty, it means that you didn't format the .bat or the .txt correctly. Take a look at the example files in this guide and see what differs from yours.
To test your file :
Remove your map from the Maps/ folder of Mordhau : to test properly, your map shouldn’t be already here.
Launch Mordhau, open the console and type
MountPak <Path to your pak>
So in our example :
Then type Changelevel yourlevelname
Your level should load. Make sure that everything is in order : Assets, textures, blueprints that you eventually used, spawns, etc.