Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
XxDarkus101Xx
Posts: 10
Joined: Thu Dec 09, 2021 8:40 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by XxDarkus101Xx »

spiritovod wrote:@soulbrother73: There shouldn't be any problems with extracting assets from the game with the script from the first post or 4.25 one from my signature. You can find required key via signature as well.

----------------------------------------------------

Script for decrypting open beta versions of Back 4 Blood (PC) is added to specific scripts bundle, you need to run quickbms with -o -С options for more convenient usage of the script. No key is required, packages are fully extractable. Encryption in the full version is the same, but I need to run it at least once to obtain required info (while I don't own it).

Update: Read announcement below, it affects Back 4 Blood script as well.

----------------------------------------------------

Base 4.25 + 4.27 and Back 4 Blood scripts are now fixed (essentially all "c" scripts versions). Previously, encrypted non-chunked assets were not extracted properly due to incorrectly written data (all aligned data was written instead of original size). Please check if you're using latest versions of them to avoid possible issues (they should contain "fixed" inside the script).


Hey I got a question, about Back 4 Blood does that mean the bms scripts can finally unpack the game paks for modding or does it mean something else? I'm confused about what those scripts are for. I tried unpacking it with the updated obt script and the cmd asked me if I wanted to use some sort of dll code or something and I hit yes and it came up with an error.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by aluigi »

@SLVRMN
I moved your post in this topic because that game (Undecember) is an UE4 game and you need the correct key.
There is a key on https://cs.rin.ru/forum/viewtopic.php?t=100672 but I don't know if you need a specific script or that key is obsolete, let's wait what spiritovod may suggest you.
spiritovod
Posts: 719
Joined: Sat Sep 28, 2019 7:00 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by spiritovod »

@SLVRMN: Use 4.27 script from the post in my signature and key from separate topic, also available via signature (and in the aluigi's post above).

@XxDarkus101Xx: If you have open beta files, then yes, you can unpack them (tested on the latest beta from this august). It will not work for the release version, but to update the script I need to run the game - though I don't own full version and I have no plans for it (Game Pass is not an option for various reasons). It's all explained in the post you've just quoted.
Update: Some kind person shared the game with me for tests, so script is now updated with support for full versions as well (except for Microsoft Store builds). For more info read announcement below.

----------------------------------------------------

Test script for Super People added to specific scripts bundle, it also requires key from the list and you need to run quickbms with -С option for more convenient usage of the script. Tested on latest CBT version from steam, but it may not work as expected for some packages.

Update: Script is now updated, it should work with all packages, but some of extracted assets may be still corrupted.
Update 2: Apparently some files are mislabeled with wrong names upon files extractions (it affects only uexp/ubulk files). It's because the game is using custom packages format. It will be investigated further in due time.
Update 3: Script is completely fixed now (you can check if you have latest version, it should be "proper fix" in the script header).

----------------------------------------------------

Back 4 Blood script from specific scripts bundle is replaced with more generic one, which works with both full and beta versions of the game (tested on latest EGS version). To switch between versions, modify the script according to included comment, full version is default option. It supports only steam and EGS builds, Microsoft Store build has different format. Packages should be fully extractable with it, unlike previous workaround solution.
Don't forget to run quickbms with -o -С options for more convenient usage of the script (or with -C only for updated script).
Last edited by spiritovod on Wed Oct 12, 2022 12:57 pm, edited 3 times in total.
gladias9
Posts: 14
Joined: Wed May 20, 2020 12:48 am

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by gladias9 »

One step closer to Back 4 Blood modding!

Tried modding but any .paks I create just aren't being read by the game as nothing changes (ammo count/movement speed).
EAC is bypassed and I'm using a .sig with the pak file too.

Maybe custom pak files need to be a specific version? Or the files require a specific script to pak?
(I'm using Asset Editor to edit the .uassets and 4.27.2 Unrealpak to pak)
spiritovod
Posts: 719
Joined: Sat Sep 28, 2019 7:00 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by spiritovod »

@gladias9: The game is built with 4.25, so you'll need unrealpak of that version or any version with v4 format support, from 4.18 and below (they should also work through backward compatibility). EAC has nothing to do with this, it only protects memory, but not particular files - though there may be additional integrity checks for critical files to prevent basic tampering with them.
gladias9
Posts: 14
Joined: Wed May 20, 2020 12:48 am

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by gladias9 »

Darn, 4.25 and 4.17 aren't being read (unless I'm just doing it wrong).

This is the ~mods folder I'm using below. I haven't done anything much different from any of my other mods but it just seems like the game is stubborn against using my custom paks regardless of unrealpak version.
https://drive.google.com/drive/folders/ ... sp=sharing

Anyway I'm not trying to rope you into an overly drawn out request or anything. You've done A LOT more than I imagined possible for the game already.
spiritovod
Posts: 719
Joined: Sat Sep 28, 2019 7:00 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by spiritovod »

@gladias9: Oh snap, I forgot it's using customized packages. Here is a sample how it should look like (removed), though not sure where encryption flag belongs to, so there are two samples actually. Just rename them to usual _P and place alongside other paks (subfolders like "mod" are not recommended, there are games which refuses to read from anywhere except base folder and only filenames with certain pattern). Also I'm not sure about hash checks, it's possible to check pak hashes (the one from TOC header) against predefined list, some games are using this approach.
Last edited by spiritovod on Mon Jan 24, 2022 1:29 pm, edited 1 time in total.
gladias9
Posts: 14
Joined: Wed May 20, 2020 12:48 am

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by gladias9 »

Looks to be affecting the game in some sense.
Test 1 has the game unable to launch. Test 2 launches but hangs on the main menu loading screen.

But I am unable to extract the .paks using any script so I cannot see inside.
spiritovod
Posts: 719
Joined: Sat Sep 28, 2019 7:00 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by spiritovod »

That makes sense actually, test1 package has possible encryption flag set to true, so game couldn't decrypt what's not encrypted and failed to load. I've updated the script in the bundle, it should now handle such packages as test2. Though it's better to compare packages with self-made ones, to understand differences (for starters, they shouldn't be compressed, because compressed assets has custom fields as well). As for the rest - I have no idea why it doesn't work.
gladias9
Posts: 14
Joined: Wed May 20, 2020 12:48 am

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by gladias9 »

Hmm.. quickbms with that script isn't extracting test 2.
Was it just a folder structure you changed inside the pak?
XxDarkus101Xx
Posts: 10
Joined: Thu Dec 09, 2021 8:40 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by XxDarkus101Xx »

I don’t think Back 4 Blood would be moddable because I unpacked the open beta pak files and I opened a file in asset editor and it would not save. It would have an error come up. And the fact that I was online only as was outriders which I did the same thing and the same outcome happened. Though I could be wrong which I hope but if someone does a mod successfully for B4B, then I would be happy. I got a bad feeling about it though
gladias9
Posts: 14
Joined: Wed May 20, 2020 12:48 am

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by gladias9 »

@XxDarkus101Xx
Whenever you run into an error when saving with the asset editor either:
1) copy the 'Offset' of the value you want to change (All the offsets are listed in Asset Editor when you open the .uasset), place the .uexp file into HxD (download it online), click 'Search' -> 'Go to', checkmark 'dec', paste the offset, and replace the number that matches the value you want to change, save in HxD and you're good with no further use of Asset Editor. Or try step method 2 which usually doesn't work.
2) try changing the asset editor version in the right-hand drop box and re-open the .uasset to see if the error goes away

Method 1's steps have picture tutorials in my guide right here.
XxDarkus101Xx
Posts: 10
Joined: Thu Dec 09, 2021 8:40 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by XxDarkus101Xx »

@gladias9 well I'll give it a shot tomorrow once I try and unpack the files with quickbms. Hopefully we can get this game to become modded. If any of my mods don't work or the game does not work with mods I'll let you know
spiritovod
Posts: 719
Joined: Sat Sep 28, 2019 7:00 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by spiritovod »

I've checked it by myself, B4B is modifiable to a certain extent. Here are test packages for better understanding of custom package format (link), just compare them with self-created packages in any hex editor. Test2 can be loaded, but game crashes on serialization, which means included assets are being read, but they're improperly edited. Test3 can be loaded just fine, it has config with some video options modified.
Such packages can be extracted with the same script, it has been updated in specific scripts bundle before my previous post.

----------------------------------------------------

Please note that this topic is for general questions about UE4 packages and their extraction, not about modding conversations. I'll leave this post as reference, since the game in question is using custom format for packages, but if someones want to talk about modding of this game any further, please talk somewhere else - otherwise the topic will be bloated in no time. Thanks for your understanding.
XxDarkus101Xx
Posts: 10
Joined: Thu Dec 09, 2021 8:40 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by XxDarkus101Xx »

All I'm looking forward to is modding the weapons stats like damage, recoil, accuracy, fire rate, etc. Maybe some of the cards to where they are fun (if they are editable), and movement speed. Anything else I'm not that big on.
XxDarkus101Xx
Posts: 10
Joined: Thu Dec 09, 2021 8:40 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by XxDarkus101Xx »

well i just tested one of my mods and nothing is happening. (just added 100 clip ammo to LMG) not working. just used unrealpak version 4.18 after using asset editor. Am I doing something wrong or does the game not want to read it right?
gladias9
Posts: 14
Joined: Wed May 20, 2020 12:48 am

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by gladias9 »

@spiritovod Thank for all your help dude. Appreciate all you've done for us.
@XxDarkus101Xx Will PM you if I ever make any headway. We can't speak modding here on this thread.
Last edited by gladias9 on Fri Jan 28, 2022 2:55 am, edited 2 times in total.
XxDarkus101Xx
Posts: 10
Joined: Thu Dec 09, 2021 8:40 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by XxDarkus101Xx »

@gladias9 gotcha
spiritovod
Posts: 719
Joined: Sat Sep 28, 2019 7:00 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by spiritovod »

Crayta script from specific scripts bundle is replaced with more generic one, which doesn't require any preliminary modifications of the package. Also, packages should be fully extractable with it, unlike previous workaround solution. Don't forget to run quickbms with -o -С options for more convenient usage of the script.

----------------------------------------------------

Tony Hawk's Pro Skater 1+2 script added to specific scripts bundle. With it you can extract latest PC versions of the game. Don't forget to run quickbms with -o -С options for more convenient usage of the script.
Lionhack
Posts: 1
Joined: Thu Jan 27, 2022 5:13 pm

Error while unpacking pak

Post by Lionhack »

1)I tried to unpack the pak file of bgmi (Indian version of PUBG mobile). But it is saying the pak file is not supported. I have attached the image. Could anyone say what the problem is?

Capture.PNG


2)So I tried the unreal tournament bms script its asking for aes key. Please anyone provide the latest working aes key for bgmi.

Capture1.PNG