给服务器上新车,流程永远是:开 OpenIV → 翻三层 RPF → 把 yft / ytd 一个个导出来 →
再手写一份 fxmanifest.lua,data_file 类型写错一个就进游戏看黑车。
一台车二十分钟,十台车一晚上。
做烦了,就把这套流程写成了工具。拖进去,出来就是能 ensure 的目录。
第二个触发点更疼。有个包同时带 Legacy/ 和 Enhanced/ 两份 dlc.rpf,
我按文件名去重、先到先得,把 Enhanced(Gen9) 的 ytd 塞进了 stream/——
进游戏直接 Invalid fixup, address is neither virtual nor physical。
翻进去才发现 FiveM 跑的是原版引擎,Gen9 的页标志和 fixup 布局根本不是一套东西。
现在工具会按路径段识别代际,强制取 Legacy,并在转换记录里写清楚为什么。
Why. Every vehicle added to a server meant OpenIV, three nested RPFs, manually
exported yft/ytd files, and a hand-written fxmanifest.lua — one wrong
data_file type and you restart to find a black car. Twenty minutes per vehicle.
Forge is that pipeline as a tool. The second push was a pack shipping both
Legacy/ and Enhanced/ DLCs: picking the Gen9 copy produced
Invalid fixup, address is neither virtual nor physical, because FiveM runs the
Gen8 engine. Forge now detects the generation, always takes Legacy, and says so
in the conversion log.
25silverado_pack.zip
│ 解压 → 递归拆 RPF(嵌套 RPF / 裸 deflate / 资源条目)
▼
yft · ytd · yld → stream/
vehicles · carvariations · carcols · handling · vehiclelayouts
→ data/ + fxmanifest 里的 data_file 声明
content.xml · setup2.xml · lang 语言包 · dlctext.meta
→ 丢弃(单机专用)
▼
25silver_pack/ + README.md + (可选)zip
生成结果自带 README.md(安装步骤、车辆表、转换记录),结果页直接给出可复制的 ensure 行。
- 递归拆包:
dlc.rpf里套x64/vehicles.rpf也拆到底;支持明文 TOC、裸 deflate、二进制与资源两种条目。 - Gen8 / Gen9 判别:
Legacy/与Enhanced/并存时强制取 Legacy,避免Invalid fixup。 - meta 不挑路径:
data/、common/data/、common/data/levels/gta5/都能认。 - 冲突自愈:多个包抢同一个套件 id 时自动让号,并同步改
carvariations的引用。 - 避坑:原版
vehiclelayouts.meta完整副本(>200 条布局)跳过,不覆盖基础布局;空壳*_mods.rpf直接忽略。 - 可选开关:把
0_default_modkit接回车包自带套件;同时输出 zip。 - 中英双语:界面、转换日志、生成的 README 跟随语言设置。
- 纯本地:不联网、不上传,解析全在本机。
| 版本 | 文件 | 说明 |
|---|---|---|
| 安装版 | Forge-Setup-1.1.0.exe |
78 MB。向导可选安装盘符与目录,建桌面 / 开始菜单快捷方式 |
| 免安装版 | Forge-Portable-1.1.0.exe |
72 MB。单文件,双击即用,不写注册表 |
去 Releases 下载。安装版默认装到 %LOCALAPPDATA%\Programs\Forge,在向导里可以改成 D:\Tools\Forge 之类。
- 拖入
.7z/.zip/.rar/dlc.rpf,或直接拖文件夹。 - 队列里可改资源名,留空则按车包名自动生成。
- 点「开始转换」,完成后结果页给车辆列表、
ensure行、转换记录。 - 「打开文件夹」→ 把资源目录放进服务器
resources/→ensure行写进server.cfg。
首次启动有四步引导;想重看:设置 → 帮助 → 重新查看新手引导。
![]() |
![]() |
RPF7 容器全部在 src/rpf.js,零依赖:
| 结构 | 布局 |
|---|---|
| 头部 16B | magic 0x52504637 · entryCount · namesLen(低 28 位) · encryption(OPEN / AES / NG) |
| 目录项 16B | u32 nameOff · 0x7FFFFF00 · u32 index · u32 count |
| 二进制项 16B | u16 nameOff · u24 size · u24 offset · u32 uncompressed · u32 enc |
| 资源项 16B | u16 nameOff · u24 size · u24 offset · u32 sysFlags · u32 gfxFlags |
三个容易踩的点:
- 资源条目偏移要
& 0x7FFFFF:第 23 位是条目类型标签,单位 512 字节。 size == 0表示不压缩,否则是裸 deflate(无 zlib 头),得用inflateRaw。- 名字堆基准可能有 1 字节偏移,取名时回退到上一个
\0起点最稳。
npm install
npm start # 开发运行
npm run selftest # 引擎回归(合成 RPF + 真实车包)
npm run smoke # 渲染进程冒烟:exit=0 且 problems 为空
npm run dist # 出安装版 + 免安装版 → dist/环境 Node 18+ / Windows x64。首次 npm run dist 会拉 NSIS 与 winCodeSign,国内网络:
export ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/"
export ELECTRON_BUILDER_BINARIES_MIRROR="https://npmmirror.com/mirrors/electron-builder-binaries/"测试分两层:selftest 用手写的 RPF7 构造器造样例,再拿真实车包做回归(模型数、meta 数、
套件让号、stream/ 全是 RSC7);smoke 在真窗口里跑一遍引导、语言切换、队列、
结果页、设置抽屉,抛出 problems 数组,非空即失败。
发布到 GitHub(建仓库、推源码、建 Release、传两个 exe,一条命令):
GITHUB_TOKEN=ghp_xxx node scripts/publish.js进游戏报 Invalid fixup, address is neither virtual nor physical?
拿错了代际资产。1.0.2 之前会误取 Enhanced/;升级后重转即可。
车刷不出来 / 没有改装项?
看结果页转换记录:没有 vehicles.meta 的包不会注册成车;*_mods.rpf 是空壳时本来就没有外观件。
加密 RPF?
AES / NG 需要密钥,工具会明确报错并跳过,不会产出空资源。
日志?
%APPDATA%\Forge\forge.log。
MIT © 2026 oulu
随包分发:Electron(MIT)、7-Zip(LGPL,见 bin/7-Zip-License.txt)。
Forge converts GTA V add-on vehicle packs into FiveM resources. Drop a
.7z / .zip / .rar / dlc.rpf in, get stream/, data/, a generated
fxmanifest.lua and a README.md you can ship.
- Recursive RPF7 extraction — nested containers, raw deflate, binary and resource entries.
- Picks
Legacy/overEnhanced/automatically; Gen9 assets make FiveM throwInvalid fixup. - Finds metas anywhere (
data/,common/data/,common/data/levels/gta5/). - Renumbers colliding mod-kit ids and keeps
carvariationsin sync. - Skips stock
vehiclelayouts.metacopies so base layouts stay intact. - Chinese + English UI, logs and generated README. Everything local.
Install: Forge-Setup-1.1.0.exe (78 MB, wizard lets you pick the drive and folder,
creates shortcuts) or Forge-Portable-1.1.0.exe (72 MB, single file, no install).
Build: npm install && npm run dist. Tests: npm run selftest, npm run smoke.
MIT © 2026 oulu.


