The Unreal library (UELib) provides you an API to read (parse/deserialize) the contents of Unreal Engine game package files such as .UDK, .UPK.
Its main purpose is to decompile the UnrealScript byte-code to its original source-code.
It accomplishes this by reading the necessary Unreal data classes such as:
Classes such as UStruct, UState, UClass, and UFunction contain the UnrealScript byte-code which we can deserialize in order to re-construct the byte-codes to its original UnrealScript source.
How to use
To use this library you will need .NET Framework 4.8 (The library will move to .NET 6 or higher at version 2.0)
varpackage=UnrealLoader.LoadPackage(@"C:\Path\Package.upk", System.IO.FileAccess.Read);
Console.WriteLine($"Version: {package.Summary.Version}");
// Initializes the registered classes, constructs and deserializes(loads) the package objects.package.InitializePackage();
// Now we can iterate all loaded objects, but beware! This includes fake-import objects.foreach (varobjinpackage.Objects)
{
Console.WriteLine($"Name: {obj.Name}");
Console.WriteLine($"Class: {obj.Class?.Name}");
Console.WriteLine($"Outer: {obj.Outer}");
}
If you're looking to modify the library for the sole purpose of modding UE Explorer, I recommend you to clone or fork this repository and install UE Explorer within your UELib/src/bin/Debug/ folder, or change the project's configuration to build inside of the UE Explorer's folder.
Want to try out the latest library release? Then you can simply save Eliot.UELib.dll to the folder where you have installed UE Explorer at. Note that the current release of UE Explorer is using version 1.2.7.1.
How to contribute
Open an issue
Or make a pull-request by creating a fork of this repository, create a new branch and commit your changes to that particular branch, so that I can easily merge your changes.
Compatible Games
This is a table of games that are confirmed to be compatible with the current state of UELib, the table is sorted by Package-Version.
Name
Engine:Branch
Package/Licensee
Support State
Unreal
100-226
61/000
Star Trek: The Next Generation: Klingon Honor Guard
219
61/000
X-COM: Alliance
200-220
61/000
Bad output at the start of functions (BeginFunctionToken)
Unreal Mission Pack: Return to Na Pali
226b
68/000
Unreal Tournament
338-436
68-69/000
Deus Ex
400-436
68/000
Duke Nukem Forever (2001)
613
68/002
UStruct offsets are off leading to bad output code
Beware, opening an unsupported package could crash your system! Make sure you have
saved everything before opening any file!
Note UE3 production-ready packages are often compressed and must first be decompressed, Unreal Package Decompressor by Gildor is a tool that can decompress most packages for you; for some games you need a specialized decompressor, see for example RLUPKTool.
请发表评论