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
ikyAhmad
Posts: 33
Joined: Mon Sep 13, 2021 12:44 am

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

Post by ikyAhmad »

XxDarkus101Xx wrote: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.

I am also waiting for modding methods for other games!!
ikyAhmad
Posts: 33
Joined: Mon Sep 13, 2021 12:44 am

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

Post by ikyAhmad »

gladias9 wrote:@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.

Share me your Discord, I have many questions about game modification.
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 »

I guess we can put PUBG in the "blacklist" because I see people continuing to post and open new topics (I moved them here because partially UE4-related and to remove the "noise" from the forum) about this game and the situation is very annoying now.

So let's put it clear and let's end this situation:
ANY NEW POST/TOPIC ABOUT PUBG WILL BE DELETED

Additionally this topic is for UE4 only, not for generic tips about modding.
So, please, STOP asking.

THIS TOPIC IS ABOUT UE4 GAMES ONLY.

Thanks ;)
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

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

Post by Ekey »

How about global topic for Unity ;)?

PS: Sorry for offtopic :B
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 »

@ aluigi: Thanks for making that decision, really appreciated. Sadly, the warning would be buried among pages quite fast - it's better to stick it like you did for sketchfab, but not sure if it's possible (it may be ineffective anyway). Or at least add it to the first post. Though I can still reference to it if needed, so thanks again.

@Ekey: Something like this topic? The main problem is that it should be properly maintained by someone, otherwise it would be a mess much worse than UE4 topic was before - I mean, if you're going to merge all unity stuff into single topic, their games are less unified in terms of encryption, bundle format (if obfuscated) and such. I'm having headache just thinking about it...
┬┴┬┴┤・ω・)ノ
┬┴┬┴┤・)ノ
┬┴┬┴┤

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

Light Response script added to specific scripts bundle. With it you can extract latest versions of the game. Don't forget to run quickbms with -o -С options for more convenient usage of the script.

P.S. Strangly, they're using the same custom encryption as in Tony Hawk games.
Krazze
Posts: 3
Joined: Sat Jan 29, 2022 10:28 pm

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

Post by Krazze »

@spiritovod: I'm trying to export the .paks from Super People, I have this but can't manage to export. Can you tell me if I'm doing something wrong? Or what should I add. Thanks for your time.

https://i.gyazo.com/e03070758ad4d7016b4 ... 312600.png
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 »

@Krazze: Please take a look at the pattern, explained in the post you've used. You need to convert key from 0xAABBCC to \xAA\xBB\xCC format in this field. I should probably simplify this part of the script, so key can be used in more copy-pasting way, but not sure about particular implementation yet.
Krazze
Posts: 3
Joined: Sat Jan 29, 2022 10:28 pm

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

Post by Krazze »

spiritovod wrote:@Krazze: Please take a look at the pattern, explained in the post you've used. You need to convert key from 0xAABBCC to \xAA\xBB\xCC format in this field. I should probably simplify this part of the script, so key can be used in more copy-pasting way, but not sure about particular implementation yet.


https://i.gyazo.com/3060d16263cc211497a ... 34413d.png

Still Idk if I'm doing something wrong or it's because I'm using the latest steam version and something changed from your tests. But I don't understand the example that's why I posted asking for help, if I could see the one you used I would understand quickly, I have no experience in these things, sorry.
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 »

@Krazze: In your case it would be "\xD1\xF7\xF5" and so on. "0x" is just a prefix, which indicates that the key is in hex format and it's not part of it (UE4 scripts can accept string keys as well, but they're not being used since around 4.19 engine). Also, you can check that the script is still valid by using it in a normal way with copy-pasting key when asked.
Krazze
Posts: 3
Joined: Sat Jan 29, 2022 10:28 pm

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

Post by Krazze »

spiritovod wrote:@Krazze: In your case it would be "\xD1\xF7\xF5" and so on. "0x" is just a prefix, which indicates that the key is in hex format and it's not part of it (UE4 scripts can accept string keys as well, but they're not being used since around 4.19 engine). Also, you can check that the script is still valid by using it in a normal way with copy-pasting key when asked.


Ok thanks, got it. The example was confusing me!
Kein
Posts: 32
Joined: Wed Jan 08, 2020 11:22 pm

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

Post by Kein »

spiritovod wrote:The game is using modified paks, close to "frozen index" format[...]


