Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Display Modes
  #1  
Old 29-09-2021, 01:58
Masquerade's Avatar
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 731
Thanks: 160
Thanked 762 Times in 382 Posts
Masquerade is on a distinguished road
How to patch unneeded voiceovers out of Unreal Engine 4 games

Hello everyone, today I am going to explain how to patch unneeded voiceovers out of Unreal Engine 4 games - particularly voiceovers contained inside *.PAK files. Some games store language files external to the main PAK, and you can easily separate them. We are not interested in this, but more complex method of removing data from the main PAK file(s). This method works for decrypted pak files, I haven't tested on encrypted paks, however it should work since the data is stored in the same location.

I will be using BIOMUTANT as an example, it has 10 voiceovers inside the main pak. We can patch out 9 voiceovers (we must leave English inside the pak since the game relies on it, if English is removed, the game will crash).

Prerequisites:
Step 1: Generating a filelist:
  1. Go to the game folder and access the following path: "<gamename>\Content\Paks\"
  2. Drag quickbms_4gb_files.exe and the BMS script we downloaded earlier into this folder.
  3. Shift + Right click to open a command prompt window. Don't see open command window? Follow this guide.
  4. In the cmd window, type the following command:
    Code:
    for %f in (*.PAK) do quickbms_4gb_files -l unreal_tournament_4_0.4.25b.bms "%f" >> "%~nf.txt"
  5. We should now have a txt file for each pak present with a full list of all the files it contains.

Step 2: Understanding the filelist:
  • We can open the txt files in any text editor. I use Notepad++. The above command we ran redirected the QuickBMS output to a text file, otherwise it would have all been sent to the console window - not useful for us.
  • Opening the filelist, we are instantly presented with lots of information:
    Code:
      0000000000000035 3412       Biomutant\Biomutant.uproject
      0000000000001035 24559      Biomutant\Plugins\Biomutant.upluginmanifest
      0000000000007835 63926      Engine\Content\Internationalization\icudt53l\cnvalias.icu
      0000000000017835 6412       Engine\Content\Internationalization\icudt53l\res_index.res
      0000000000019835 29392      Engine\Content\Internationalization\icudt53l\plurals.res
      0000000000021035 22440      Engine\Content\Internationalization\icudt53l\lang\en.res
      0000000000026835 4016       Engine\Content\Internationalization\icudt53l\lang\pool.res
      0000000000027835 204        Engine\Content\Internationalization\icudt53l\lang\root.res
      0000000000028035 7704       Engine\Content\Internationalization\icudt53l\region\en.res
      000000000002a035 1040       Engine\Content\Internationalization\icudt53l\region\pool.res
      000000000002a47a 96         Engine\Content\Internationalization\icudt53l\region\root.res
      000000000002a835 20128      Engine\Content\Internationalization\icudt53l\windowsZones.res
      000000000002f835 149844     Engine\Content\Internationalization\icudt53l\zoneinfo64.res
      00000000000541be 1260       Engine\Content\Internationalization\icudt53l\keyTypeData.res
      0000000000054835 19504      Engine\Content\Internationalization\icudt53l\timezoneTypes.res
      000000000005949a 96         Engine\Content\Internationalization\icudt53l\en_US.res
      0000000000059835 2960       Engine\Content\Internationalization\icudt53l\pool.res
      000000000005a835 16152      Engine\Content\Internationalization\icudt53l\en.res
      000000000005e835 47856      Engine\Content\Internationalization\icudt53l\root.res
      000000000006a35a 33         Engine\Config\Base.ini
      000000000006a835 106414     Engine\Config\BaseEngine.ini
      0000000000084835 51263      Biomutant\Config\DefaultEngine.ini
      00000000000910a9 813        Engine\Config\Windows\WindowsEngine.ini
  • This is a part of the BIOMUTANT filelist.

We will use "WindowsEngine.ini" as an example for understanding what the filelist is telling us:
  • The first value (00000000000910a9) is the location in hexadecimal of the file inside the pak. We can strip away the added 0s to leave a final value of 910a9.
  • The second value (813) is the size in decimal of the file.
  • Then followed by the file name.

We can use this information to identify the position and size of any file inside the PAK. It makes patching out data siginificantly easier.

Step 3: Slimming the filelist:
  • Currently our filelist contains everything inside the pak. But we don't want everything, we only want the language files. Remove all entries that aren't related to language files. After doing this to the BIOMUTANT filelist, we go from a size of 84MB to 61MB!
  • We remove all game files that aren't voiceovers. I included removing English voiceovers since we have no need to remove them.

