March 28, 2024, 18:26
bigger smaller reset     1020px Wide width Full width Reset   * *

Gildor's Forums

  Homepage Facebook Read news on Twitter Youtube channel Github page
Welcome, Guest. Please login or register.
Did you miss your activation email?

« previous next »
Print
Author Topic: Extraction of assets  (Read 24418 times)
Heffo
Newbie
*
Posts: 4


View Profile
« on: February 15, 2015, 19:28 »

Hello

I've tried extracting animations, music, blueprints and game files from the PlayerController.uasset and GameMode.uasset for example and I just end up with the "Loaded in 0.001 sec, 1 allocs, 0.00 MBytes serialized in 0 calls"

I'm guessing umodel for UE4 is only capable of extracting textures, static meshes and material (.mat) files at the moment?

Also when opening a game I get "Found 2270 game files (1280 skipped)". Is it supposed to skip files? Another game I've tried in UE4 4.6 skipped 805 files.

Me and a friend worked on a game and he packed it and deleted the source files. I need your tool in order to extract all the source files. Aside from the game files such as textures, meshes, animations and blueprints I need everything inside the cooked files, such as .h files

With an extracted .pak (u4pak) including the .uproject files etc, I believe I only need the source files from your extractor in order to recreate the entire project in UE4. Or else I've wasted hundreds of hours for nothing.

Your tool is incredible and the only one capable of doing anything with the cooked files. Amazing work.


I forgot to mention if you select an object then press a folder and press export the program crashes. I guess you can't extract folders yet?
« Last Edit: February 15, 2015, 19:54 by Heffo » Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #1 on: February 15, 2015, 20:13 »

Hello
Hello

