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
carpedee
Posts: 4
Joined: Sun Aug 09, 2020 9:13 pm

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

Post by carpedee »

spiritovod wrote:@carpedee: Some samples would be nice (with full folder tree) or it will be just random blind guess. Usually you can guess asset's role via corresponding uasset, except very few cases when it stores some in-between index/database data - but I doubt you'll ever need to deserialize such assets.

Thanks for your reply. Yes, deserializing seems a bit overkill for such a task but you never know.
Sure, I can give you a more precise example.
The assets in question are apparently "rigs" from the game Vampyr : a "facial" rig, a biped-IK rig and a compensation rig (no idea about what this one is). There is also an "adapter" rig which seems linked to the facial rig and facial animations.
Now that's what confuses me. The only rigs assets I could think of would be control rigs (control rig sequences to be exact), but it was a very experimental plugin in UE 4.15 and I don't get how it connects to facial animations and to an "adapter" rig.
I also added an asset of a model from the game, which directly references these rigs, which apparently isn't the case with control rig sequences.

By full tree folder I assume you mean the whole folder hierarchy from the pak file? I can show you a screen of umodel but I'm not sure how to dump the folder structure, if it's even possible?
Thanks!
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 »

@carpedee: Oh, well... The point is that assets from paks doesn't contain game logic. Uasset contains references to other related assets, invoked modules (classes), required for the asset deserialization, and properties which will be passed to those classes. Uexp / ubulk contains data for those properties. But you can't tell how each property will be used, because for this you'll need source code of the game. There are some exceptions though, like text assets, because they're quite simple by design.
You can guess small modifications of properties if you know how the whole subsystem works, but if a game has noticeable differences in common properties or it's using custom plugins for asset in question, all you can do is to reverse-engineer the game code, because random guessing may take too much time.
In this case custom animation module (DNEAnimation) is used - like in case with other Dontnod games, Captain Spirit and Life is Strange 2. It's probably extended version of the default UE4 animation subsystem, since the game was supported in umodel by default.

Anyway, I don't think it's the right topic to discuss those things. You better look for some 3D modeling forums, where BipedIK animation is explained in general or for UE4 in particular. Also, take a look at plugins for animation like Animation & Rigging Toolset (especially documentation). Not sure it will be of any help though, since I'm not into 3D modeling.
ProGamer
Posts: 45
Joined: Wed Oct 02, 2019 10:01 am

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

Post by ProGamer »

Destroy all humans! PC remake I share the pak files

it does not work with Umodel

I would like to extract the model and the texture

Thank you :)

https://mega.nz/file/BKR3kS5T#jpgZoptF3 ... IssS5Sp5rM
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 »

@ProGamer: This topic is about general pak stuff, not about particular assets. Just wait until that game support will be implemented in umodel or look for generic model extractors like 3D Model Researcher, Ninja Ripper, etc. Btw, textures are working fine in umodel for the game.
carpedee
Posts: 4
Joined: Sun Aug 09, 2020 9:13 pm

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

Post by carpedee »

spiritovod wrote:@carpedee: Oh, well... The point is that assets from paks doesn't contain game logic. Uasset contains references to other related assets, invoked modules (classes), required for the asset deserialization, and properties which will be passed to those classes. Uexp / ubulk contains data for those properties. But you can't tell how each property will be used, because for this you'll need source code of the game. There are some exceptions though, like text assets, because they're quite simple by design.
You can guess small modifications of properties if you know how the whole subsystem works, but if a game has noticeable differences in common properties or it's using custom plugins for asset in question, all you can do is to reverse-engineer the game code, because random guessing may take too much time.
In this case custom animation module (DNEAnimation) is used - like in case with other Dontnod games, Captain Spirit and Life is Strange 2. It's probably extended version of the default UE4 animation subsystem, since the game was supported in umodel by default.

Anyway, I don't think it's the right topic to discuss those things. You better look for some 3D modeling forums, where BipedIK animation is explained in general or for UE4 in particular. Also, take a look at plugins for animation like Animation & Rigging Toolset (especially documentation). Not sure it will be of any help though, since I'm not into 3D modeling.

Thank you for replying. Indeed, that was my point: knowing if there could be a way to do more than an educated guess regarding the usage of specific plugins or subsystems. I did check some strings in the compiled executable but that didn't help me much.
But you're right, it's probably pretty generic if umodel can read it.
Regarding ART tools I'm not so sure, especially with how a rig would be transferred to a specific asset once in Unreal.
I'll keep digging anyway
shekbai
Posts: 1
Joined: Fri Aug 07, 2020 3:27 pm

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

Post by shekbai »

i need ingame value of pubg mobile
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 »

carpedee wrote:But you're right, it's probably pretty generic if umodel can read it.

It's not generic per se. Umodel is created that way it can skip unknown classes/properties (and you can see it in the log) - for example, if an animation asset has 4 standard properties and 6 custom and those 4 will be enough to create (deserialize) something out of it, you'll get something. UE is pretty much unified, and all custom stuff is usually an addition to existing core functions, so it's not the problem to work with core only, considering that UE is open source.

