UnrealPak mount point and file path help - UE4.27

Okay so there is no real way of me keeping this short because I do not know where the issue truly lies and what I’m doing wrong, so I’m just going to try and shorten how I got here and what issues I’m facing and hopefully that will make it so that people understand the help I need.

I’m trying to mod a game (for my own purposes, not to share, cheat or redistribute the original game files, nothing like that, I simply want this for myself) that uses .pak files to store their files. The path to the .pak’s is %GAMEDIR%/SoD2/Content/Paks. They have several .pak’s in this location but I’m only interested in 4 files that are located in pakchunk0-WindowsNoEditor.pak .

I’ve used UModel (UE Viewer) to find the specific files that I need together with the -list and -extract command for UnrealPak.exe. I’ve exported the .uasset files that I want to modify using UModel (into .tga files), edited them in Photoshop to my liking, imported them into a blank Game project in UE4.27 (making sure that the Content Browser has the same folder structure as the original game; 00_RoD/07_UI/Texture/02_Battle/Scope < this is where I imported the modified .tga files). Afterwards I closed the project and went to the project directory to pick up the two files.

I could only find 2 of the files that I needed, the .uasset files, in UModel, so the other 2 I had to find through using the -list command on the pakchunk0-WindowsNoEditor.pak (outputting it into a file-list.txt file) and then using -extract to extract the files to an output and finally taking the two .uexp files that I couldn’t find through UModel and copy pasting them next to the exported .uassets. Now all 4 files are located in the same place (I decided to make a new folder called “SoD Mods” and place them in the same folder structure as the original game and Content Browser of my blank project: 00_RoD/07_UI/Texture/02_Battle/Scope .

With these files, I now wanted to PAK these into a .pak file that would then be places next to the original .pak files to overwrite the vanilla, in this case, scope overlay texture. So I used the command & "F:\Unreal Engine\UE_4.27\Engine\Binaries\Win64\UnrealPak.exe" "F:\SoD Mods\zzz_LQ_CustomSniperScope.pak" -Create="F:\SoD Mods\00_RoD" -Compressed in order to make a compressed .pak file with my 4 new files. I then used -list on that .pak and saw that the “Mount Point” was pointing to where the .pak was created, and not to ../../../ which the original .pak’s point to. So instead, I added -MountPoint="../../../" to the command before the -Compressed which did not work. That is issue number 1.

The 2nd issue that I’m facing is that when viewing the original files by using -list on the original .pak file, the files have an output that reads: LogPakFile: Display: "SoD2/Content/00_RoD/07_UI/Texture/02_Battle/Scope/SM_B10_Scope.uasset" offset: 3877937152, size: 773 bytes, sha1: FD44EE0F00FCB25D3F81A345ABA56D0D642C4FC4, compression: None. This was not the case for my files, as the output log using -list read: LogPakFile: Display: "SM_B10_Scope.uasset" offset: 0, size: 55611 bytes, sha1: CCC21164F6CF5C21525548111A7ECDEF1EC19053, compression: None. which is obviously different. I’ve got no idea how to make it so that the files themselves have the correct path behind them (important to note that all of the 4 files should have the same file path behind them, SoD2/Content/00_RoD/07_UI/Texture/02_Battle/Scope/, as the original files do).

I do want to note that I made a FileList.txt file to try and change the mount point to no avail, the command lines I used look like this for all files (only showing 1 as an example): "F:/SteamLibrary/steamapps/common/SoD_SH/SoD2/Content/Game/00_RoD/07_UI/Texture/02_Battle/Scope/SM_B10_Scope.uasset" "../../../00_RoD/07_UI/Texture/02_Battle/Scope/SM_B10_Scope.uasset" . This changed the mount path to LogPakFile: Display: Mount point ../../../00_RoD/07_UI/Texture/02_Battle/Scope/ instead of the original LogPakFile: Display: Mount point ../../../ so it didn’t end up helping my case.

Again, sorry for the long post, I’m just very confused on what I’m doing wrong and what I should be doing to fix it so instead of writing a short post that confuses people, I’d rather just write a long post that hopefully makes whoever actually reads the whole thing understand where my issue lies.

Additional note: I’ve got no idea what category this would fit in, I’ve looked over them all and this/asset creation is the closest thing I can (which isn’t exactly about the issues I’m facing) so if this is in the incorrect place, please just move it to the correct place and don’t just delete it, that would help me out greatly!

I’ve managed to fix my issues by just thinking really hard about them x)

I was able to make the mount point into ../../../ (aka “relative path”) by adding a file to the .pak that had a completely different file path. This way, the mount point couldn’t be something specific and had to be relative, exactly how I wanted it to be. It’s also important to note that I added that file in my “FileList.txt” and added the relative path ../../../ to the start of the file path, that way I got no errors and the mount point changed to ../../../.

This also fixed my 2nd issue, which was needing the files to have proper paths behinds them. Since now they needed to display the exact paths to the files, by making the mount point relative, each of the files received the proper path behind their file names using the -list command, fixing the issue!

Another thing that I had no idea about (because this is the first time ever touching Unreal Engine) is that I needed to package the assets in UE4.27 to get the “cooked” versions of the files. If I don’t package them, they are editor-only files and won’t work with the game (giving a Serialization error whenever I launched the game). I had no idea.

Another thing I had no idea about was that when cooking the files, an .uexp file is automatically created. What I did was copy the original .uexp files from the game .pak file and just bunch that together with my modified .uasset files. Obviously, that’s not gonna work but hey, hindsight 20-20.

So now, everything works just fine and I’ve successfully figured out how to mod the game! :slight_smile:

(If you are reading this, thinking “man those are some stupid mistakes!”, this was my first time ever touching Unreal Engine, we all make mistakes in the heat of passion Jimbo)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.