Step 4: Finding the data:
  1. Make a new text file, I will call it data.txt. This will be used to store the location of the data blocks of the voiceovers in the game.
  2. We will organise our text file like this:
    Code:
    <language name> - <begin offset in decimal> - <end offset in decimal>
  3. To begin, we take the first language - German - and take the first hexadecimal value present.
    Code:
      00000003d9abc835 2814828    Biomutant\Content\L10N\de\BiomutantDialogueWaveContainer.uasset
    From the beginning of this entry, we can see that the file starts at offset 3d9abc835. SFK only deals with decimal offsets, so we need to use Windows calculator to convert our hexadecimal offset to decimal.

    This forms the first part of our entry in data.txt:
    Code:
    de - 16536815669 - <end offset in decimal>
  4. Now we need to find the last German file in the list. It is this:
    Code:
      00000003f9a8445d 31778      Biomutant\Content\L10N\de\ImportedDialogue\de\FFF2948C43B930814682D589264E22F8_BD76FD3800000000.uexp
    Be careful! 3f9a8445d is not the end offset of the German data block! This is the start of the last file.
  5. To find the end of the file, we open the PAK with HxD. Change "hex" to "dec" in the top of the screen. Press CTRL + G to go to the offset we just copied from our calculator.
  6. Next, press CTRL+E and select length in the menu. Paste the second value (31778) and press enter. This will highlight the entire file in the pak, but you can click off the highlight because HxD has shown us the end of the file.

    From this method, we have learned that the end offset of the German data block is at 17073487998.

    Our German entry now looks like this:
    Code:
    de - 16536815669 - 17073487998
  7. Now we can press CTRL + E to select the full German block:
  8. Press CTRL + C to copy the entire block and go to File > New in HxD and make a new file.
  9. Paste the copied content and save the file. I saved it as German.PCK

Step 5: Removing the Data:
  1. Back in the main PAK file, right click the selected block and fill the data with 00s.

Now you can repeat the above steps for the remaining 8 voiceovers. And like magic we have now removed almost 4.3GB of data from the game! That's 4.3GB less you need to compress with LOLZ etc...

To put this in perspective, a repack without removing this data will be almost 9.7GB, whereas after removing the data, we end up with a compressed archive of just under 6.4GB.

Step 6: Patching the data back in:
  1. Make a simple batch file and follow the below template:
    Code:
    sfk partcopy <temp file> -allfrom 0 <patch file> <patch offset> -yes
  2. Going with the German data we just patched out, we end up with this:
    Code:
    sfk partcopy German.PCK -allfrom 0 Biomutant-WindowsNoEditor.pak 16536815669 -yes
  3. Running this batch file will put the data back into the pak.

FAQ
  • Why does the size of the pak file remain the same? I thought we were removing data! Please read this explanation!
  • Is there an alternative to SFK? Yes, there is Raw Injector. My post only covers the use of SFK, figure out Raw Injector yourself.
  • What other games can I apply this method to? Life Is Strange True Colours is a good one to try! Only 2 voiceovers paks in that game to patch out (FR/DE).

Last edited by Masquerade; 29-09-2021 at 02:01.
Reply With Quote
The Following 9 Users Say Thank You to Masquerade For This Useful Post:
:( Sad8669 (29-09-2021), Cesar82 (29-03-2022), dixen (29-09-2021), ffmla (30-09-2021), Grumpy (29-09-2021), KaktoR (29-09-2021), L0v3craft (02-10-2021), prince55 (30-09-2021), rambohazard (29-09-2021)
Sponsored Links
  #2  
Old 29-09-2021, 02:31
KaktoR's Avatar
KaktoR KaktoR is offline
Lame User
 
Join Date: Jan 2012
Location: From outer space
Posts: 3,555
Thanks: 935
Thanked 5,799 Times in 2,140 Posts
KaktoR is on a distinguished road
Nothing new for me, but for some people usefull of course

Good explanation.
__________________
Haters gonna hate
Reply With Quote
  #3  
Old 29-09-2021, 03:57
Masquerade's Avatar
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 731
Thanks: 160
Thanked 762 Times in 382 Posts
Masquerade is on a distinguished road
Quote:
Originally Posted by KaktoR View Post
Nothing new for me, but for some people usefull of course
Yes, I wrote it for the newbies and anyone wanting to squeeze even more compression.
Thanks.
Reply With Quote
  #4  
Old 29-09-2021, 09:05
L33THAK0R's Avatar
L33THAK0R L33THAK0R is offline
Registered User
 
Join Date: Feb 2021
Location: Saudi Arabia
Posts: 229
Thanks: 79
Thanked 20 Times in 16 Posts
L33THAK0R is on a distinguished road
Bit unrelated but had no idea Windows had a programmer tab for its calculator! Up until now I always just used an online calculator, this is heaps more convenient!
Reply With Quote
  #5  
Old 29-09-2021, 11:20
dixen dixen is offline
Registered User
 
Join Date: Sep 2014
Location: Russia
Posts: 286
Thanks: 350
Thanked 327 Times in 148 Posts
dixen is on a distinguished road
Thanks for instruction) But I need same method for Detroit Become Human..
Reply With Quote
  #6  
Old 30-09-2021, 22:38
prince55 prince55 is offline
Registered User
 
Join Date: Mar 2017
Location: Egypt
Posts: 26
Thanks: 53
Thanked 10 Times in 7 Posts
prince55 is on a distinguished road
Really thanks, will try it
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unreal Tournament 2003 Patch 2136 (c) Infogrames RAZOR1911 ]2oss PC Games 5 29-10-2002 19:34
Patch NTSC to PAL for 3 games!!!! springter PS2 Games 1 14-01-2002 12:33
What kind of patch should I use to backup my ps2 cd games? Zoe PS2 Games 2 29-12-2001 05:03
NEWBIE!!!-how do i patch my PS2 games??? DaBess PS2 Games 1 18-11-2001 12:33
Do i need a patch to backup EA sports games? epsilon PS2 Games 1 06-10-2001 10:54



All times are GMT -7. The time now is 01:54.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.
Copyright 2000-2020, FileForums @ https://fileforums.com