# 众神派对

**URL:** <https://live2dhub.com/t/topic/6599>\
**Category:** 教学\
**Created:** [2026 年11 月 4 日 12:06 UTC](https://live2dhub.com/t/topic/6599 "2026-11-04T12:06:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

作者： ![bai2001](https://live2dhub.com/letter_avatar_proxy/v4/letter/b/b5a626/32.png) [@bai2001](https://live2dhub.com/u/bai2001)\
发布日期： [2026 年11 月 4 日 12:06 UTC](https://live2dhub.com/t/topic/6599/1 "2026-11-04T12:06:42Z")

</div>

# 众神派对（Dislyte PC）解包

声明：本文仅用于个人技术学习与资料归档，请勿用于任何商业用途或二次分发原作素材，请支持正版。所涉脚本只处理你本人合法获取的本地文件。

* * *

## 适用版本（务必核对）

- 游戏：Dislyte PC 版（Lilith 定制 UE4 引擎分支，序列化 = UE 4.24）
- pak：`pakchunk0 / pakchunk9754 / pakchunk9801-WindowsNoEditor.pak`（约 7.3 万文件）
- Spine 骨骼：3.8；3D 动画压缩：ACL 1.x `compressed_clip`

## 密钥与常数总表（全部）

| 用途 | 值 |
| --- | --- |
| pak AES-256-ECB 密钥 | `f63d5dae26e583b0c768f3f4eacc16c08831c8533998919a2bf02d1fdfc15d8c` |
| 引擎版本 | GAME\_UE4\_24（包为 unversioned，FileVersionUE4=0） |
| 视频加密 | 16 字节 GUID 头 + **AES-256-ECB（同一个 pak 密钥）整文件** ，解出标准 mp4 |
| 动画流签名 | `compressed_clip` tag = `0xAC10AC10`（ACL pre-2.0 旧格式，不是 tracks/ACL0） |
| UE 侧枚举 | `AnimationKeyFormat` 值 3 = Lilith 扩展的 `AKF_ACLSafe` |
| ACL 源码版本 | acl-ue4-plugin **v1.0.0** 的 submodule → acl commit `3d9cb346d2c3229132070062f7a51a53ecba4413` |
| 解压输出 | Transform\_32 = 48B：quat(4f) + pos(3f) + scale(3f) + pad(8B) |

## 环境

```auto
pip install UnityPy lz4 Pillow ziglang pycryptodome
工具：7-Zip、SpineViewer（支持 3.8）、Node（可选，GLB 校验）

```

## 流程

### 1. 挂载 pak（3D 模型/动画/音频/Lua 全在这里）

用 **CUE4Parse 1.2.2** + `GAME_UE4_24` + 上表 AES 密钥，直接 RegisterVfs 三个 pak。FModel 亦可（选 UE4.24 + 同密钥）。

坑：CUE4Parse 1.2.2 的 `ExportSession.RunAsync` 会静默丢弃入队任务（263 入队仅 1 执行，无任何报错）—— **绕过方法** ：不跑 session，直接 `SkeletalMeshDto(mesh, options)` + `GltfMeshFormat().BuildSkeletalMesh(...)` 手写导出。LODModels 含 null 条目需反射剔除。贴图要嵌入 GLB 就把 `ExportMaterials=true`。

### 2. Spine 三件套（容器在 XGame/Content/Characters/\*/Spine）

bundle 不加密，是 UE 序列化容器，规律（6 样本+全量验证）：

- container 的 uexp：atlas 文本 FString 头固定 `@66`，decl\_len = 真实长度 + 1 字节垃圾 `\x00`；skel 二进制起点用自洽方程 `d[s] == vpos - 1 - s`（vpos=版本串位置）唯一解
- Texture2D 的 uexp：PF 串搜前 512B；`SizeX/SizeY = PF前 int32 @-16/-12/-8`；mip0 bulk 头从 PF 串尾向后扫（`elemCount@off==payload && sizeOnDisk@off+4==payload`）； **bulk\_start = OffsetInFile − uasset 长度（usize，不是 size）** ；尾部字节数不恒定（只取 mip0 无影响）
- atlas 缩放：region 的 xy/orig/offset/size 全部 × `png宽/declared页宽`；写 `\r\n` + 尾换行

### 3. 战斗动画

动画流（AnimSequence 的 CompressedByteStream）= **ACL 1.x compressed\_clip** ，头结构：

```auto
+0 u32 size(=流长) +4 u32 hash +8 u32 tag=0xAC10AC10
+12 u16 version=5 +14 u8 alg +15 u8 track_type
+16 u16 num_bones +18 u16 num_segments
+20..27 格式字节(rot/trans/scale/clip_rr/seg_rr/has_scale/default_scale/pad)
+28 u32 num_samples +32 f32 sample_rate +36.. 6 个 PtrOffset16

```

SegmentHeader 在 clip header 后（ **没有 num\_samples 字段** ，统一用 clip 头里的）：`animated_pose_bit_size u32 + 3 个 PtrOffset32`。

解压三步：

1. 拿 ACL 源码：`git clone -b v1.0.0 --recurse-submodules ` [GitHub - nfrechette/acl-ue4-plugin: The official Animation Compression Library Unreal Engine 4 and 5 plugin · GitHub](https://github.com/nfrechette/acl-ue4-plugin) ，submodule 指向的 acl commit 即上表那个（对应 includes/acl/compression/compressed\_clip.h 的头结构）
2. 写 main.cpp：`acl::uniformly_sampled::DecompressionContext<uniformly_sampled::DecompressionSettings>`（ **用基类全格式设置** ，Default 只支持可变比特率，rot=0 的 clip 会段错误）+ `DefaultOutputWriter`，逐帧 seek+decompress\_pose
3. 编译：`python -m ziglang c++ -O3 -target x86_64-windows-gnu -std=c++11 -I <acl>/includes main.cpp -o acl_decomp.exe`

骨骼映射：TrackToSkeletonMapTable（tagged 数组）在动画 uexp 中 = `[int32 count==轨道数][N 个 int32 骨骼树索引]`，扫描时 **不要按 4 对齐** ，按非降序比例评分取最优。然后把解压出的 quat/pos 按 glTF animation 通道写回角色 GLB（rotation+translation，scale 恒为 1 可省略）。

### 4. 加密视频

pak 里的 mp4 不是裸 mp4：`16B GUID + AES-256-ECB(密文)`，密钥就是 pak 密钥，整文件 ECB 解密（尾部不足 16 字节保留原文）→ 标准 ftyp/mp4。

### 5. Lua / 中文表

`XGame/Content/Lua/**.lua` 直接提取即可（1.1 万个纯文本）。中文主表在 `Table/Localize/zh-CN.csv` + `TableArea/CN/`，角色总表 `Unit.csv`。

### 6. 自制 paklib 注意（如果你不走 CUE4Parse）

自写 pak 读取器时： **未压缩条目（ci=0）也有 per-entry 加密位** ——index 记录尾部 5 字节中的 flags u32 bit0=1 表示该条目数据是 AES-ECB 加密的（全 pak 1345 个此类条目全部加密），解密 16 对齐主体后即可。

## 给 AI 的复现提示（每步直接丢给 AI）

1. “用 CUE4Parse 1.2.2 挂载 Dislyte 三个 pak（UE4.24 unversioned，密钥见表），绕过 ExportSession 直接用 SkeletalMeshDto+GltfMeshFormat 导出 \_Skin 为 glb，ExportMaterials=true”
2. “按上面容器规律从 Spine container uexp 切出 atlas/skel/png，atlas 按 pngW/declW 缩放”
3. “按 clip 头结构解析动画流，用 zig 编译 ACL 1.x（commit 3d9cb34）源码做 uniformly\_sampled 全格式解压器，输出每帧每骨 quat/pos”
4. “uexp 扫 [count==轨道数][N 个骨骼索引] 窗口（步长 1、非降序评分）取 track map，注入 glTF animation”
5. “mp4 文件去 16 字节头后 AES-256-ECB 解密”

## 常见坑对照

| 现象 | 原因 | 解决 |
| --- | --- | --- |
| FModel/CUE4Parse 打不开 | 版本选错 | 必须 UE4.24（4.25+ 顶点缓冲为空） |
| 导出任务静默丢失 | ExportSession bug | 绕过，直连 DTO→Format |
| 动画解压器段错误 | 用了 ACL 2.x / 默认设置 | 换 commit 3d9cb34 源码 + 全格式 Settings |
| tag 0xAC10AC10 被当成 ACL 校验失败 | 这是旧版 clip 格式 | 用 compressed\_clip 头结构解析 |
| 部分动画数据乱 | 自写 pak 读取器漏了 ci=0 条目加密位 | flags bit0 → AES-ECB 解密 |
| GLB 里没贴图 | ExportMaterials=false | 打开即可，贴图自动嵌入 |
| \_dark 角色没贴图 | 材质资产发行时被剥离 | 无解，资源本就不在包里 |
| skel/atlas 乱码 | 用了 get\_raw\_data() | 用 m\_Script |
| | | |

 ![spine_Frigga](https://live2dhub.com/uploads/default/original/2X/5/589e08ad20a727cb7885b34a081763d3b4779cf2.jpeg)

 ![spine_Valkyrie_NoWing](https://live2dhub.com/uploads/default/original/2X/4/471f13d3427e6afa9c5d87cf1a496d2fec147edb.jpeg)
