Jump to content

Export changes to pak file


ckatlantix

Recommended Posts

Hi MW5 modders,

 

has anyone figured out how to export from the editor to the base game (in a similar way as the spawn mod works using an additional pak file to copy into the game directory)?

Is this possible at the moment or do we need PGI to finish their mod support?

 

Thanks.

Link to comment
Share on other sites

Hi all,

not sure whether this has been documented already:
I managed to get a modified uasset into the shipped game using an incremental pak file (or whatever thy are called). In my case it was a modified blueprint.
You may need to cook the uasset (which as far as I understand it will create a production and not a debug build file.) I stopped the cook process after my file of interest was done in P:\Epic\MechWarrior5Editor\MW5Mercs\Saved\Cooked\WindowsNoEditor\MW5Mercs\Content\UI\Mech.

Then I used unrealpak and this method (last post) https://forums.unrealengine.com/development-discussion/c-gameplay-programming/1645979-how-to-use-unreakpak-to-pak-assets-myself-and-set-the-mount-point-to-relative-path?p=1648259#post1648259 to create the pak with the command "UnrealPak.exe PakName.pak -create=config.txt"

where config.txt contains e.g. "P:\Epic\Repack\MW5Mercs\Content\UI\Mech\HUD.uasset" "../../../MW5Mercs/Content/UI/Mech/"

Pasting it as P:\Epic\MW5Mercs\MW5Mercs\Content\Paks\MW5Mercs-WindowsNoEditor2.pak (b/c I have the better spawn mod) made it being loaded by the game.
You can use "UnrealPak.exe yourmod.pak -list" to verify the mount point.
Compare with better spawn mod to verify its correct (i.e. "Mount point ../../../MW5Mercs/Content/...") and make sure the last folder where your file is located is also present (may need a trailing "/" in the path argument inside the config.txt file that goes into the "UnrealPak.exe PakName.pak -create=config.txt").

Keep in mind that there's still no system to prevent conflicts, so the official mod support is still needed, because you will override previous mods that modify the same file and may cause conflicts and crashes.

In my case it was worth the effort to get better performance than inside the editor.
Happy mod testing.

Edited by ckatlantix
Link to comment
Share on other sites

More general procedure:

 

1. You need to know your modified assets,

 

2. Maybe need to cook them and find them in the cook directory of the editor

i.e.

\MechWarrior5Editor\MW5Mercs\Saved\Cooked\WindowsNoEditor\MW5Mercs\Content\...

You can abort cooking after your asset is updated.

 

3. Setup a repack dir that contains your changed files and mimics the content structure of the game (this folderstructure helps a lot with the next step)

 

4. create a config.txt for UnrealPak.exe that maps the files to collect and pack to the pak folder structure (the mount point).

Thanks to step 3 this is just absolue path in repak structure mapped to relative pak mount point in a 1 to 1 fashion, separated by a space, both paths contained by including ", using one line for every asset you want to add to the pak:

i.e.

"Absolute path in repak dir structure" "mountpoint in pak"

 

e.g. a line in config.txt may be:

"P:\Epic\Repack\MW5Mercs\Content\UI\Mech\HUD.uasset" "../../../MW5Mercs/Content/UI/Mech/"

 

The "../../../MW5Mercs/Content/" part should be the same for every line/asset and you should only append your relative asset path with a trailing /.

 

5. Run Unrealpak with your config.txt as argument

"UnrealPak.exe PakName.pak -create=config.txt"

without the "

you may need to add relative paths and " to your argument filenames depending on where UnrealPak and your files are residing.

 

6. Verify pak using

"UnrealPak.exe yourmod.pak -list"

Without "

Should return effectively something like "Mount point ../../../MW5Mercs/Content/..." for every item (maybe split into base mount point and per file relative mount point in the output if you pak more than one file), where the mount point starting with ../../../ and ending with (and including) the last folder is important.

 

7. Rename pak and paste it along original pak file of the shipped game (you should consider following the naming convention from the discord channel, i.e. MW5Mercs-Z###-MODNAME.pak)

e.g.

P:\Epic\MW5Mercs\MW5Mercs\Content\Paks\MW5Mercs-Z001-MYMODNAME.pak

Where the 1 at the end might need to be a 2, 3 etc. depending on your already installed mods so you don't overwrite their paks. Ordering should matter, but since merging game content is not available atm, two mods touching the same file is going to cause trouble.

 

8. Test and have fun.

Edited by ckatlantix
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...