EliotVU/Unreal-Library
GitHub: EliotVU/Unreal-Library
Unreal Engine游戏包文件反编译库,支持Unreal Engine 1, 2, 和 3。
Stars: 456 | Forks: 100
[](https://www.nuget.org/packages/Eliot.UELib/)


# UELib -> UELib
Unreal 库(UELib)为您提供了一个 API,用于读取(解析/反序列化)Unreal Engine 游戏包文件的内容,例如 .UDK 和 .UPK 文件。
UELib 的主要目标是反编译 UnrealScript 字节码,这是通过从 Unreal 数据类重建原始 UnrealScript 源代码来实现的:
```
UObject, UField, UConst, UEnum, UProperty, UStruct, UFunction, UState, UClass,
UTextBuffer, UMetaData, UPackage
```
UELib 还能够反序列化其他 Unreal 数据类:
```
UFont, USound, UPalette, UTexture,
UTexture2D, UTexture2DDynamic, UTexture2DComposite, UTexture3D,
UTextureCube, UTextureFlipBook, UTextureMovie
UPrimitive, UPolys,
UComponent
```
## 安装
```
Install-Package Eliot.UELib
```
| 模块 | 版本 | 许可证 |
|---|---|---|
|
| [](https://www.nuget.org/packages/Eliot.UELib/) |  |
* 使用方法:查看 [文档](https://github.com/EliotVU/Unreal-Library/wiki/Usage) 获取更多示例。
```
using UELib;
// Instantiates a FileStream and deserializes the package's header, will also auto-detected a suitable build to associate the package with.
var package = UnrealLoader.LoadPackage(@"C:\Path\Package.upk", System.IO.FileAccess.Read);
Console.WriteLine($"Version: {package.Summary.Version}");
// Necessary if working with packages that have been cooked for a console platform, and IF the build was not properly auto-detected.
// package.CookerPlatform = BuildPlatform.Console;
// Initializes the registered classes, constructs and deserializes(loads) the package objects.
package.InitializePackage();
// Now we can iterate over all the initialized objects, but beware! This includes fake-import objects.
foreach (var obj in package.Objects)
{
// If positive then we have an export, or import if negative, if null, we are working with a 'None' object, but this shouldn't occur here.
if ((int)obj > 0)
{
Console.WriteLine($"Export:");
}
else if ((int)obj < 0)
{
Console.WriteLine($"Import:");
}
Console.WriteLine($"ObjectIndex: {(int)obj}");
Console.WriteLine($"Name: {obj.Name}");
Console.WriteLine($"Class: {obj.Class?.Name}");
Console.WriteLine($"Outer: {obj.Outer}");
Console.WriteLine($"Path: {obj.GetReferencePath()}");
}
```
如果您想修改库以仅用于修改 [UE Explorer](https://github.com/UE-Explorer/UE-Explorer),请考虑分支 UE Explorer 而不是 UELib(UELib 作为子模块链接)
## 兼容游戏
UELib 支持以下类型的内容,但可能因游戏而异:
- [x] 脚本
- [x] 音频
- [x] 纹理(不支持 .tfc)
- [ ] 模型
- [ ] 动画
| 名称 | 引擎 | 包 | 状态 | 脚本 | 音频 | 纹理
| --------------------- | ------ | -------- | ----- | ------ | ----- | -------
| | | | |
| **Unreal Engine 1** | | | | ✅ | ✅ | ✅ |
| | | | |
| Unreal | 100-226 | 61/000 | | ✅ | ✅ | ✅ |
| Hired Guns | 216 | 61/000 | | ✅ | ✅ | ✅ |
| Star Trek: The Next Generation: Klingon Honor Guard | 219 | 61/000 | | ✅ | ✅ | ✅ |
| X-COM: Alliance | 200-220 | 61/000 | 函数开始处(BeginFunctionToken)输出错误 | ✅ | ✅ | ✅ |
| Dr. Brain: Action Reaction | 224 | 63-68/000 | | ✅ | ✅ | ✅ |
| Nerf Arena Blast | 225 | 63-68/000 | | ✅ |
| The Wheel of Time | 225:WoT | 63-68/000 | | ✅ | ✅ | ✅ |
| Unreal Mission Pack: Return to Na Pali | 226b | 68/000 | | ✅ | ✅ | ✅ |
| Unreal Tournament | 338-436 | 68-69/000 | | ✅ | ✅ | ✅ |
| Deus Ex | 400-436 | 68/000 | | ✅ |
| Jazz Jackrabbit 3D | 400 | 68/000 | | ✅ | ✅ | ✅ |
| Duke Nukem Forever (2001) | 613 | 68/002 | UStruct 偏移量错误导致输出代码错误 | ✅ ||
| Rune | 400 | 69/000 | | ✅ |
| Unrealty | 405 | 69/000 | | ✅ |
| Adventure Pinball: Forgotten Island | 420 | 69/000 | | ✅ | ✅ | ✅
| X-COM: Enforcer | 420 | 69/000 | | ✅ | ✅ | ✅ |
| Tactical Ops: Assault on Terror | 436 | 69/000 | | ✅ |
| Star Trek: Deep Space Nine: The Fallen | 338 | 73/000 | | ✅ |
| Harry Potter and the Sorcerer's Stone | 436 | 76/000 | | ✅ |
| Harry Potter and the Chamber of Secrets | 433 | 79/000 | | ✅ |
| Disney's Brother Bear | 433 | 80/000 | [链接](https://github.com/metallicafan212/HarryPotterUnrealWiki/wiki/Main-Resources#other-kw-games) | ✅ |
| Mobile Forces | 436 | 81-83/000, 69 | | ✅ |
| Clive Barker's Undying | 420 | 72-85/000 | 72 到 83 版本无法自动检测。 | ✅ | ✅ | ✅ |
| Deus Ex: Invisible War | 777:Flesh | 95/069 | 部分归功于 @hanfling;不支持 LinkedData | ✅ |
| Thief: Deadly Shadows | 777:Flesh | 95/133 | 部分归功于 @hanfling;不支持 LinkedData | ✅ | | ❌ |
| | | | |
| **Unreal Engine 2** | | | | ✅ | ✅ | ✅ |
| | | | |
| XIII | 829 | 100/058 | | ✅ |
| Tom Clancy's Splinter Cell | 829 | 100/017 | | ✅ |
| Tom Clancy's Splinter Cell: Pandora Tomorrow | 829 | 102/028:SCX | PC 离线版本 | ✅ |
| Tom Clancy's Splinter Cell: Chaos Theory | 829 | 100/120:SCX, 175/000:ShadowStrike | (PS3)版本和(PC)演示版本, Versus 模式不受支持 | ✅ | | ✅ |
| Tom Clancy's Splinter Cell: Double Agent | 829 | 100/167:SCX, 275/000:ShadowStrike | (PC)离线模式版本,在线模式不受支持 | ✅ |
| Tom Clancy's Splinter Cell: Blacklist | 829 | 102/116:LEAD | 部分归功于 @shryder。需要第三方解压缩 | ✅ |
| Tom Clancy's Rainbow Six 3: Raven Shield | 600-927 | 118/012-014 | | ✅ | ✅ |
| Magic: The Gathering - Battlegrounds | 926 | 118/000 | | ✅ | ✅ | ✅
| Postal 2: Paradise Lost | 1417 | 118/002 | | ✅ |
| Unreal Tournament 2003 | 1077-2225 | 119/025 | | ✅ | ✅ | ✅ |
| Devastation | 600-? | 118-120/004-008 | | ✅ | ✅ | ✅ |
| Dead Man's Hand | 2110 | 123/002 | | ✅ | ✅ | ✅ |
| Unreal II: The Awakening | 829-2001 | 126/2609 | | ✅ |
| Unreal II: eXpanded MultiPlayer | 2226 | 126/000 | 自定义功能无法反编译 | ✅ |
| Desert Thunder | 2226 | 126/000 | | ✅ |
| Marine Heavy Gunner: Vietnam | 2226 | 126/000 | | ✅ | ✅ | ✅ |
| Land of the Dead: Road to Fiddler's Green | 2226 | 126/001 | | ✅ | ✅ | ✅ |
| Netherworld: Beyond Time I Stand | 2226 | 127/002 | 属性反序列化错误 | ✅ | ✅ | ✅ |
| Unreal Tournament 2004 | 3120-3369 | 128/029 | | ✅ | ✅ | ✅ |
| Red Orchestra: Ostfront 41-45 | 3323-3369 | 128/029 | | ✅ | ✅ |
| Killing Floor | 3369 | 128/029 | | ✅ | ✅ |
| D.M.Z.: North Korea | 3369 | 128/029 | | ✅ | ✅ | ✅ |
| Close Quarters Conflict | 3369 | 128/029 | | ✅ | ✅ | ✅ |
| Outlaw Chopper | 3369 | 128/029 | | ✅ | ✅ | ✅ |
| Marine Sharpshooter 3 | 3369 | 128/029 | | ✅ | ✅ | ✅ |
| Marine Sharpshooter 4: Locked and Loaded | 3369 | 128/029 | | ✅ | ✅ | ✅ |
| Mission Biotech | 3369 | 128/029 | | ✅ | ✅ | ✅ |
| America's Army 2 | 3339 | 128/032:033 | 2.5, 2.6, 2.8 | ✅ |
| America's Army (Arcade) | 3339 | 128/032 | 2.6 | ✅ |
| Harry Potter and the Prisoner of Azkaban | 2226 | 129/000 | [链接](https://github.com/metallicafan212/HarryPotterUnrealWiki/wiki/Main-Resources#hp3) | ✅ |
| Shrek 2 | 2226 | 129/000 | | ✅ |
| Shark Tale | 2226 | 129/003 | | ✅ |
| Lemony Snicket's A Series of Unfortunate Events | 2226 | 129/003 | | ✅ |
| Combat: Task Force 121 | 2110 | 129/010 | | ✅ | ✅ | ✅ |
| Shadow Ops: Red Mercury | 2110 | 129/010 | | ✅ | ✅ | ✅ |
| World War II Combat: Road to Berlin | 2110 | 129/010 | | ✅ | ✅ | ✅ |
| World War II Combat: Iwo Jima | 2110 | 129/010 | | ✅ | ✅ | ✅ |
| Swat 4 | 2226:Vengeance | 129/027 | | ✅ |
| Vanguard: Saga of Heroes | 2226 | 129/035 | | ✅ |
| Stargate SG1: The Alliance | 4180 | 130/004 | | ✅ |
| Tribes: Vengeance | 2226:Vengeance | 130/027 | | ✅ |
| Bioshock | 2226:Vengeance | 130-141/056 | | ✅ |
| Arctic Combat | 3369 | 134/038-039 | 部分归功于 @EDITzDev。需要第三方解压缩 | ✅ | ✅ | ✅ |
| Star Wars: Republic Commando | 2226 | 134-159/001 | | ✅ |
| The Regiment | 2226 | 136/000 | | ✅ | ✅ | ✅ |
| Men of Valor | 926 | 137/000 | PC | ✅ |
| Bioshock 2 | 2226:Vengeance | 143/059 | | ✅ |
| Advent Rising | 2226 | 143-146/007 | | ✅ | ✅ | ✅ |
| Unreal Championship 2: Liandri Conflict | 3323 | 151/002 | [第三方](https://forums.beyondunreal.com/threads/unreal-championship-2-script-decompiler-release.206036/) | ✅ |
| Duke Nukem Forever (2011) | 原始 UE1 并升级到 UE2&3 | 156/036 | [需要提取](https://github.com/DaZombieKiller/MegaPackageExtractor) | ✅ | ❌ | ✅ |
| | | | |
| **Unreal Engine 3** | | | | ✅ | ✅ | ✅ |
| | | | |
| RoboHordes | 未知 | 198-200/000 | | ✅ | ✅ | ✅ |
| Tom Clancy's Rainbow Six: Vegas | 未知 | 241/066 | | ✅ |
| Tom Clancy's Rainbow Six: Vegas 2 | 未知 | 241/071 | | ✅ |
| Tom Clancy's EndWar | 未知 | 329/000 | | ✅ |
| Roboblitz | 2306 | 369/006 | | ✅ | ✅ | ✅ |
| Stranglehold | 2605 | 375/025 | | ✅ | | ✅ |
| TNA Impact! | 2605 | 380/035 | Xenon(平台必须设置为“PC”) | ✅ | | ✅ |
| Mass Effect (Xbox 360) | 2674 | 391/092 | Xenon | ✅ |
| Warmonger: Operation Downtown Destruction | 2859 | 419/003 | | ✅ |
| Medal of Honor: Airborne | 2859 | 421/011 | | ✅ | | ✅ |
| Frontlines: Fuel of War | 2917 | 433/052 | | ✅ |
| Army of Two | 3004 | 445/079 | 总体质量尚未验证 | ✅ |
| Mortal Kombat Komplete Edition | 2605 | 472/046 | | ✅ |
| Stargate Worlds | 3004 | 486/007 | | ✅ |
| Gears of War | 3329 | 490/009 | | ✅ |
| Mass Effect (Windows) | 3240 | 491/1008(~112) | PC | ✅ |
| Huxley | 3240 | 496/016-023 | 由 @EDITzDev 贡献 | ✅ | ✅ | ✅ |
| Robert Ludlum's The Bourne Conspiracy | | 511/039 | | ✅ |
| Transformers: War for Cybertron | | 511/144,145 | PC, PS3, Xenon | ✅ |
| Unreal Tournament 3 | 3809 | 512/000 | | ✅ |
| Mirrors Edge | 3716 | 536/043 | | ✅ |
| Alpha Protocol | 3857 | 539/091 | | ✅ |
| APB: All Points Bulletin | 3908 | 547/028-032 | | ✅ |
| X-Men Origins: Wolverine | 4206 | 568/101 | 总体质量尚未验证 | ✅ |
| Gears of War 2 | 4638 | 575/000 | | ✅ |
| CrimeCraft | 4701 576/005 | | ✅ |
| Batman: Arkham Asylum | 4701 | 576/21 | 由 @etkramer 贡献 | ✅ |
| Medal of Honor (2010) | 100075??? | 581/058 | 字节码错误 | ✅ | | ❌ |
| Saw | 4869 | 584/003 | | ✅ | ✅ | ✅ |
| Singularity | 4869 | 584/126 | | ✅ |
| MoonBase Alpha | 4947 | 587/000 | | ✅ |
| The Exiled Realm of Arborea or TERA | 4206 | 610/014 | | ✅ |
| Monday Night Combat | 5697 | 638/000 | | ✅ |
| DC Universe Online | 5859 | 638/6405 | 由 @theFoof 贡献 | ✅ |
| Unreal Development Kit | 5860-12791 | 664-868 | | ✅ | ✅ | ✅ |
| Blacklight: Tango Down | 6165 | 673/002 | | ✅ | | ✅ |
| Saw II: Flesh & Blood | 6165 | 673/004 | 不受支持,但可加载 | ❌ | ❌ | ❌ |
| Dungeons & Dragons: Daggerdale | 6165 | 674/000 | | ✅ |
| Dungeon Defenders | 6262 | 678/002 | | ✅ | ✅ | ✅ |
| Mass Effect 3 (Windows) | 6383 | 684/194 | PC(平台必须设置为“控制台”) | ✅ |
| Mass Effect: Legendary Edition (Windows) | 6383 | 684/171 | PC(平台必须设置为“控制台”) | ✅ |
| Alice Madness Returns | 6760 | 690/000 | | ✅ |
| The Ball | 6699 | 706/000 | | ✅ |
| Game of Thrones | 6829 | 727/000 | | ✅ |
| Bioshock Infinite | 6829 |
标签:Amass, API, MIT 许可, NuGet, Unreal Engine, UnrealScript, URL提取, 二进制文件, 云资产清单, 使用示例, 反序列化, 反编译, 声音, 多人体追踪, 字体, 安装, 序列化, 数据包解析, 数据结构, 文件格式, 文档, 模型, 游戏开发, 游戏资源, 演示模式, 纹理, 组件, 调色板, 逆向工程