Can you elaborate on "frozen index format"? Too many hits for the keyword in the UE4 repo and unreal docs is trash as unusual. If index is "frozen" does that mean you cant sideload any extra pack with their priority system since it wont update index for resoures?
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 »

@Kein: This is not official term for this format, but Epic once called it like this in an announcement and it's referenced like this somewhere in comments, so people are referencing it like this as well. It's just a different way to store index, internally it works exactly the same as other formats, because it's still the same file system - which means mod paks are also supported, considering that you're able to produce compatible package. You can read brief explanation of the format concept here - in short, it's platform dependent "compiled" version of index, you can roughly compare it to source code / compiled binary thing (this comparison is not correct, but still). In 4.26 engine and above this feature was deprecated because they implemented IOStore format (ucas/utoc) and hash tables with mapping to paks, which is more common and platform-independent way to optimize packages reading.

From what I see, frozen index is now widely used on consoles and UWP platform under 4.25-plus engine implementation.
Kein
Posts: 32
Joined: Wed Jan 08, 2020 11:22 pm

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

Post by Kein »

I see, interesting trivia.
Kein
Posts: 32
Joined: Wed Jan 08, 2020 11:22 pm

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

Post by Kein »

So I have a game on 4.27.2 that uses both utoc and paks but it wont load any custom sideloaded paks.
Is it known issue?
ikyAhmad
Posts: 33
Joined: Mon Sep 13, 2021 12:44 am

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

Post by ikyAhmad »

hey spiritovod, I'm learning to make my own *.pak Mod File!! I saw several ways on youtube, but that method has been around for 1 year and some have even been for 2 years!! is it still possible to use this method? considering the tools they use are outdated!!
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 »

@Kein: Never tried to modify such game and didn't see a mod for it, so can't tell anything specific (though I'm not into modding in general). Next time you could try to be less hypothetical and provide more details, like game name at least.

Anyway, a little reminder:
spiritovod wrote:Please note that this topic is for general questions about UE4 packages and their extraction, not about modding conversations.

And also, viewtopic.php?f=9&t=1005&p=69853#p69409
DJ Normality
Posts: 647
Joined: Tue Jul 24, 2018 8:52 am

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

Post by DJ Normality »

Not sure what i asked but admin removed my post. I was asking if you could look into this one for us Spirit since nobody has CBT files or is willing to share them properly.
https://cs.rin.ru/forum/viewtopic.php?f ... it=century
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 »

@DJ Normality: The game is using customized compression now, like stated in the linked topic, so unless it will be somehow reversed, I can't help much. I've opened a topic in code talk subforum about this issue, so people could discuss it properly, since this topic is still mostly for general UE4 packages questions.
GHFear
Posts: 290
Joined: Fri Mar 30, 2018 2:48 am

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

Post by GHFear »

spiritovod wrote:@ aluigi: Thanks for making that decision, really appreciated. Sadly, the warning would be buried among pages quite fast - it's better to stick it like you did for sketchfab, but not sure if it's possible (it may be ineffective anyway). Or at least add it to the first post. Though I can still reference to it if needed, so thanks again.

@Ekey: Something like this topic? The main problem is that it should be properly maintained by someone, otherwise it would be a mess much worse than UE4 topic was before - I mean, if you're going to merge all unity stuff into single topic, their games are less unified in terms of encryption, bundle format (if obfuscated) and such. I'm having headache just thinking about it...
┬┴┬┴┤・ω・)ノ
┬┴┬┴┤・)ノ
┬┴┬┴┤

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

Light Response script added to specific scripts bundle. With it you can extract latest versions of the game. Don't forget to run quickbms with -o -С options for more convenient usage of the script.

P.S. Strangly, they're using the same custom encryption as in Tony Hawk games.



I added this algorithm to a project I am working on lately and it turns out this algorithm is also backwards compatible with the older encrypted PAKs.
So theoretically, QuickBMS and UEViewer could use this as it's default.
Did you decompile this? I credited you for it in my project. But if you did, great job man!
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 »

@GHFear: I don't quite understand what exactly you suggest. Every custom encryption is customized in different way - Light Response is using two-passes encryption, Tony Hawk and B4B are using custom expansion and so on. In the meantime, expansion is totally skipped by design and replaced with result to simplify things (for me at least). Considering all this there is no sense in implementing any of this as any kind of "default" solution, because essentially all those implementations are different.