Quote
I'm guessing umodel for UE4 is only capable of extracting textures, static meshes and material (.mat) files at the moment?
Skeletal meshes too. Animaitons and sounds will be supported later (didn't start working on them yet).
Quote
Also when opening a game I get "Found 2270 game files (1280 skipped)". Is it supposed to skip files? Another game I've tried in UE4 4.6 skipped 805 files.
I don't know what's "skipped" in your particular case. "ini" files and some other are not recognized by umodel because these files are not packages, so they are indicated as "skipped". I think you've selected something else but not "Cooked" directory, so it contains binaries etc. For example,
"ShooterGame\Saved\StagedBuilds\WindowsNoEditor\Engine\Content\Localization\ICU\icudt53l"
contains 999 files for Unicode support. But if you'll select "ShooterGame\Saved\Cooked" - you'll get 0 "skipped" files.
Quote
Me and a friend worked on a game and he packed it and deleted the source files. I need your tool in order to extract all the source files. Aside from the game files such as textures, meshes, animations and blueprints I need everything inside the cooked files, such as .h files
If files are not cooked, some sources should be extractable with UE4 Editor.
Quote
With an extracted .pak (u4pak) including the .uproject files etc, I believe I only need the source files from your extractor in order to recreate the entire project in UE4. Or else I've wasted hundreds of hours for nothing.
How could you say "I need only source files" when it looks like you have "only 1 .uproject file" - which is absolutely usess?
Quote
Your tool is incredible and the only one capable of doing anything with the cooked files. Amazing work.
Thank you Smiley
Quote
I forgot to mention if you select an object then press a folder and press export the program crashes. I guess you can't extract folders yet?
Only packages are extracted. But you may select multiple packages from list on the right. I logged this issue to fix it soon, thanks for the report. That happens because "export" menu item is not disabled when current folder changes.
Logged
Heffo
Newbie
*
Posts: 4


View Profile
« Reply #2 on: February 15, 2015, 22:21 »

Quote
I don't know what's "skipped" in your particular case. "ini" files and some other are not recognized by umodel because these files are not packages, so they are indicated as "skipped". I think you've selected something else but not "Cooked" directory, so it contains binaries etc. For example,
"ShooterGame\Saved\StagedBuilds\WindowsNoEditor\Engine\Content\Localization\ICU\icudt53l"
contains 999 files for Unicode support. But if you'll select "ShooterGame\Saved\Cooked" - you'll get 0 "skipped" files.

When extracting the .pak I get the the game folder and the Engine folder.

The Engine folder contains config files, plugins (.uplugin) and Global shaders etc. It also has a couple of .uasset files inside the Content folder.

The Engine folder files aside from the Content folder are not cooked (like .inis). I believe these are skipped as you said, I forgot these weren't cooked.

Quote
If files are not cooked, some sources should be extractable with UE4 Editor.

Since the game is already packed for shipping, all the important files are cooked into .uasset. I can't generate files for Visual Studio or open the project with UE4 editor because I don't have the source files.

Quote
How could you say "I need only source files" when it looks like you have "only 1 .uproject file" - which is absolutely usess?

I've got the files from the .pak which contains the uproject, engine files (.inis, plugins) and the cooked (.uasset) files.

The most important files I'm missing are the source files such as .cpp. I just tried searching for them and I can't find them anywhere in the .pak. Looking through the shipping.exe file they might've somehow merged there because that's the only place listing all my .cpp, .c, .h source files.
« Last Edit: February 15, 2015, 22:24 by Heffo » Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #3 on: February 15, 2015, 22:32 »

.cpp files are compiled into game executable. They cannot be restored at all. Only meshes, textures, sounds and animations could be restored, consider C++ code and Blueprints as lost.

In UE4 Blueprints are compiled into UnrealScript bytecode, so in theory it's possible to decompile them, but currently there's no such tools exists.

So, the task of restoration of source code and data from cooked game sounds rather impossible, or at least very hard (in a case you'll obtain all tools required for that). UModel can extract only parts of data.
Logged
Heffo
Newbie
*
Posts: 4


View Profile
« Reply #4 on: February 15, 2015, 23:01 »

That's what I thought. Without the code I'm going to have to redo it. But with your umodel tool I can at least get the meshes, textures, sounds and animations so I won't have to start from scratch.

I'm aware this is not related in any way, but is it possible to make changes in .ini files inside the .pak and just repack it? Game got packed as Shipping so I can't get around any debugging tools or commands.

Thanks for all your help.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #5 on: February 15, 2015, 23:29 »

Play with UnrealPak tool. There's no documentation about its use, but you may read it from the source code
Engine\Source\Programs\UnrealPak\Private\UnrealPak.cpp
Code:
/**
 * Application entry point
 * Params:
 *   -Test test if the pak file is healthy
 *   -Extract extracts pak file contents (followed by a path, i.e.: -extract D:\ExtractedPak)
...
I think it is possible to use this tool to extract pak file and than package it back.
Logged
Heffo
Newbie
*
Posts: 4


View Profile
« Reply #6 on: February 16, 2015, 03:08 »

Thanks.

I can extract and pack .pak. But I guess I'm pretty much screwed because it's built as Shipping, removing debugging and console. Can't even do logs.

Modifying default .inis doesn't work. I wonder if there's a workaround even without a console.
« Last Edit: February 16, 2015, 03:13 by Heffo » Logged
XZCendence
Newbie
*
Posts: 3


View Profile
« Reply #7 on: June 09, 2019, 19:55 »

.cpp files are compiled into game executable. They cannot be restored at all. Only meshes, textures, sounds and animations could be restored, consider C++ code and Blueprints as lost.

In UE4 Blueprints are compiled into UnrealScript bytecode, so in theory it's possible to decompile them, but currently there's no such tools exists.

So, the task of restoration of source code and data from cooked game sounds rather impossible, or at least very hard (in a case you'll obtain all tools required for that). UModel can extract only parts of data.
well, there are tools like ghidira that extract EXE functions and such so rebuilding a packaged game in the editor is partially possible but I doubt it would work
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #8 on: June 09, 2019, 21:08 »

I suppose you're about US government reverse engineering tool which was released earlier this year? I doubt it's better than IDA Pro, however I never tried it.
Also, decompiler will let EXPERIENCED programmer to analyze the code, it will not let non-programmer to understand anything, and never - recompile code.
Logged
Print 
« previous next »
Jump to:  

Powered by SMF | SMF © 2006-2009, Simple Machines LLC
Leviathan design by Bloc | XHTML | CSS