Tutorial  Updated

How to unpack and repack Unreal Engine 4 files

Because i couldn't find any tutorial for this, i made my own package. This tutorial doesn't include how to unpack NSP, XCI or NCA. It's for people who already knows that. Use DBI or emulators romfs browser.

This tutorial is made purposely for mount point ../../../ which is default for Switch games. More info in tutorial.
It may look rough, but it's easy to remember after few attempts.
If something is not working, write post.
English purists should run away. It will not be a plausible text. :D

RequirementsCheck version of packageUnpackPack filesCreating patchExceptionsDecryptionThanksTricks & Tips

  1. What you need to download:
    - Package "UnrealPakSwitchv9.zip" from attachments and unpack it.
    - Notepad++ (or any other text editor with Perl regular expressions)
    - Python 2 or 3
    - Unreal Engine 4.19.2 (for v4 *.pak), Unreal Engine 4.20.3 (for v5 *.pak), Unreal Engine 4.21.2 (for v7 *.pak), Unreal Engine 4.22.3 (for v8 *.pak), Unreal Engine 4.24.3 (for v8.23 *.pak), Unreal Engine 4.25.4 (for v9 *.pak), Unreal Engine 4.26.2 (for v11 *.pak), Unreal Engine 4.27.2 (for v11.27 *.pak). For complete pack you need to download eight of them.

    Additional note If you want to extract PAK, download just newest version (Unreal Engine 4.27.2) since UnrealPak unpacking is backwards compatible (only exclusion is that v11 PAKs are not fully supported by v11.27 unrealPak).
    For packing files usually you can use unrealPak version that matches your PAK version or older, so you can use oldest Unreal Engine 4 (4.19.2) to pak your mods and it should work for 99% of cases.
    Remember that's not a rule since developers can change how PAKs are packed or read individually.
    Tutorial is explaining how to extract and make PAKs "properly", though you can skip some parts of it if you know what you are doing.


    My package lacks UnrealPak.exe which is licensed, but free to use. That's why I don't upload them.
    After download each respected Unreal Engine you can find UnrealPak.exe in:
    1. X:\Program Files\Epic Games\UE_4.19\Engine\Binaries\Win64\unrealpak.exe
    2. X:\Program Files\Epic Games\UE_4.20\Engine\Binaries\Win64\unrealpak.exe
    3. X:\Program Files\Epic Games\UE_4.21\Engine\Binaries\Win64\unrealpak.exe
    4. X:\Program Files\Epic Games\UE_4.22\Engine\Binaries\Win64\unrealpak.exe
    5. X:\Program Files\Epic Games\UE_4.24\Engine\Binaries\Win64\unrealpak.exe
    6. X:\Program Files\Epic Games\UE_4.25\Engine\Binaries\Win64\unrealpak.exe
    7. X:\Program Files\Epic Games\UE_4.26\Engine\Binaries\Win64\unrealpak.exe
    8. X:\Program Files\Epic Games\UE_4.27\Engine\Binaries\Win64\unrealpak.exe


    For third point (UE_4.21) you need to copy with unrealpak.exe also DLLs and other (treat UnrealPak.exe and all files below as one if you will follow Exceptions tab):
    Code:
    UnrealPak-BuildSettings.dll
    UnrealPak-Core.dll
    UnrealPak-Json.dll
    UnrealPak-PakFile.dll
    UnrealPak-PakFileUtilities.dll
    UnrealPak-Projects.dll
    UnrealPak.modules

    For fourth point (UE_4.22) you need additional files:
    Code:
    UnrealPak-BuildSettings.dll
    UnrealPak-Core.dll
    UnrealPak-Json.dll
    UnrealPak-PakFile.dll
    UnrealPak-PakFileUtilities.dll
    UnrealPak-Projects.dll
    UnrealPak.modules
    UnrealPak-RSA.dll

    For fifth point (UE_4.24) and sixth point (UE_4.25) you need additional files:
    Code:
    UnrealPak-BuildSettings.dll
    UnrealPak-Core.dll
    UnrealPak-DerivedDataCache.dll
    UnrealPak-Json.dll
    UnrealPak-PakFile.dll
    UnrealPak-PakFileUtilities.dll
    UnrealPak-Projects.dll
    UnrealPak.modules
    UnrealPak-RSA.dll
    UnrealPak-TraceLog.dll


    For seventh point (UE_4.26) you need additional files:
    Code:
    UnrealPak-BuildSettings.dll
    UnrealPak-Core.dll
    UnrealPak-DerivedDataCache.dll
    UnrealPak-Json.dll
    UnrealPak-PakFile.dll
    UnrealPak-PakFileUtilities.dll
    UnrealPak-Projects.dll
    UnrealPak.modules
    UnrealPak-RSA.dll
    UnrealPak-SSL.dll
    UnrealPak-TraceLog.dll

    For eighth point (UE_4.27) you need additional files:
    Code:
    UnrealPak-Analytics.dll
    UnrealPak-BuildSettings.dll
    UnrealPak-Core.dll
    UnrealPak-CoreUObject.dll
    UnrealPak-DerivedDataCache.dll
    UnrealPak-Json.dll
    UnrealPak-PakFile.dll
    UnrealPak-PakFileUtilities.dll
    UnrealPak-Projects.dll
    UnrealPak.modules
    UnrealPak-RSA.dll
    UnrealPak-SSL.dll
    UnrealPak-TraceLog.dll

    For each one version you need to copy UnrealPak.exe to correct folder of my package:
    1. UnrealPakSwitch\v4\2\3\UnrealPak.exe
    2. UnrealPakSwitch\v5\2\3\UnrealPak.exe
    3. UnrealPakSwitch\v7\2\3\UnrealPak.exe (+ other files)
    4. UnrealPakSwitch\v8\2\3\UnrealPak.exe (+ other files)
    5. UnrealPakSwitch\v8.23\2\3\UnrealPak.exe (+ other files)
    6. UnrealPakSwitch\v9\2\3\UnrealPak.exe (+ other files)
    7. UnrealPakSwitch\v11\2\3\UnrealPak.exe (+ other files)
    7. UnrealPakSwitch\v11.27\2\3\UnrealPak.exe (+ other files)

    You can now uninstall Unreal Engine(s) (except if you need Oodle support - read "Oodle decompression" in "Tricks & Tips" before continuing) - there are no more needed

    WARNING!
    UnrealPak for some paks shows error about not detecting some plugin. In most cases it's not needed, just ignore it and it will continue.
  2. Archives are mostly in romfs/******/Content/Paks as *.pak files
    ****** - project name made by devs. It's devs choice (for example Octopath has "Kingship"), but most games have one folder in romfs

    1. Copy *.pak file you want to check to unpacked UnrealPakSwitch folder.
    2. Drag and drop your file to "1. check.cmd"
    It will show
    Code:
    Version: X
    Where X is a version of your package.
  3. If you know what version you have, then drag and drop your *.pak file to
    Code:
    version 4 - "unpack-v4.cmd"
    version 5 - "unpack-v5.cmd"
    version 7 - "unpack-v7.cmd"
    version 8 - "unpack-v8.cmd"
    version 8.23 - "unpack-v8-23.cmd"
    version 9 - "unpack-v9.cmd"
    version 10 - "unpack-v11-27.cmd" (because 10 is unofficial version, we can use as newest tool as possible for Oodle support)
    version 11 or 11.27 - "unpack-v11.cmd" or "unpack-v11-27.cmd" (this is because UE 4.27 made breaking changes to pak files without changing header struct, which makes it impossible to differentiate between 11 and 11.27 from header alone).

    They create "lista.txt" in UnrealPakSwitch folder which contains info about all files. It will be needed for packing archive.
    Don't press key to continue. First open "lista.txt" and check if there is a line
    Code:
    LogPakFile: Display: Mount point ../../../
    If it's correct, press any key to continue. If it's not (something different after Mount point or lack of it), close window and go to Exceptions tab.

    After some time it will unpack all files in most cases to 2 folders:
    - Engine
    - ****** (yes, the same ****** as from previous tab)

    ****** contains assets. Engine should not be modified unless you know what you are doing.
  4. To pack files we need Engine folder unpacked from one of original PAKs. Usually you can find it it any game PAK that is first in alphanumerical order, usually with name starting at "pakchunk0". UnrealPak reads files from this folder before starting reading file list. Not having this folder with correct files will result in error.
    Remember than UnrealPak always creates Engine folder when used if it doesn't exist, so having this folder is not equal to that you have all necessary files.

    First we need to edit lista.txt with Notepad++
    1. Delete those lines (don't worry if one or more lines are missing)
    Code:
    LogPaths: Warning: No paths for game localization data were specifed in the game configuration.
    LogInit: Warning: No paths for engine localization data were specifed in the engine configuration.
    LogPakFile: Display: Using command line for crypto configuration
    LogPakFile: Display: Added 0 entries to add to pak file.
    LogPakFile: Display: Mount point ../../../

    2. Delete last three lines. It will look something like this (quantity of files, size and seconds may differ):
    Code:
    LogPakFile: Display: 103018 files (1944681023 bytes), (1944681023 filtered bytes).
    LogPakFile: Display: Unreal pak executed in 2.605882 seconds
    Third line is empty (CMS of this forum is deleting it, but you can see it in quote mode), you need to delete those three lines.

    3. Run "Find & Replace" (Ctrl+H), Check "Wrap Around" and "Regular Expression"
    Przechwytywanie.PNG
    4.1. For Find what: paste
    Code:
    LogPakFile: Display: "
    Replace with:
    Code:
    "../../../
    Yes - our mount point with quotation mark at the beginning.
    Click Replace All

    4.2. For Find what: paste
    Code:
    " offset: (.*)$
    Replace with:
    Code:
    "
    Click Replace All

    And save.
    Now we have file ready to use for our packing.

    5. Drag and drop "lista.txt" to the same version that original pack was:
    Code:
    version 4 - "pack-v4.cmd"
    version 5 - "pack-v5.cmd"
    version 7 - "pack-v7.cmd"
    version 8 - "pack-v8.cmd"
    version 8.23 - "pack-v8-23.cmd"
    version 9 - "pack-v9.cmd"
    version 10 - "pack-v9.cmd" (because 10 is unofficial version, we need to step down by one version)
    version 11 - "pack-v11.cmd"
    version 11.27 - "pack-v11-27.cmd"

    It will create "newpak.pak" inside UnrealPakSwitch folder. Rename it to name of original *.pak file.
  5. You can create *.pak file that will be treated as patch and doesn't need files that are the same as in original *.pak files.
    1. You need to done "Pack files" tab from beginning to point 4.2, ignore 5th point.
    2. Now you need to delete from lista.txt every line that contains path to not-edited file and save lista.txt.
    3. Drag and drop "lista.txt" to the same version that original *.pak was:
    Code:
    version 4 - "pack-v4.cmd"
    version 5 - "pack-v5.cmd"
    version 7 - "pack-v7.cmd"
    version 8 - "pack-v8.cmd"
    version 8.23 - "pack-v8-23.cmd"
    version 9 - "pack-v9.cmd"
    version 10 - "pack-v9.cmd" (because 10 is unofficial version, we need to step down by one version)
    version 11 - "pack-v11.cmd"
    version 11.27 - "pack-v11-27.cmd"

    It will create "newpak.pak" inside UnrealPakSwitch folder. Rename it to name of original *.pak file, but add at the end of filename
    Code:
    _p
    For example
    Code:
    Kingship-Switch.pak -> Kingship-Switch_p.pak
    And put it to the same folder as was your original *.pak

    Not every game accepts patches in this form. For now i found only Octopath Traveler that crash when you try to put *.pak file without proper name, it needs to be named like this
    Code:
    Kingship-Switch_1_P.pak
    Kingship-Switch_2_P.pak
    etc.
  6. Now we need to consider 2 cases: either just your mount point is different or your pak is encrypted. If in lista.txt there is anything about encryption, go to "Decryption" tab. Else continue in this tab.

    Sometimes mount point can be different and my package needs to be slightly modified if you don't want to make mess. It most cases it means that this *.pak archive is additional to other *.pak file(s) and is "inside" one of them, so after unpacking it will look different than Engine and ****** folders. You can check it in "lista.txt"
    Default mount point is ../../../ which is "3 folders before", that's why i put UnrealPak.exe to such weird combination of folders.
    Mount point is saved in archive properties and if it's not preserved, game will show error.

    For example:

    If it will be version 4 package with mount point ../../King/Sample/:
    1. You need to move UnrealPak.exe from v4\2\3 to v4\2\ (only two folders back)
    2. Change in pack-v4.cmd
    Code:
    v4\2\3\UnrealPak.exe ..\..\..\newpak.pak
    to
    Code:
    v4\2\UnrealPak.exe ..\..\newpak.pak
    and in unpack-v4.cmd
    Code:
    v4\2\3\UnrealPak.exe
    to
    Code:
    v4\2\UnrealPak.exe

    Unpacked folders needs to be moved to
    Code:
    UnrealPakSwitch\King\Sample

    For 4.4 in Pack files tab you will need to change Replace with: to
    Code:
    ../../King/Sample/

    Now you can go back to previous tabs and continue with knowledge that some files are now different, but steps are the same if you take informations from here and change in previous tabs.
  7. In some cases devs decided to encrypt index of pak file and because of that we can't easily unpack all files. Some multiplatform games are using the same key, so if your game has also PC version, try to find key on google (there are sites specializing in extracting keys from PC exes). But there is a method how to get this decryption key from Switch executable. For more go here:
    https://gbatemp.net/threads/how-to-extract-decryption-key-for-unreal-engine-4-pak-files.574916/

    Don't share any keys here in this topic as it is violation of rules.

    If you have key in 32 bytes hex format like this:
    Code:
    1211345678901234432109876543210036363636363636363636363636363621
    We need to convert it to Base64. There are many sites converting hex to Base64, link to used by me:
    https://base64.guru/converter/encode/hex

    So in my case I got
    Code:
    EhE0VniQEjRDIQmHZUMhADY2NjY2NjY2NjY2NjY2NiE=

    Now go to UnrealPakSwitch folder, edit "crypto.json" and replace
    Code:
    DUMMY
    with our Base64 key and save it. This is how it will look in the end

    Code:
    {
      "$types": {
        "UnrealBuildTool.EncryptionAndSigning+CryptoSettings, UnrealBuildTool, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null": "1",
        "UnrealBuildTool.EncryptionAndSigning+EncryptionKey, UnrealBuildTool, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null": "2"
      },
      "$type": "1",
      "EncryptionKey": {
        "$type": "2",
        "Name": null,
        "Guid": null,
        "Key": "EhE0VniQEjRDIQmHZUMhADY2NjY2NjY2NjY2NjY2NiE="
      },
      "SigningKey": null,
      "bEnablePakSigning": false,
      "bEnablePakIndexEncryption": true,
      "bEnablePakIniEncryption": true,
      "bEnablePakUAssetEncryption": false,
      "bEnablePakFullAssetEncryption": false,
      "bDataCryptoRequired": true,
      "SecondaryEncryptionKeys": []
    }

    Go back to "Unpack" tab but instead of using "unpack-*****.cmd" we need to use "unpack-encrypted-*****.cmd".

  8. Thanks to panzi for u4pak.py (that i slightly modified for this package)
    https://github.com/panzi/u4pak
  9. It will be updated with new informations in time.

    ufontuexp, uasset, ubulklocresOodle compressionZSTD compressionOther tutorials

    1. *.ufont file is ttf font with only changed extension.
      If your file is f.e.
      Code:
      Ariadna.ufont
      change name to
      Code:
      Ariadna.ttf
      You can edit it without worry if you don't change config of this font inside font editor.
    2. If asset contains only uexp and uasset:
      *.uexp is archive for data - in default it's not compressed nor encrypted, but it can be cofigured by devs if they want to modify the way how files are packed.
      *.uasset has informations about files inside uexp - their filenames and references - and how big is *.uexp file:
      Code:
      *size in bytes*-4 converted to Hex Little Endian
      f.e.
      1966078-4 = FAFF1D

      If asset contains uexp, uasset and ubulk:
      *.uasset has informations about files inside uexp - their filenames and references - and how big is uexp
      *.uexp is archive for Editor data, it contains data about ubulk size and thumbnail representing asset
      *.ubulk contains raw asset without any additional info

      If you change size of *.uexp file and you don't change value inside *.uasset, game will not load.
      If you want to serialize informations included in them (f.e. stats of equipment), I recommend John Wick Parse. It extracts supported data to json files:
      https://github.com/SirWaddles/JohnWickParse/releases
      and this tool that seems to have better support for blueprints:
      https://gitlab.com/alex4401/uasset-data-extractor
    3. *.locres - localization files. This is default way of saving strings, but it's not often used by devs. They prefer to create their own format and put to *.uexp file (f.e. Octopath Traveler).
    4. Some games may use oodle compression for pak files (v8+ can generate filelist with info about used compression method, if it's not custom).
      Unreal Engine 4.27 version has added Oodle for free, so you can use that to unpack v11.27 PAKs and older than v11 (because of code conflict UnrealPak 4.27 doesn't support v11 PAKs).
      You must go to:
      Code:
      X:\Program Files\Epic Games\UE_4.27\Engine\Plugins\Compression\

      Copy folder "OodleData" to "v11.27" folder in UnrealPakSwitch folder.
      For unpacking v11 you can use QuickBMS
      https://aluigi.altervista.org/quickbms.htm
      With this script
      https://gbatemp.net/threads/unpacking-sao-fatal-bullet-pak.545478/#post-8748129
      You don't need oodle for packing, default compression (zlib) will be readable by game, so you can follow this tutorial for packing files.
    5. Some games may use zstd compression for pak files (v8 can generate filelist with info about used compression method, if it's not custom).
      Unrealpak is then not usable without compiling zstd plugin by yourself. But for unpacking you can use QuickBMS
      https://aluigi.altervista.org/quickbms.htm
      With this script
      https://gbatemp.net/threads/how-to-...al-engine-4-files.531784/page-10#post-9380618
      You don't need zstd for packing, default compression (zlib) will be readable by game, so you can follow this tutorial for packing files.
    6. How to swap audio in Unreal Engine 4 games
      https://gbatemp.net/threads/how-to-swap-audio-in-unreal-engine-4-games.535516/

      Tool for extracting and making textures compatible with Switch
      https://gbatemp.net/threads/noesis-mod-tiling-texture-for-ue4.535571/
 

Attachments

  • UnrealPakSwitchv10.zip
    21.2 KB · Views: 64
Last edited by masagrator,

khk2423

New Member
Newbie
Joined
Sep 30, 2021
Messages
2
Trophies
0
Age
36
XP
34
Country
Korea, South
I can't open the tutorial pages.
In the repack section, can you tell me the instructions that organize the front and back of the list of 'lista.txt'?
The part where change the front part to "../../../ and the part where erase the back part and replace it with "
The game has been patched, so I have to unpack and repack, but I can't access it.
 

NikkMann

Member
Newcomer
Joined
Aug 31, 2021
Messages
16
Trophies
0
Age
29
XP
105
Country
United States
I have re-made your entire tutorial into Word and PDF files so people can see it easily. I also fixed the grammar mistakes, should help people read it easier :)
 

Attachments

  • UnrealPak Instructions.zip
    264 KB · Views: 333
  • UnrealPak Instructions.pdf
    245.8 KB · Views: 234

masagrator

The patches guy
OP
Developer
Joined
Oct 14, 2018
Messages
6,243
Trophies
3
XP
11,972
Country
Poland
Added support for PAK from Unreal Engine 4.27

Some big brain from Epic made breaking changes to PAKs without changing header struct at all, so it's not possible to detect if it's v11 from 4.26 or v11 from 4.27 (even unrealpak from v11 4.26 can't detect that it's not compatible with it and it's aborting on some point).

v11 from 4.27 I have named 11.27
 
Last edited by masagrator,

masagrator

The patches guy
OP
Developer
Joined
Oct 14, 2018
Messages
6,243
Trophies
3
XP
11,972
Country
Poland
Unreal Engine 4.27 added publicly Oodle. Updated package with tutorial how to add support for Oodle to UnrealPak 11.27

Unpacked pakchunk0-Switch.pak from Tony Hawk 1+2 which is v8.23 using Oodle and encryption without issues.

Code:
C:\Users\Admin\Documents\Switch\UnrealPakSwitch2>v11.27\2\3\UnrealPak.exe C:\Users\Admin\Documents\Switch\UnrealPakSwitch2\pakchunk0-Switch.pak -list -cryptokeys="..\..\..\crypto.json"  1>lista.txt

C:\Users\Admin\Documents\Switch\UnrealPakSwitch2>pause
Press any key to continue . . .

C:\Users\Admin\Documents\Switch\UnrealPakSwitch2>v11.27\2\3\UnrealPak.exe C:\Users\Admin\Documents\Switch\UnrealPakSwitch2\pakchunk0-Switch.pak -extract ..\..\..\ -cryptokeys="..\..\..\crypto.json"
LogInit: Display: Loading text-based GConfig....
LogPaths: Warning: No paths for game localization data were specifed in the game configuration.
LogInit: Warning: No paths for engine localization data were specifed in the engine configuration.
LogPakFile: Display: Parsing crypto keys from a crypto key cache file
LogPakFile: Display: Extracted "Base/AssetRegistry.bin" to "..\..\..\Base/AssetRegistry.bin" Offset 0.
LogPakFile: Display: Extracted "Base/Base.uproject" to "..\..\..\Base/Base.uproject" Offset 2541248.
LogPakFile: Display: Extracted "Base/Config/DefaultBuildPassword.ini" to "..\..\..\Base/Config/DefaultBuildPassword.ini" Offset 2542240.
LogPakFile: Display: Extracted "Base/Config/DefaultDeviceProfiles.ini" to "..\..\..\Base/Config/DefaultDeviceProfiles.ini" Offset 2548048.
LogPakFile: Display: Extracted "Base/Config/DefaultEngine.ini" to "..\..\..\Base/Config/DefaultEngine.ini" Offset 2549328.
LogPakFile: Display: Extracted "Base/Config/DefaultGame.ini" to "..\..\..\Base/Config/DefaultGame.ini" Offset 2556544.
LogPakFile: Display: Extracted "Base/Config/DefaultGameBuild.ini" to "..\..\..\Base/Config/DefaultGameBuild.ini" Offset 2560576.
LogPakFile: Display: Extracted "Base/Config/DefaultGameplayTags.ini" to "..\..\..\Base/Config/DefaultGameplayTags.ini" Offset 2561312.
LogPakFile: Display: Extracted "Base/Config/DefaultInput.ini" to "..\..\..\Base/Config/DefaultInput.ini" Offset 2569248.
LogPakFile: Display: Extracted "Base/Config/DefaultLoadingScreen.ini" to "..\..\..\Base/Config/DefaultLoadingScreen.ini" Offset 2573936.
LogPakFile: Display: Extracted "Base/Config/DefaultScalability.ini" to "..\..\..\Base/Config/DefaultScalability.ini" Offset 2575696.
LogPakFile: Display: Extracted "Base/Config/DefaultUI.ini" to "..\..\..\Base/Config/DefaultUI.ini" Offset 2578560.
LogPakFile: Display: Extracted "Base/Config/DefaultWatermark.ini" to "..\..\..\Base/Config/DefaultWatermark.ini" Offset 2578896.
LogPakFile: Display: Extracted "Base/Config/DefaultWatermarkBuild.ini" to "..\..\..\Base/Config/DefaultWatermarkBuild.ini" Offset 2579664.
LogPakFile: Display: Extracted "Base/Config/Switch/SwitchDeviceProfiles.ini" to "..\..\..\Base/Config/Switch/SwitchDeviceProfiles.ini" Offset 2579904.
LogPakFile: Display: Extracted "Base/Config/Switch/SwitchEngine.ini" to "..\..\..\Base/Config/Switch/SwitchEngine.ini" Offset 2582912.
LogPakFile: Display: Extracted "Base/Config/Switch/SwitchGame.ini" to "..\..\..\Base/Config/Switch/SwitchGame.ini" Offset 2585024.
[...]
 

Durandil67

New Member
Newbie
Joined
Oct 24, 2021
Messages
4
Trophies
0
Age
30
XP
22
Country
France
Hi!
I followed your tutorial for unpack a .pak file and everything was ok. However I have this error when I want to repack it:

Code:
LogWindows: Error: === Critical error: ===
LogWindows: Error:
LogWindows: Error: Assertion failed: false [File:D:/Build/++UE4/Sync/Engine/Source/Developer/PakFileUtilities/Private/PakFileUtilities.cpp] [Line: 1935]
LogWindows: Error:
LogWindows: Error: [Callstack] 0x00007ffee16de0f7 UnrealPak-Core.dll!FDebug::CheckVerifyFailedImpl() []
LogWindows: Error: [Callstack] 0x00007fff027ecdac UnrealPak-PakFileUtilities.dll!VerifyIndexesMatch() []
LogWindows: Error: [Callstack] 0x00007fff027c71bc UnrealPak-PakFileUtilities.dll!CreatePakFile() []
LogWindows: Error: [Callstack] 0x00007fff027d10bf UnrealPak-PakFileUtilities.dll!ExecuteUnrealPak() []
LogWindows: Error: [Callstack] 0x00007ff6646da407 UnrealPak.exe!wmain() []
LogWindows: Error: [Callstack] 0x00007ff6646db1a8 UnrealPak.exe!__scrt_common_main_seh() []
LogWindows: Error: [Callstack] 0x00007fff32227034 KERNEL32.DLL!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007fff33242651 ntdll.dll!UnknownFunction []
LogWindows: Error:
LogWindows: Error:
LogWindows: Error:
LogWindows: Error:
LogWindows: FPlatformMisc::RequestExit(1)
LogCore: Engine exit requested (reason: Win RequestExit)

I specify that it's display at the end of the log file which indicates that all the files are added to the .pak. I used the unpack version 11.
 

masagrator

The patches guy
OP
Developer
Joined
Oct 14, 2018
Messages
6,243
Trophies
3
XP
11,972
Country
Poland
Hi!
I followed your tutorial for unpack a .pak file and everything was ok. However I have this error when I want to repack it:

Code:
LogWindows: Error: === Critical error: ===
LogWindows: Error:
LogWindows: Error: Assertion failed: false [File:D:/Build/++UE4/Sync/Engine/Source/Developer/PakFileUtilities/Private/PakFileUtilities.cpp] [Line: 1935]
LogWindows: Error:
LogWindows: Error: [Callstack] 0x00007ffee16de0f7 UnrealPak-Core.dll!FDebug::CheckVerifyFailedImpl() []
LogWindows: Error: [Callstack] 0x00007fff027ecdac UnrealPak-PakFileUtilities.dll!VerifyIndexesMatch() []
LogWindows: Error: [Callstack] 0x00007fff027c71bc UnrealPak-PakFileUtilities.dll!CreatePakFile() []
LogWindows: Error: [Callstack] 0x00007fff027d10bf UnrealPak-PakFileUtilities.dll!ExecuteUnrealPak() []
LogWindows: Error: [Callstack] 0x00007ff6646da407 UnrealPak.exe!wmain() []
LogWindows: Error: [Callstack] 0x00007ff6646db1a8 UnrealPak.exe!__scrt_common_main_seh() []
LogWindows: Error: [Callstack] 0x00007fff32227034 KERNEL32.DLL!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007fff33242651 ntdll.dll!UnknownFunction []
LogWindows: Error:
LogWindows: Error:
LogWindows: Error:
LogWindows: Error:
LogWindows: FPlatformMisc::RequestExit(1)
LogCore: Engine exit requested (reason: Win RequestExit)

I specify that it's display at the end of the log file which indicates that all the files are added to the .pak. I used the unpack version 11.
This error probably states that constructed index doesn't match file list. Dunno how did you achieve that.

What you have in lista.txt?
 

Durandil67

New Member
Newbie
Joined
Oct 24, 2021
Messages
4
Trophies
0
Age
30
XP
22
Country
France
This error probably states that constructed index doesn't match file list. Dunno how did you achieve that.

What you have in lista.txt?
Here is the beginning and the end of my lista.txt (I did not put everything because it's too long for the post)

Code:
Log file open, 10/23/21 20:04:23
LogPlatformFile: Not using cached read wrapper
LogTaskGraph: Started task graph with 4 named threads and 7 total threads with 1 sets of task threads.
LogWindows: Failed to load '../../../Engine/Binaries/ThirdParty/DbgHelp/dbghelp.dll' (GetLastError=126)
LogWindows: File '../../../Engine/Binaries/ThirdParty/DbgHelp/dbghelp.dll' does not exist
LogPakFile: PakFile PrimaryIndexSize=69424
LogPakFile: PakFile PathHashIndexSize=117264
LogPakFile: PakFile FullDirectoryIndexSize=81360
"../../../Engine/Config/Base.ini"
"../../../Engine/Config/BaseCompat.ini"
"../../../Engine/Config/BaseDeviceProfiles.ini"
"../../../Engine/Config/BaseEngine.ini"
"../../../Engine/Config/BaseGame.ini"
"../../../Engine/Config/BaseGameUserSettings.ini"
"../../../Engine/Config/BaseHardware.ini"
"../../../Engine/Config/BaseInput.ini"
"../../../Engine/Config/BaseInstallBundle.ini"
"../../../Engine/Config/BaseRuntimeOptions.ini"
"../../../Engine/Config/BaseScalability.ini"
"../../../Engine/Config/Layouts/DefaultLayout.ini"
"../../../Engine/Config/Windows/BaseWindowsEngine.ini"
"../../../Engine/Config/Windows/DataDrivenPlatformInfo.ini"
"../../../Engine/Config/Windows/WindowsEngine.ini"
"../../../Engine/Config/Windows/WindowsGame.ini"
[...]
LogExit: Preparing to exit.
LogModuleManager: Shutting down and abandoning module PakFile (4)
LogModuleManager: Shutting down and abandoning module RSA (3)
LogExit: Exiting.
Log file closed, 10/23/21 20:04:23
 

masagrator

The patches guy
OP
Developer
Joined
Oct 14, 2018
Messages
6,243
Trophies
3
XP
11,972
Country
Poland
Beside dunno what this logger is.
You're adding some stuff between my tutorial points that seemingly are breaking my scripts.
Stick to the tutorial and you will be fine
 

Durandil67

New Member
Newbie
Joined
Oct 24, 2021
Messages
4
Trophies
0
Age
30
XP
22
Country
France
Oh damn my bad! I told myself that I just had to delete some lines indicated in the tutorial. It seems obvious to me now and it worked, sorry and thank you for your help!
 

khk2423

New Member
Newbie
Joined
Sep 30, 2021
Messages
2
Trophies
0
Age
36
XP
34
Country
Korea, South
I'm editing the demon slayer pak files on Steam.
This game has two pak files.

pakchunk0-WindowsNoEditor.pak
pakchunk1-WindowsNoEditor.pak

Both are in v9 version, and unpack works well without any problems.
(I made two UnrealPakSwitch folders and worked on them)
After modifying the contents, the pakchunk0 file is packed without any problems.
But when I try to pack the pakchunk1, I get this error.

LogPaths: Warning: No paths for game localization data were specifed in the game configuration.
LogPakFile: Display: Using command line for crypto configuration
LogPakFile: Display: Loading response file C:\UnrealPakSwitch2\lista.txt
LogPakFile: Display: Added 38016 entries to add to pak file.
LogPakFile: Display: Collecting files to add to pak file...
LogPakFile: Display: Collected 38016 files in 0.19s.
LogPakFile: Display: Creating pak ../../../newpak.pak.
LogWindows: Error: === Critical error: ===
LogWindows: Error:
LogWindows: Error: Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Developer/DerivedDataCache/Private/DerivedDataBackends.cpp] [Line: 89]
LogWindows: Error: Unable to create backend graph using the default graph settings (DerivedDataBackendGraph) ini=../../../Engine/Programs/UnrealPak/Saved/Config/Windows/Engine.ini.
LogWindows: Error: [Callstack] 0x00007ffd7e9930e6 UnrealPak-DerivedDataCache.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd7e99b34a UnrealPak-DerivedDataCache.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd7e99d97d UnrealPak-DerivedDataCache.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd1cfc0743 UnrealPak-Core.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd1cfbfba8 UnrealPak-Core.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd1cf6edd1 UnrealPak-Core.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd1cf6ee0b UnrealPak-Core.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd7ef624ed UnrealPak-PakFileUtilities.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd7ef6e06e UnrealPak-PakFileUtilities.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7eb4aa5c7 UnrealPak.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7eb4ab338 UnrealPak.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd98e47034 KERNEL32.DLL!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd9aca2651 ntdll.dll!UnknownFunction []
LogWindows: Error:
LogWindows: Error:
LogWindows: Error:
LogWindows: Error:

I used the same method for both files, but why does only the second file show an error on the pack stage?
 

masagrator

The patches guy
OP
Developer
Joined
Oct 14, 2018
Messages
6,243
Trophies
3
XP
11,972
Country
Poland
I'm editing the demon slayer pak files on Steam.
This game has two pak files.

pakchunk0-WindowsNoEditor.pak
pakchunk1-WindowsNoEditor.pak

Both are in v9 version, and unpack works well without any problems.
(I made two UnrealPakSwitch folders and worked on them)
After modifying the contents, the pakchunk0 file is packed without any problems.
But when I try to pack the pakchunk1, I get this error.

LogPaths: Warning: No paths for game localization data were specifed in the game configuration.
LogPakFile: Display: Using command line for crypto configuration
LogPakFile: Display: Loading response file C:\UnrealPakSwitch2\lista.txt
LogPakFile: Display: Added 38016 entries to add to pak file.
LogPakFile: Display: Collecting files to add to pak file...
LogPakFile: Display: Collected 38016 files in 0.19s.
LogPakFile: Display: Creating pak ../../../newpak.pak.
LogWindows: Error: === Critical error: ===
LogWindows: Error:
LogWindows: Error: Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Developer/DerivedDataCache/Private/DerivedDataBackends.cpp] [Line: 89]
LogWindows: Error: Unable to create backend graph using the default graph settings (DerivedDataBackendGraph) ini=../../../Engine/Programs/UnrealPak/Saved/Config/Windows/Engine.ini.
LogWindows: Error: [Callstack] 0x00007ffd7e9930e6 UnrealPak-DerivedDataCache.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd7e99b34a UnrealPak-DerivedDataCache.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd7e99d97d UnrealPak-DerivedDataCache.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd1cfc0743 UnrealPak-Core.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd1cfbfba8 UnrealPak-Core.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd1cf6edd1 UnrealPak-Core.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd1cf6ee0b UnrealPak-Core.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd7ef624ed UnrealPak-PakFileUtilities.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd7ef6e06e UnrealPak-PakFileUtilities.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7eb4aa5c7 UnrealPak.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7eb4ab338 UnrealPak.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd98e47034 KERNEL32.DLL!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd9aca2651 ntdll.dll!UnknownFunction []
LogWindows: Error:
LogWindows: Error:
LogWindows: Error:
LogWindows: Error:

I used the same method for both files, but why does only the second file show an error on the pack stage?
Don't delete "Engine" folder after unpacking pak. UnrealPak is creating configuration files based on unpacked PAKs to Engine folder that are later used to pack them back.
Not sure if mixing PAKs Engine folders is not an issue.
Try to unpack PAKs in separate UnrealPakSwitch folders and work on those.
 
  • Like
Reactions: zerlkung

kenken0215

Active Member
Newcomer
Joined
Oct 24, 2015
Messages
27
Trophies
0
Location
t
XP
462
Country
India
Hi! I want to unpack a game that has a switch, but it doesn't work.




Code:
LogInit: Display: Loading text-based GConfig....
LogPaths: Warning: No paths for game localization data were specifed in the game configuration.
LogInit: Warning: No paths for engine localization data were specifed in the engine configuration.
LogPakFile: Display: Using command line for crypto configuration
LogPakFile: Warning: -compress is deprecated, use -compressed with UAT instead
LogPakFile: Display: Loading response file -compress
LogPakFile: Error: Failed to load -compress
LogPakFile: Display: Added 0 entries to add to pak file.
LogPakFile: Display: Collecting files to add to pak file...
LogPakFile: Display: Collected 0 files in 0.00s.
LogPakFile: Display: Creating pak ../../../newpak.pak.
LogPakFile: Display: CompressionFormats in priority order: Zlib
LogModuleManager: Warning: ModuleManager: Unable to load module 'C:/UnrealPakSwitchv9/v8.23/2/3/UnrealPak-DerivedDataCache.dll' because the file couldn't be loaded by the OS.
LogWindows: Error: === Critical error: ===
LogWindows: Error:
LogWindows: Error: Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Core/Private/Misc/CoreMisc.cpp] [Line: 116]
LogWindows: Error: Derived Data Cache was requested, but not available.
LogWindows: Error: [Callstack] 0x00007fff5feb8679 UnrealPak-Core.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007fffacb15282 UnrealPak-PakFileUtilities.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007fffacb21f7e UnrealPak-PakFileUtilities.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7bd37b037 UnrealPak.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7bd37be18 UnrealPak.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007fffc97e7034 KERNEL32.DLL!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007fffc9922651 ntdll.dll!UnknownFunction []
LogWindows: Error:
LogWindows: Error:
LogWindows: Error:
LogWindows: Error:


Please help me!
 

masagrator

The patches guy
OP
Developer
Joined
Oct 14, 2018
Messages
6,243
Trophies
3
XP
11,972
Country
Poland
Hi! I want to unpack a game that has a switch, but it doesn't work.




Code:
LogInit: Display: Loading text-based GConfig....
LogPaths: Warning: No paths for game localization data were specifed in the game configuration.
LogInit: Warning: No paths for engine localization data were specifed in the engine configuration.
LogPakFile: Display: Using command line for crypto configuration
LogPakFile: Warning: -compress is deprecated, use -compressed with UAT instead
LogPakFile: Display: Loading response file -compress
LogPakFile: Error: Failed to load -compress
LogPakFile: Display: Added 0 entries to add to pak file.
LogPakFile: Display: Collecting files to add to pak file...
LogPakFile: Display: Collected 0 files in 0.00s.
LogPakFile: Display: Creating pak ../../../newpak.pak.
LogPakFile: Display: CompressionFormats in priority order: Zlib
LogModuleManager: Warning: ModuleManager: Unable to load module 'C:/UnrealPakSwitchv9/v8.23/2/3/UnrealPak-DerivedDataCache.dll' because the file couldn't be loaded by the OS.
LogWindows: Error: === Critical error: ===
LogWindows: Error:
LogWindows: Error: Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Core/Private/Misc/CoreMisc.cpp] [Line: 116]
LogWindows: Error: Derived Data Cache was requested, but not available.
LogWindows: Error: [Callstack] 0x00007fff5feb8679 UnrealPak-Core.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007fffacb15282 UnrealPak-PakFileUtilities.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007fffacb21f7e UnrealPak-PakFileUtilities.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7bd37b037 UnrealPak.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7bd37be18 UnrealPak.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007fffc97e7034 KERNEL32.DLL!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007fffc9922651 ntdll.dll!UnknownFunction []
LogWindows: Error:
LogWindows: Error:
LogWindows: Error:
LogWindows: Error:


Please help me!
Follow properly tutorial.
1. You are packing, not unpacking.
2. You didn't copy all files specified by tutorial.
 

jmga

Member
Newcomer
Joined
Nov 9, 2021
Messages
5
Trophies
0
Age
32
XP
37
Country
Spain
Hi, thanks for the tutorial.

I have successfully unpacked and repacked a single file to make a patch, but the folder structure is not preserved in the newpak.

In the file list of the new pack file I can see the mount point has been modified.

Mount point ../../../Engine/Config/Switch/ instead of ../../../

Am I doing something wrong?

Thanks.

EDIT: If I add a file to the pack from another root directory then the mount point is correct.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: "Now I know why he took his own life"