Guide: How to package and install mods with the current editor

After stumbling around the current editor until I figured out how to get my mod working with the base game, I thought a guide might be a helpful resources for others who aren't very familiar with Unreal's editor. The target audience of this guide is those who, like me, are new to making and packaging mods using Unreal Engine.

Please note that I am in no way an expert with Unreal Engine. There may be faster or more efficient ways to prepare mods for shipping. If so, please let me know and I'll update the guide! Another side note is that this way of preparing mod files for installation requires that you have Unreal Engine installed. With that, let's dive right in.

​

TLDR

  • Cook your modded files
  • Pack the cooked files into a .pak file named MW5Mercs-WindowsNoEditorX.pak (substitute a number for X)
  • Move the .pak file into the Paks folder in your MW5Mercs installation directory

​

Cooking your files

So you've had a chance to play around in the editor and you've changed some files around to improve your gameplay experience. Congratulations! The first thing you will need to do is cook the files in Unreal Editor so that the game will recognize them. To do this, select Project Launcher from the Window tab. This will bring up the following window:

​

https://preview.redd.it/stqoymgd0rb41.png?width=1014&format=png&auto=webp&s=5c66d4d3b5c53e59519fb6c8e600f71264c51d4e

You want to focus on the WindowsNoEditor option. The default value for me in the Data Build section is On the fly. I change this to By the book or else my files won't cook.

​

https://preview.redd.it/aw4kttji1rb41.png?width=999&format=png&auto=webp&s=f5b24f221829ad056fd2fff9b3cb4b9451d73323

After this has been changed click Launch and prepare to wait! Cooking the files takes my computer about an hour because it cooks all of them, not just the modified ones. If you know how to limit the number of files you're cooking, let me know!

*Edit* It turns out you can cancel the cook after the files you are interested in have finished cooking. It only takes my computer a couple of minutes to cook the .uasset weapon files, for example. I can cancel after that and move forward with packing.

You may run into an error at the end, but that's okay. To check that the mod files are ready for packaging, navigate to MW5Mercs folder in your Mechwarrior5Editor install. There should be a folder called Saved. Click on that, then click on the Cooked folder. There should be a folder called WindowsNoEditor that contains two folders, Engine and MW5Mercs. These are the folders you'll need to reference when packing your mod. The address to find these files will probably look something like this:

C:\Program Files\Epic Games\MechWarrior5Editor\MW5Mercs\Saved\Cooked\WindowsNoEditor

If your files are inside one of these two folders, congratulations! You're ready to pack your mod.

​

Preparing the packing instruction file

I use the command prompt to pack my files. There may be other ways, but I'm unaware of them. The first thing I do is create a .txt file detailing which files the computer should pack and what access permissions those packed files will have.

To do this, create a text document. Each line will need two pieces of information, separated by a space. The first piece of information is the location of the files you are going to pack. For example, if I had made changes to PPCs I would need to find the address of the cooked files and enter that as my first piece of information. On my computer that would be:

"C:\Program Files\Epic Games\MechWarrior5Editor\MW5Mercs\Saved\Cooked\WindowsNoEditor\MW5Mercs\Content\Objects\Weapons\PPC\*"

The asterisk tells the packing utility to pack every object within the specified folder. If you just want to pack specific files, you can replace the asterisk with the exact filename and create a separate line for each file you want to pack.

Enter a space after the packing address and enter the following:

"../../../MW5Mercs\..."

