#1
|
||||
|
||||
How to patch languages out of game files (xtool erase decode)
Introduction
Sometimes you have game archives which contains all the language files, but you don't need all of them. I will tell you what to do, what you need and giving you a example. Side Notes There is already another topic from Masquerade. He teached you how to cut language files out of UE4 game archives using SFK and such. Here is a different way. What do you need?
How to? (UE4) I will start with the game "The Dark Pictures Anthology Man of Medan", which is a UE4 game with some pak files. Language files are found in "pakchunk1-WindowsNoEditor.pak".
Now comes the xtool part (erase command) Make another batch code for xtool, like this: Code:
xtool erase "pakchunk1-WindowsNoEditor.pak_extract\SMG019\Content\L10N\de" "pakchunk1-WindowsNoEditor.pak" dpamom.xtl xtool erase "pakchunk1-WindowsNoEditor.pak_extract\SMG019\Content\L10N\es" "pakchunk1-WindowsNoEditor.pak" dpamom.xtl xtool erase "pakchunk1-WindowsNoEditor.pak_extract\SMG019\Content\L10N\fr" "pakchunk1-WindowsNoEditor.pak" dpamom.xtl xtool erase "pakchunk1-WindowsNoEditor.pak_extract\SMG019\Content\L10N\it" "pakchunk1-WindowsNoEditor.pak" dpamom.xtl xtool erase "pakchunk1-WindowsNoEditor.pak_extract\SMG019\Content\L10N\ru" "pakchunk1-WindowsNoEditor.pak" dpamom.xtl Xtool's erase command is nulling all files in "pakchunk1-WindowsNoEditor.pak_extract\SMG019\Content\L10N\XX " folder and replace this nulled files with original data inside the pak file. The "dpamom.xtl" file is optional and may be neccessary for later uses, if you want to restore the original files into the modified pak file again. The file is named after the game name in short (you can name this file like whatever you want to). XTool is storing original file informations like file positions/offsets and such in this xtl file. I will tell you later how to restore the original files back to modified pak file. Ok I've done this, but modified pak file is the same size as original pak file? What's wrong? Nothing is wrong. The nulled files have replaced the original files inside the pak file. You can open the modified pak file with a hex editor, for example HxD and you will see that most of the file is replaced with "00" or "." (dots). Same goes to the extracted files. Here is a example from "pakchunk1-WindowsNoEditor.pak_extract\SMG019\Content\L10N\de \Audio\ExternalSourceBanks\Scene\alexpath\alexpath .uasset" file. Both files have the exact same size, but the file contents are clearly different (and also the checksum of course). In terms of compression, nulled parts of the pak file will have a ratio nearly zero (0%). What now? Can I repack? Yes. Replace modified pak file with original pak file but make a backup of the original pak file first, just to be sure. I want to restore original files back into modified pak file. What to do? For this you need
Take original pak file and extract it again in some other folder. Copy extracted original (not nulled) files into the directory which contains modified pak file and xtool.exe and use the following code to restore: Code:
xtool decode dpamom.xtl "pakchunk1-WindowsNoEditor.pak_extract\SMG019\Content\L10N\de" "pakchunk1-WindowsNoEditor.pak" xtool decode dpamom.xtl "pakchunk1-WindowsNoEditor.pak_extract\SMG019\Content\L10N\es" "pakchunk1-WindowsNoEditor.pak" xtool decode dpamom.xtl "pakchunk1-WindowsNoEditor.pak_extract\SMG019\Content\L10N\fr" "pakchunk1-WindowsNoEditor.pak" xtool decode dpamom.xtl "pakchunk1-WindowsNoEditor.pak_extract\SMG019\Content\L10N\it" "pakchunk1-WindowsNoEditor.pak" xtool decode dpamom.xtl "pakchunk1-WindowsNoEditor.pak_extract\SMG019\Content\L10N\ru" "pakchunk1-WindowsNoEditor.pak" Another example Now I will give you another example, namely "A Plague Tale Requiem", which won't need any file patching afterwards (if you want to restore original files back). Voice files are stored in "SOUNDBANKS\VO_MEDIA.PC.PCK". Copy this file into testing/temporary folder, including xtool.exe, quickbms_4gb_files.exe and wwise.bms script. Use the following code to extract the file Code:
for %%f in (*.pck) do quickbms_4gb_files -d -o -Y wwise.bms "%%f" The following code erases all files except english Code:
XTool erase "VO_MEDIA.PC.PCK_extract\chinese(simplified)" "VO_MEDIA.PC.PCK" aptr.xtl XTool erase "VO_MEDIA.PC.PCK_extract\french(france)" "VO_MEDIA.PC.PCK" aptr.xtl XTool erase "VO_MEDIA.PC.PCK_extract\german" "VO_MEDIA.PC.PCK" aptr.xtl XTool erase "VO_MEDIA.PC.PCK_extract\spanish(spain)" "VO_MEDIA.PC.PCK" aptr.xtl To restore original files back to modified PCK file, you can use this code Code:
xtool decode aptr.xtl "VO_MEDIA.PC.PCK_extract\chinese(simplified)" "VO_MEDIA.PC.PCK" xtool decode aptr.xtl "VO_MEDIA.PC.PCK_extract\french(france)" "VO_MEDIA.PC.PCK" xtool decode aptr.xtl "VO_MEDIA.PC.PCK_extract\german" "VO_MEDIA.PC.PCK" xtool decode aptr.xtl "VO_MEDIA.PC.PCK_extract\spanish(spain)" "VO_MEDIA.PC.PCK" I did the same with "A Plague Tale Innocence", ripping all languages except german, played the game twice without any errors. However I would suggest (or strongly recommend) to this stuff if the game is fully patched out. If there are patched to come, these patches updates modified file, you have f*cked up if you don't have the original files anymore, which leads to redownloading original files first.
__________________
Haters gonna hate
|
The Following 14 Users Say Thank You to KaktoR For This Useful Post: | ||
Cesar82 (31-10-2022), dixen (31-10-2022), fabrieunko (01-11-2022), Gehrman (01-11-2022), Guravkov2010 (31-10-2022), kuyhaa (31-10-2022), L0v3craft (02-11-2022), Masquerade (31-10-2022), mausschieber (31-10-2022), Razor12911 (01-11-2022), sakila(playboy) (01-11-2022), ScarAce1989 (31-10-2022), shazzla (31-10-2022), Wanterlude (31-10-2022) |
Sponsored Links |
#2
|
|||
|
|||
Hello Tell me how to deal with encrypted files PAK
Last edited by Guravkov2010; 01-11-2022 at 00:41. |
#3
|
||||
|
||||
I think it is not possible, because you can not give xtool a key in erase/decode mode.
__________________
Haters gonna hate
|
The Following User Says Thank You to KaktoR For This Useful Post: | ||
Guravkov2010 (01-11-2022) |
#4
|
|||
|
|||
Thanks a lot for your answer
|
#5
|
|||
|
|||
For UE4 *.pak - https://fileforums.com/showpost.php?...1&postcount=25
|
The Following User Says Thank You to dixen For This Useful Post: | ||
Guravkov2010 (01-11-2022) |
#6
|
|||
|
|||
Quote:
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ASIS: Advanced Simple Installer Script | KaktoR | Conversion Tutorials | 1387 | 29-11-2024 12:27 |
Ultimate Conversion Compressor (UCC) | vollachr | Conversion Tutorials | 55 | 26-04-2021 10:27 |
Avg | eakinsme | Software | 11 | 07-09-2009 01:32 |