@shekbai: Use corresponding scripts from my signature. For more info read "All you should know about PUBG" section from this topic.
carpedee
Posts: 4
Joined: Sun Aug 09, 2020 9:13 pm

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

Post by carpedee »

spiritovod wrote:
carpedee wrote:But you're right, it's probably pretty generic if umodel can read it.

It's not generic per se. Umodel is created that way it can skip unknown classes/properties (and you can see it in the log) - for example, if an animation asset has 4 standard properties and 6 custom and those 4 will be enough to create (deserialize) something out of it, you'll get something. UE is pretty much unified, and all custom stuff is usually an addition to existing core functions, so it's not the problem to work with core only, considering that UE is open source.


Well I meant it wasn't a heavily modified version of UE like we could have for some games running on UE3. But that's very true and that's also why Umodel works pretty well as an exporter but creating an importer would be way more complex. Thanks anyway!
fileGates71
Posts: 18
Joined: Sun Feb 24, 2019 11:45 pm

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

Post by fileGates71 »

Perhaps someone can help me. I am trying to get at audio files from Spyro: The Reignited Trilogy's PS4 .pkg files and I have used the most recent unreal_tournament.bms, but it says "0 files found in 0 seconds". There is something I'm trying to find in the PS4 version specifically, but I've hit this roadblock.
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 »

@fileGates71: You should extract paks from the pkg first. If you don't know how to do that, read corresponding section from this topic.
fileGates71
Posts: 18
Joined: Sun Feb 24, 2019 11:45 pm

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

Post by fileGates71 »

My bad - I did. It is the .pak files I am trying to extract the files from.
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 »

@fileGates71: I believe that you have broken pak then. Use the instruction, linked in my previous post, to extract paks from pkg and try to unpack them. If the problem will occur again, use filecutter script on any pak and upload the results here.
fileGates71
Posts: 18
Joined: Sun Feb 24, 2019 11:45 pm

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

Post by fileGates71 »

Broken .pak?! I hope not. I got it right off my physical disc.

In any case, here are the results. There are two .pak files on the disc and used the script on both.
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 »

@fileGates71: Like I thought, those paks are broken. And by that I mean that they were not extracted properly from pkg, due to extraction tool fault or something. That's why I've suggested to use my instruction with PkgEditor in particular.
sinnerclown380
Posts: 59
Joined: Tue Apr 07, 2020 10:34 am

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

Post by sinnerclown380 »

pls Fast & Furious - Crossroads Aes key
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 »

@sinnerclown380: It's not UE4 game.
fileGates71
Posts: 18
Joined: Sun Feb 24, 2019 11:45 pm

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

Post by fileGates71 »

@spiritovod: How essential is the downloading from PSN, finding the "reference_package_url", and downloading the PSFDN plugin? Because they seem necessary only if you are using a legit digital copy of the game.

What I did was put the physical Spyro disc into my laptop, booted up PkgEditor (which I used in the first place. I used the default passcode to decode it and never had to again on subsequent tries) and went to town on the app.pkg file. There's just the one, no parts. From it, I got the .pak files and used quickbms and the most recent unreal_tournament.bms scripts - still nothing.

Is it me? Sorry if the post seems ridiculous and condescending, but I just want to make sure I am not missing a step, however useless it may seem.
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 »

@fileGates71: You can't dump a PS4 disk from PC properly, it's only possible through jailbroken console. Alternatively, you can download scene release for the game, it's already decrypted.
fileGates71
Posts: 18
Joined: Sun Feb 24, 2019 11:45 pm

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

Post by fileGates71 »

Are you sure? I tried using pkgEditor to extract one of the .mp4 files and it worked fine. It could be a pkgEditor issue. When trying to extract the .paks from a .pkg that I downloaded (as an alternate tactic from using my own disc), it said "This application is in break mode" which it didn't do for the .mp4 file.

By "scene release", do you mean the Steam release? If so, then, sorry. I am bound and determined to extract from the PS4 version. There is an early version of the main theme which isn't included in other music rips.

In any case, if a pkgEditor problem is too off-topic for this thread, I will look elsewhere.
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 »

@fileGates71: If you want to know why it works like that (why you can't dump PS4 disk like that or why you can extract a file like that), please read some PS4 technical-oriented sites, it's not the right topic to discuss those questions. It's not PkgEditor fault either - latest build works fine with all valid pkgs (at least, I didn't hear about any non-working valid pkg yet). And by scene release I mean scene release (aka pirated copy).

Not sure what else I can add to the discussion, but you can easily check if your resulted pak is valid or not - open it in any hex editor and scroll to the very end. The end should contain some data (it's actually pak's table of contents). In case if it's broken, it will be all zeroes (common issue for PS4 files over 4GB due to wrong extraction, still not a PkgEditor issue per se).