Replace the ... with the address to the file folder where the original packed files are located within the MW5Mercs directory (or Engine directory, if you've changed files there). With the PPC example above, I would enter the following:

"../../../MW5Mercs\Content\Objects\Weapons\PPC\"

This will let your new packed files access and override the original game files once your final .pak file is placed in the Paks folder in the MW5 install directory. In the PPC mod example, the first line of text in my .txt file would be:

"C:\Program Files\Epic Games\MechWarrior5Editor\MW5Mercs\Saved\Cooked\WindowsNoEditor\MW5Mercs\Content\Objects\Weapons\PPC\*" "../../../MW5Mercs\Content\Objects\Weapons\PPC\"

Add additional lines for additional content you want included in your packed mod and when you're done and your .txt file has been saved, it's time to pack your files!

​

Packing your files

To pack them with the command prompt, open it as an administrator. Now you'll need to find UnrealPak.exe, which should be located within the Unreal Engine install directory. Mine is here:

​

https://preview.redd.it/c42bdtbr3rb41.png?width=1604&format=png&auto=webp&s=a2835077aab1fbf4271d8040d2f845b7a93d1121

The address will probably look something like:

C:\Program Files\Epic Games\UE_4.23\Engine\Binaries\Win64

You may be able to drag this file directly into command prompt, or you may have to enter the address manually, as so (the quotation marks are necessary): "C:\Program Files\Epic Games\UE_4.23\Engine\Binaries\Win64\UnrealPak.exe"

Next you'll enter the location and filename for your new packed file. The filename will need to be the following or the packed mod will not work: MW5Mercs-WindowsNoEditorX.pak (substitute a number for X).

Enter a space, then enter -Create=.txt file location. This will point the packing utility to your instruction file, which will tell it which files to pack and what permissions to give them. To pack the PPC mod I have been using as an example, I would use the following text:

C:\Users\Agram\Documents\Backups\MW5\Mods\TextFiles\PPCdataToPack.txt

So to provide a complete example, if I were packing the PPC mod mentioned earlier I would enter the following text in the command prompt, then click enter:

"C:\Program Files\Epic Games\UE_4.23\Engine\Binaries\Win64\UnrealPak.exe" C:\Users\Agram\Documents\Backups\MW5\Mods\MW5Mercs-WindowsNoEditor1.pak -Create=C:\Users\Agram\Documents\Backups\MW5\Mods\TextFiles\PPCdataToPack.txt

A quick note on quotation marks and the command prompt: if your file address or path includes folders or filenames with spaces, you will need to surround the entire address in quotation marks. If it doesn't, they aren't necessary.

​

Installing your mod

Now for the easy part. To install the mod, simply copy the new .pak file you created to the Paks folder in your MW5Mercs installation directory. Mine is located here:

C:\Program Files\Epic Games\MW5Mercs\MW5Mercs\Content\Paks

A quick note - a .pak file with a higher number will override a .pak file with a lower number. If MW5Mercs-WindowsNoEditor1.pak and MW5Mercs-WindowsNoEditor2.pak both make changes to identical files, the game will ignore the changes in MW5Mercs-WindowsNoEditor1.pak.

And that's it! If there are ways this guide can be improved, please let me know. As stated at the beginning, I am no expert with modding or Unreal Engine. I'm hoping PGI releases tools soon that make this whole process easier.

​

Additional Help

u/Night_Thastus posted a video guide in the comments that walks you through the steps of making .pak files for MW5 Mercs. Linking it here: https://www.youtube.com/watch?v=MKjEfqXwH3k

Posted Jan 19, 2020, 5:18 PM UTC · edited

3114
Takuetsu•

Thanks for this!

I actually tried cooking my files before but ran out of disk space and so I tried something else, to no avail.

I am cooking now and will let you know how the rest goes (which I'm already familiar with.)

Just to be clear you are doing the cooking and editing with the MW5Editor correct? Not some other version of UE4?

1
kirby3021OP•

You are welcome! I am using the MW5Editor, not my other version of UE4.

1
Night_Thastus•

Also a video on the topic here that may help people.

1
kirby3021OP•

Thanks, added this to the OP!

1
reanor•

Thanks for this, will try it tonight!

1
reanor•

I get this error and the process stops:

ERROR: Unhandled exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'S:\Epic Games\MechWarrior5Editor\Engine\Source'.

1
kirby3021OP•

Interesting. I have never seen an error like this. I don't know how this mod could cause this, as there are no Engine files or references included in the .pak file. I will do some digging to see what I can find.

Which version of the mod are you using?

1
reanor•

I only get this error if I use project launcher to cook files. In your video, you use the right option, which is under file - cook game for windows. That one even though errors out in the end, cooks the files I need perfectly fine. Have you actually been able to use 'project launcher' successfully? Cause in your video it is one thing, and here, it's another. Maybe it's my Editor version? I think I am using the latest one right now.

1
kirby3021OP•

I got totally mixed up with which thread I was replying to, my bad. I always get an error when letting the files cook and have never been able to launch through the project launcher. The video was posted in another one of the comments, it's not mine.

Even though I get the error, the files still cook. Hoping that the tools PGI eventually releases will let us do this whole process faster.

2
1MileTouch•

So for a partial cook, I just watch for the files I want to show up and then cancel?

1
kirby3021OP•

That's what I do, then after I do it once I know about how long it will take in the future.

2
TurboJLo•

Thank you for this. Works great.

1
shadow651•

Thanks for the directions! Wish we could figure out a way to cook only a couple of files though, but being able to package anything at this point is at least a start.

FYI for others,

  • the commands for the UnrealPak.exe only works in CMD, does not work in PowerShell
  • Your Pak files don't need to be named MW5Mercs-WindowsNoEditor1 but they do have to be alphabetically after that, so MW5Mercs-AwsomeMod won't work, but MW5Mercs-ZAwsomeMod will

​

P.S. Why does Unreal makes it sound like we're making drugs?Guy in dark alley,*pst, want to know how to cook just a single file?

1
Deathshade8•

Thanks for taking the time to do this.

1