diff --git a/mod-docs.html b/mod-docs.html index 565c76a..ff31577 100644 --- a/mod-docs.html +++ b/mod-docs.html @@ -148,7 +148,9 @@
备份目录说明:
<游戏副本>/wtoffline/stock/是启动器用来重建和还原纯净客户端的原版备份目录,请按只读方式对待,不要手动修改或覆盖其中的文件,以免影响关闭模组后的自动还原。所有模组改动都放在mods/<你的模组>/下即可。
你可以根据自己的习惯,直接从本机原版客户端查阅 .blk、.csv 和 .nut 文件:
char.vromfs.bin、aces.vromfs.bin、gui.vromfs.bin 等归档复制到单独的临时工作文件夹(不要在游戏目录原地解包),使用常见的 .vromfs.bin / .blk 社区解包工具提取目录并将二进制 .blk 转为可读文本,即可查找任意载具的内部 ID、科技树路径和字段名。@wto/vromfs 与 @wto/blk 读取任意原版包内的二进制 .blk 并打印为标准文本 BLK:char.vromfs.bin、aces.vromfs.bin、gui.vromfs.bin 等归档复制到单独的临时工作文件夹(不要在游戏目录原地解包),使用常见的 .vromfs.bin / .blk 社区解包工具提取目录并将二进制 .blk 转为可读文本,即可查找任意载具的内部 ID、科技树路径和字段名。@wto/vromfs 与 @wto/blk 读取任意原版包内的二进制 .blk 并打印为标准文本 BLK:import { readFileSync } from 'node:fs';
import { getFile, NAME_MAP_PATH, readArchive } from './packages/vromfs/src/index.ts';
import { decodeBlk, formatBlkText, parseSharedNameMap } from './packages/blk/src/index.ts';
@@ -202,7 +204,7 @@ console.log(formatBlkText(decodeBlk(getFile(ar, 'config/wpcost.blk'), { names: a
├─ gui-patches/ # GUI 脚本/模板/样式增量补丁(与本体 patches/gui 同格式)
├─ exe-patches/ # 声明式 exe 补丁(与本体 patches/exe 同格式)
├─ files/ # 可选:大型整合包附带的配套涂装/瞄具/音效/任务
- └─ config-blk.patch.jsonc # 可选:游戏根目录 config.blk 的增量补丁mod.jsonc 全字段参考清单元数据解析采用严格白名单校验,写错字段名或出现未定义字段会被直接拒绝,并在启动器报错区显示具体原因。
@@ -210,7 +212,7 @@ console.log(formatBlkText(decodeBlk(getFile(ar, 'config/wpcost.blk'), { names: a启动器扫描模组目录后会自动计算并展示能力徽标。徽标是多选累加(非互斥)的——例如同时包含数据包修改与服务端脚本的模组会同时显示 data 和 script 两个徽标,而 official-map-selector 会同时显示 data、gui、script 三个徽标:
data):包含 server/tuning/、client/packs/、client/addon/、client/files/ 或 client/config-blk.patch.jsonc(若模组仅含清单且无 gui/script/exe,也默认归类显示 data);gui):包含 client/gui-patches/;script):包含可执行服务端 JS/TS 入口脚本;exe):包含 client/exe-patches/(高风险,且受离线核心隔离补丁锁保护)。data):包含 server/tuning/、client/packs/、client/addon/、client/files/ 或 client/config-blk.patch.blk(/ .patch.jsonc)(若模组仅含清单且无 gui/script/exe,也默认归类显示 data);gui):包含 client/gui-patches/;script):包含可执行服务端 JS/TS 入口脚本;exe):包含 client/exe-patches/(高风险,且受离线核心隔离补丁锁保护)。requires、load_after 与 load_before 进行拓扑排序;info):两个模组对同一个 BLK / CSV / tuning 文件做增量补丁时,按顺序先后安全叠加;warning):模组排在了 requires / load_after 目标之前、目标游戏版本不匹配、或后序模组用整文件替换了前序模组修改过的数据包文件/外置配套文件;error):缺少 requires 前置模组、前置模组未启用、或同时启用了声明 conflicts 互斥的模组时,启动器禁止启动并高亮提示处理。Target Spec:
format: 1·api_version: "0.1-experimental"(experimental API; subject to breaking changes as core development progresses)
WTOffline uses a stackable, load-order additive mod architecture. Mods supply incremental patches and added files to the client and server, and do not replace whole stock .vromfs.bin archives:
<copy>/wtoffline/stock/), applies core offline patches first, and then layers every enabled mod's client patches and added files in the exact order shown on the Mods page;server/tuning/*.jsonc in the same order, and loads server/index.ts scripts;wtoffline/stock/ without corrupting the client copy.<copy>/wtoffline/stock/), applies core offline patches first, and then layers every enabled mod's client patches and added files in the exact order shown on the Mods page;server/tuning/*.jsonc in the same order, and loads server/index.ts scripts;wtoffline/stock/ without corrupting the client copy.%APPDATA%\WTOffline Launcher\mods (configurable to any drive under Mods › Presets & repository).mods/ folder, it automatically seeds example-vehicle-tweak (code-free vehicle & localization tweak), example-server-script (minimal server TypeScript mod), and official-map-selector (full-stack native DaGui modal + server map filter), all disabled by default. Click Mods › Open mods folder right away to inspect their code or duplicate one as a starting point!<dataFolder>/mods-config.json.Note on the backup folder: Treat
<copy>/wtoffline/stock/as read-only. The launcher relies onwtoffline/stock/to rebuild overlays and restore clean files when mods are disabled; modifying files insidestock/can prevent automatic restoration. Place all mod changes undermods/<your-mod>/.
You can inspect stock .blk, .csv, and .nut files directly from your own local game installation:
char.vromfs.bin, aces.vromfs.bin, or gui.vromfs.bin from your client into a separate scratch folder (avoid unpacking in-place inside the game directory) and use standard community .vromfs.bin / .blk unpacking tools to extract readable text .blk and .nut files, vehicle IDs, and tech-tree paths.@wto/vromfs + @wto/blk (if you cloned the WTOffline repo): If you have the WTOffline repository checked out locally, run Node 24 from the repo root to decode any binary .blk straight out of a .vromfs.bin archive and print formatted text BLK:char.vromfs.bin, aces.vromfs.bin, or gui.vromfs.bin from your client into a separate scratch folder (avoid unpacking in-place inside the game directory) and use standard community .vromfs.bin / .blk unpacking tools to extract readable text .blk and .nut files, vehicle IDs, and tech-tree paths.@wto/vromfs + @wto/blk (if you cloned the WTOffline repo):
+If you have the WTOffline repository checked out locally, run Node 24 from the repo root to decode any binary .blk straight out of a .vromfs.bin archive and print formatted text BLK:import { readFileSync } from 'node:fs';
import { getFile, NAME_MAP_PATH, readArchive } from './packages/vromfs/src/index.ts';
import { decodeBlk, formatBlkText, parseSharedNameMap } from './packages/blk/src/index.ts';
@@ -285,7 +289,7 @@ console.log(formatBlkText(decodeBlk(getFile(ar, 'config/wpcost.blk'), { names: a
├─ gui-patches/ # incremental GUI script/tpl/css patches (same format as patches/gui)
├─ exe-patches/ # declarative exe patches (same format as patches/exe)
├─ files/ # optional companion skins/sights/sounds/missions
- └─ config-blk.patch.jsonc # optional root config.blk incremental patchmod.jsonc Schema ReferenceManifest parsing enforces strict whitelist validation: typos or unknown keys are rejected immediately with a detailed error message on the Launcher Mods page.
@@ -293,10 +297,10 @@ console.log(formatBlkText(decodeBlk(getFile(ar, 'config/wpcost.blk'), { names: aAfter scanning each mod folder, the launcher computes capability badges automatically. Badges are additive, not mutually exclusive—for example, a mod with pack overlays and a server script displays both data and script, while official-map-selector displays data, gui, and script:
data): contains server/tuning/, client/packs/, client/addon/, client/files/, or client/config-blk.patch.jsonc (a manifest-only mod with none of gui/script/exe also defaults to data);gui): contains client/gui-patches/;script): contains an executable server JS/TS entry script;exe): contains client/exe-patches/ (high-risk; guarded by the core offline isolation patch lock).data): contains server/tuning/, client/packs/, client/addon/, client/files/, or client/config-blk.patch.blk (or .patch.jsonc) (a manifest-only mod with none of gui/script/exe also defaults to data);gui): contains client/gui-patches/;script): contains an executable server JS/TS entry script;exe): contains client/exe-patches/ (high-risk; guarded by the core offline isolation patch lock).requires, load_after, and load_before together;info): when multiple mods patch the same BLK, CSV, or tuning file, their edits stack cleanly in load order;warning): emitted when a mod sits above a requires / load_after target, mismatches game_versions, or replaces an entire pack/companion file already modified by an earlier mod;error): missing requires dependencies, disabled dependencies, or simultaneously enabled conflicts prevent launch and highlight the exact items to fix.requires, load_after, and load_before together;info): when multiple mods patch the same BLK, CSV, or tuning file, their edits stack cleanly in load order;warning): emitted when a mod sits above a requires / load_after target, mismatches game_versions, or replaces an entire pack/companion file already modified by an earlier mod;error): missing requires dependencies, disabled dependencies, or simultaneously enabled conflicts prevent launch and highlight the exact items to fix.Dagor 引擎使用自研的 BLK(DataBlock) 格式存储几乎所有游戏配置(在数据包内编译为紧凑二进制,解包后可读为文本 .blk)。初看很像 JSON,但它有三个关键差异:
:i(32 位整数)、:r(单精度浮点)、:t(字符串)、:b(布尔 yes/no);把 :r 误写成 :i 会导致引擎读不到小数参数;slaveUnit:t="launcher_a" 下面紧跟第二行 slaveUnit:t="launcher_b"(如果直接转成普通 JSON 对象,前一行就会被后一行覆盖丢失!);shop.blk,每个陆军/空军分支下并列着好几个同名的 range { ... } 子块。对比下面这段 8 行原版文本 .blk(节选自 wpcost.blk 的 us_m2a4)与对应的 .blk.patch.jsonc 增量补丁,你立刻就能看懂两者的对应关系:
对比下面这段 8 行原版文本 .blk(节选自 wpcost.blk 的 us_m2a4)与对应的 .blk.patch.blk 增量补丁,你立刻就能看懂两者的对应关系:
// 原版可读文本 BLK(char.vromfs.bin -> config/wpcost.blk 节选)
us_m2a4 {
value:i = 0
@@ -322,38 +326,51 @@ us_m2a4 {
country:t = "country_usa"
unitClass:t = "exp_tank"
}// 对应的增量补丁:client/packs/char.vromfs.bin/config/wpcost.blk.patch.jsonc
+blk// 对应的增量补丁(推荐格式):client/packs/char.vromfs.bin/config/wpcost.blk.patch.blk
// 只修改 us_m2a4 的历史模式收益倍率,不会影响其他模组对别的字段或载具的改动
-{
- "ops": [
- {
- "op": "setParam",
- "path": ["us_m2a4"],
- "name": "rewardMulHistorical",
- "value": { "type": "real", "value": 1.2 }
- }
- ]
+"@override:us_m2a4" {
+ "@override:rewardMulHistorical":r = 1.2
}
2. 支持叠加的 8 个客户端数据包
把文件按目标包路径放进 client/packs/<包路径>/ 下即可:
-目标目录名 常见内容 备份方式 client/packs/char.vromfs.bin/config/shop.blk(科技树)、config/wpcost.blk(经济/权重/改装件)、config/unittags.blk、config/items.blk、config/modifications.blk常驻备份 client/packs/aces.vromfs.bin/gamedata/units/.../*.blk(载具模型/DM/炮塔)、gamedata/flightmodels/...(气动)、gamedata/weapons/...(武器/炮弹/导弹)、config/settings.blk常驻备份 client/packs/gui.vromfs.bin/新增独立 .nut 脚本、.tpl 模板、.css 样式(修改已有脚本/样式请看第 04 章 gui-patches) 常驻备份 client/packs/lang.vromfs.bin/lang/units.csv、lang/menu.csv、lang/units_weaponry.csv 等本地化表按需自动备份,关闭还原 client/packs/mis.vromfs.bin/gamedata/missions/.../*.blk 联机/自定义任务按需自动备份,关闭还原 client/packs/game.vromfs.bin/danetlibs/...、game/... 脚本与配置按需自动备份,关闭还原 client/packs/ui/atlases.vromfs.bin/gameuiskin/<全小写载具id>_ico.svg(科技树与本地商城剪影图标)按需自动备份,关闭还原 client/packs/ui/images.vromfs.bin/units/<载具id>.ddsx 或 .png(资料卡/乘员栏载具图)按需自动备份,关闭还原
+目标目录名 常见内容 备份方式 client/packs/char.vromfs.bin/config/shop.blk(科技树)、config/wpcost.blk(经济/权重/改装件)、config/unittags.blk、config/items.blk、config/modifications.blk常驻备份 client/packs/aces.vromfs.bin/gamedata/units/.../*.blk(载具模型/DM/炮塔)、gamedata/flightmodels/...(气动)、gamedata/weapons/...(武器/炮弹/导弹)、config/settings.blk常驻备份 client/packs/gui.vromfs.bin/新增独立 .nut 脚本、.tpl 模板、.css 样式(修改已有脚本/样式请看第 04 章 gui-patches) 常驻备份 client/packs/lang.vromfs.bin/lang/units.csv、lang/menu.csv、lang/units_weaponry.csv 等本地化表按需自动备份,关闭还原 client/packs/mis.vromfs.bin/gamedata/missions/.../*.blk 联机/自定义任务按需自动备份,关闭还原 client/packs/game.vromfs.bin/danetlibs/...、game/... 脚本与配置按需自动备份,关闭还原 client/packs/ui/atlases.vromfs.bin/gameuiskin/<全小写载具id>_ico.svg(科技树与本地商城剪影图标)、units/<全小写载具id>.ddsx(默认乘员栏 DXT5 缩略图)按需自动备份,关闭还原 client/packs/ui/images.vromfs.bin/images/*.png / .avif / .ddsx(自定义界面图,或配合 wpcost.blk 的 customImage:t="!ui/images/..." / customTooltipImage:t="!ui/images/..." 直接使用 .png;注意 UI 不支持普通 .dds)按需自动备份,关闭还原
自动联动服务端:本地服务器在启动时直接读取叠加后的 .vromfs.bin。因此你通过补丁往 shop.blk / wpcost.blk 新增或修改载具后,服务端会自动识别新车价格、前置科技树、研发点、改装件、分房权重、AI 机器人池与礼包 GUID,无需手工同步两遍。
3. 包内文件的 3 种处理模式(按后缀自动识别)
构建器根据你在 client/packs/<包>/ 下放置的文件名自动决定处理方式:
-<原路径>.patch.jsonc → BLK 结构化增量补丁:解析目标 .blk 为保留完整类型的内存树,按 ops 逐条修改后重新编码为自包含二进制 BLK 写回;<原路径>.patch.csv → CSV 本地化增量合并:按第 1 列词条键合并进目标 .csv(已有键只更新你填写的语言列,新键追加到表尾);- 其余文件(如
us_m2a4_mod_demo.blk、us_m2a4_mod_demo_ico.svg)→ 新增或替换文件:
-- 如果路径以
.blk 结尾且你的源文件是可读文本 BLK(如从原版客户端解包修改得到的),构建器会自动将其编译为游戏引擎所需的二进制 BLK 写进包内; - 如果已经是二进制 BLK,或是
.svg / .ddsx / .nut / .tpl / .css,则原样写入包内。
+<原路径>.patch.blk(推荐)或 <原路径>.patch.jsonc → BLK 增量补丁:解析目标 .blk 为保留完整类型的内存树,按顺序应用补丁并重新编码为自包含二进制 BLK 写回。不同模组可对同一目标混用 .patch.blk 与 .patch.jsonc 并按加载顺序叠加;单个模组内对同一目标请二选一;<原路径>.patch.csv → CSV 本地化增量合并:按第 1 列词条键合并进目标 .csv(已有键只更新你填写的语言列,新键追加到表尾);- 其余文件(如
us_m2a4_mod_demo.blk、us_m2a4_mod_demo_ico.svg)→ 新增或替换文件:- 如果路径以
.blk 结尾且你的源文件是可读文本 BLK,构建器会自动展开其中的 include / includeOnce 与 @override: / @delete: 等 Dagor 指令,并编译为游戏引擎所需的二进制 BLK 写进包内; - 如果已经是二进制 BLK,或是
.svg / .ddsx / .nut / .tpl / .css,则原样写入包内。
-4. BLK 增量补丁(*.blk.patch.jsonc)完整手册
-4.1 基本格式与路径寻址
+4. BLK 增量补丁完整手册
+构建器同时支持两套 BLK 增量补丁格式:
+*.blk.patch.blk(首选推荐):Dagor 原生 BLK 语法,直接支持粘贴原版 BLK 子块、include 继承与 @override: / @delete: / @clone: 指令,写法最紧凑;*.blk.patch.jsonc(向后兼容 / 脚本生成):结构化 JSONC 操作列表,适合自动化脚本生成与已有旧模组兼容。
+4.1 Dagor 风格 BLK 增量补丁(*.blk.patch.blk)与 include 编译
+所有语句严格按源码从上到下顺序执行,且在 *.blk.patch.blk 与新增文本 .blk 中语义完全统一(无前缀永远表示新增/追加,修改已有项显式使用 @ 指令)。
+① 文件引入指令(include / includeOnce)
+语法 作用 include "germ_pzkpfw_maus.blk"在当前块位置读取并展开目标 .blk(相对当前文件在 pack 内的目录;也支持 ../、包根路径 /gamedata/...、#/gamedata/... 及战雷 CDK 路径 #/develop/gameBase/...)。 includeOnce "../common/smoke.blk"同 include,但在同一次编译链路中同一文件只展开一次。
+include 会直接查找当前 pack 内存档案(包含原版文件与前置模组修改后的结果)以及同模组内其他待写入 .blk 文件,且自动检测循环引用;- 所有
@ 指令同时支持带引号("@override:model":t = "...")和不带引号(@override:model:t = "..."、@override:ikPilot { ... })两种战雷原生写法; - 非常适合基于原版载具派生新车,无需复制几千行原版
.blk:
+blk// client/packs/aces.vromfs.bin/gamedata/units/tankmodels/germ_pzkpfw_walross.blk
+include "germ_pzkpfw_maus.blk"
+"@override:model":t = "pzkpfw_VIII_walross"
+"@delete:commonWeapons" {}
+commonWeapons {
+ // 直接粘贴新的武器块即可
+}
+② 参数(Param)指令
+语法 作用 说明 slaveUnit:t = "extra"追加参数 保留已有同名参数,适合可重复键 "@override:economicRankArcade":i = 18覆盖/设值 存在则覆盖首个并去重,不存在则新增(注意数值 :i / :r 不要加引号) "@override-last:slaveUnit":t = "new"覆盖末项 只替换最后一个同名参数,不动前面同名项(不存在则追加) "@delete:showOnlyWhenBought":b = no删除首个同名参数 占位类型/值会被忽略,不存在则静默跳过 "@delete-last:slaveUnit":t = ""删除末项同名参数 只删最后一个同名参数 "@delete-all:slaveUnit":t = ""删除全部同名参数 清空当前块内全部同名参数
+③ 子块(Block)指令
+语法 作用 说明 Weapon { ... }新增子块 追加同名子块(不会覆盖已有同名块) "@override:us_m2a4" { ... }进入已有块修改 支持 name[index](如 "@override:range[0]");不带索引且块不存在时自动新建 "@override-last:Weapon" { ... }进入末个同名块修改 修改最后一个同名子块(不存在则新建) "@replace:commonWeapons" { ... }原地整块替换 原地替换为全新子块(保持原本排序位置);支持 name[index] "@delete:commonWeapons" {}删除首个匹配子块 支持 name[index];花括号必须为空 "@delete-last:Weapon" {}删除末个同名子块 只删最后一个同名子块;花括号必须为空 "@delete-all:Weapon" {}删除全部同名子块 清空全部同名子块;花括号必须为空 "@clone:Weapon" { ... } / "@clone-last:Weapon" { ... }同名克隆 深拷贝首个/末个同名子块并追加,在花括号内微调 "@clone:us_m2a4->us_m2a4_mod" { ... }改名克隆 深拷贝源块(支持 a/b/src 相对路径与 /root/src 根路径)为新名(若目标已存在则原地替换),并在花括号内微调 "@inherit:base_weapon" {}块内继承 将同级或根级模板块的内容拷入当前块(花括号内可继续写覆写语句) "@after:<锚点>:<新块名>" { ... } / "@before:<锚点>:<新块名>" { ... }科技树锚点插队 插在指定兄弟块之后/之前(锚点支持 name[index];也可写 "@after:us_m2a4:@clone:us_m2a4->new_tank")
+拼写保护与转义:任何未注册的 "@xxx:..." 前缀都会直接报带行号的错误(防止拼错指令被静默写入二进制);若极少数情况需要字面量以 @ 开头,可用 @@ 转义为单个 @。
+
+4.2 JSONC 结构化增量补丁(*.blk.patch.jsonc,兼容与脚本生成格式)
+基本格式与路径寻址
jsonc{
"ops": [
// 按顺序执行的操作列表
]
}
path 是从 BLK 根节点出发的子块名数组,例如 ["country_usa", "army", "range[0]"];- 同名并列子块(如
shop.blk 里连续多个 range 块)可以用 名称[索引](0 起始)精确定位;不写索引默认命中第 0 个同名子块; [] 表示当前文档根节点本身。
-4.2 全部 7 种操作(op)
+全部 7 种操作(op)
① setParam:设置参数(存在则覆盖并去重同名项,不存在则新增)
修改已有块上的单个字段时,永远优先用 setParam:
jsonc{
@@ -433,7 +450,7 @@ us_m2a4 {
mrank面板 BR mrank面板 BR mrank面板 BR mrank面板 BR 01.0 104.3 207.7 3011.0 11.3 114.7 218.0 3111.3 21.7 125.0 228.3 3211.7 32.0 135.3 238.7 3312.0 42.3 145.7 249.0 3412.3 52.7 156.0 259.3 3512.7 63.0 166.3 269.7 3613.0 73.3 176.7 2710.0 3713.3 83.7 187.0 2810.3 3813.7 94.0 197.3 2910.7 3914.0
5.2 wpcost.blk 模式后缀与科技树等级 rank 的区别
战雷沿用了远古内测时期的模式英文名,千万不要把科技树大等级 rank 和分房权重 economicRank* 搞混:
-字段名 取值范围 真实含义 rank1 .. 8科技树时代等级(Rank I – VIII):决定它在科技树第几大行、受哪一级的开线数量门槛限制,以及默认套用哪一档商店礼包价格 economicRankArcade0 .. 39+街机娱乐(AB, Arcade Battles) 的分房 mrank economicRankHistorical0 .. 39+历史性能(RB, Realistic Battles) 的默认分房 mrank(战雷早期将历史模式称为 *Historical Battles*) economicRankSimulation0 .. 39+全真模拟(SB, Simulator Battles) 的默认分房 mrank economicRankTankHistorical0 .. 39+(可选)飞机/直升机进入陆战历史(Ground RB)时的独立对地分房权重;不填时沿用 economicRankHistorical economicRankTankSimulation0 .. 39+(可选)飞机/直升机进入陆战全真(Ground SB)时的独立分房权重
+字段名 取值范围 真实含义 rank1 .. 8科技树时代等级(Rank I – VIII):决定它在科技树第几大行、受哪一级的开线数量门槛限制,以及默认套用哪一档商店礼包价格 economicRankArcade0 .. 39+街机娱乐(AB, Arcade Battles) 的分房 mrank economicRankHistorical0 .. 39+历史性能(RB, Realistic Battles) 的默认分房 mrank(战雷早期将历史模式称为 Historical Battles) economicRankSimulation0 .. 39+全真模拟(SB, Simulator Battles) 的默认分房 mrank economicRankTankHistorical0 .. 39+(可选)飞机/直升机进入**陆战历史(Ground RB)**时的独立对地分房权重;不填时沿用 economicRankHistorical economicRankTankSimulation0 .. 39+(可选)飞机/直升机进入**陆战全真(Ground SB)**时的独立分房权重
6. shop.blk 科技树结构与 units.csv 四大词条后缀详解
6.1 config/shop.blk 的四层树状结构
@@ -444,9 +461,9 @@ us_m2a4 {
├─ range { ... } <-- range[1]:科技树第 2 纵列(如美系中坦线,内部含折叠组 us_sherman_group)
├─ range { ... } <-- range[2]..range[4]:其余常规银狮研发纵列
└─ range { ... } <-- range[5]..range[6]:右侧金币车 / 礼包车 / 活动车 / 联队车独立纵列
-编写 shop.blk.patch.jsonc 时只需记住三条核心规则:
-- 每个
range 就是科技树上的一条纵向列:因为它们都叫 range,在补丁 path 里用 "range[0]"、"range[1]"、"range[5]" 按从左到右(0 起始)定位; - 折叠文件夹(
*_group):当同一格折叠了多辆同系载具时,range 下会放一个以 _group 结尾的子块(例如 us_sherman_group),里面再嵌套各辆具体载具子块,折叠封面标题来自 units.csv 的 shop/group/<组名>; - 为什么坦克和军舰的前置研发箭头也叫
reqAir? 因为《战争雷霆》最早立项时是纯空战游戏(*World of Planes*),所有载具在底层代码里都沿用了 air / aircraft 命名,因此无论是坦克、直升机还是战列舰,指定“上一辆前置研发载具”的字段一律叫 reqAir!
-- 在
wpcost.blk 中设置 reqAir:t="us_m2a4":声明玩家必须先拥有 us_m2a4 才能研发本车; - 在
shop.blk 的同一 range 列中:连续排列且未写 reqAir 的两辆车默认自动画纵向实线箭头;写 reqAir:t="us_m2a4" 会显式从 us_m2a4 连出箭头;而写 reqAir:t=""(空字符串)则会显式断开与上方载具的箭头连接(科技树断线处以及右侧金币/礼包列里的车都用 reqAir:t="")。
+编写 shop.blk.patch.blk(或 .patch.jsonc)时只需记住三条核心规则:
+- 每个
range 就是科技树上的一条纵向列:因为它们都叫 range,在补丁 path 里用 "range[0]"、"range[1]"、"range[5]" 按从左到右(0 起始)定位; - 折叠文件夹(
*_group):当同一格折叠了多辆同系载具时,range 下会放一个以 _group 结尾的子块(例如 us_sherman_group),里面再嵌套各辆具体载具子块,折叠封面标题来自 units.csv 的 shop/group/<组名>; - 为什么坦克和军舰的前置研发箭头也叫
reqAir?
+因为《战争雷霆》最早立项时是纯空战游戏(World of Planes),所有载具在底层代码里都沿用了 air / aircraft 命名,因此无论是坦克、直升机还是战列舰,指定“上一辆前置研发载具”的字段一律叫 reqAir!- 在
wpcost.blk 中设置 reqAir:t="us_m2a4":声明玩家必须先拥有 us_m2a4 才能研发本车; - 在
shop.blk 的同一 range 列中:连续排列且未写 reqAir 的两辆车默认自动画纵向实线箭头;写 reqAir:t="us_m2a4" 会显式从 us_m2a4 连出箭头;而写 reqAir:t=""(空字符串)则会显式断开与上方载具的箭头连接(科技树断线处以及右侧金币/礼包列里的车都用 reqAir:t="")。
6.2 lang/units.csv 的 4 个载具译名后缀与 CSV 增量合并
在 client/packs/lang.vromfs.bin/lang/units.csv.patch.csv 中为新载具添加译名时,每辆载具 <id> 共有 4 个标准词条键,分别对应不同界面与视距:
词条键格式 游戏内显示位置 示例(以 us_m2a4_mod_demo 为例) <id>_shop科技树格子、底部乘员槽位、本地网页商店卡片上的简短名称 "M2A4 (Mod Demo)" / "M2A4(教学改型)"<id>_0资料卡顶部标题、研发完成弹窗、战后结算详单里的完整正式全称 "Light Tank M2A4 (Mod Demo)" / "M2A4 轻型坦克(教学改型)"<id>_1战斗中中距离 3D 视野目标标记上显示的中等长度名称 "M2A4 Demo" / "M2A4 教学型"<id>_2战斗中远距离目标标记 / 极简击杀播报显示的超短型号或车种名 "M2A4" / "M2A4"
@@ -458,18 +475,11 @@ us_m2a4 {
"us_m2a4_mod_demo_2";"M2A4";"M2A4";"M2A4"; 分隔并用双引号包裹每个字段,第 1 行写表头列名(只需列出你要填的语言列,未列出的语言列会自动保留原值或留空);config.blk(client/config-blk.patch.jsonc)如果模组需要调整游戏根目录的 config.blk(例如开启音效模组开关 sound{ enable_mod:b=yes } 或指定自定义机库 hangarBlk:t="..."),放一份标准 BLK 补丁到 client/config-blk.patch.jsonc 即可:
{
- "ops": [
- {
- "op": "setParam",
- "path": ["sound"],
- "name": "enable_mod",
- "value": { "type": "bool", "value": true },
- "createBlocks": true
- }
- ]
+7. 修改游戏根目录 config.blk(client/config-blk.patch.blk / .jsonc)
+如果模组需要调整游戏根目录的 config.blk(例如开启音效模组开关 sound{ enable_mod:b=yes } 或指定自定义机库 hangarBlk:t="..."),放一份 BLK 补丁到 client/config-blk.patch.blk(推荐,同样兼容 client/config-blk.patch.jsonc)即可:
+blk// client/config-blk.patch.blk
+"@override:sound" {
+ "@override:enable_mod":b = yes
}
启动器会在首次修改前自动将原版 config.blk 备份到 wtoffline/stock/config.blk,关闭相关模组后自动还原。
@@ -483,12 +493,12 @@ us_m2a4 {
└─ packs/
├─ aces.vromfs.bin/
│ └─ gamedata/units/tankmodels/
- │ └─ us_m2a4_mod_demo.blk # ① 载具物理/装甲/武器定义(基于原版 us_m2a4.blk 修改)
+ │ └─ us_m2a4_mod_demo.blk # ① 通过 include 继承原版 us_m2a4.blk 并调高极速
├─ char.vromfs.bin/
│ └─ config/
- │ ├─ wpcost.blk.patch.jsonc # ② 克隆经济、分房权重、改装件与弹药架
- │ ├─ shop.blk.patch.jsonc # ③ 挂入美系陆军第 1 列 I 级科技树
- │ └─ unittags.blk.patch.jsonc # ④ 克隆载具分类标签与试车场配置
+ │ ├─ wpcost.blk.patch.blk # ② 克隆经济、分房权重、改装件与弹药架
+ │ ├─ shop.blk.patch.blk # ③ 挂入美系陆军第 1 列 I 级科技树
+ │ └─ unittags.blk.patch.blk # ④ 克隆载具分类标签与试车场配置
└─ lang.vromfs.bin/
└─ lang/
└─ units.csv.patch.csv # ⑤ 注册 _shop / _0 / _1 / _2 中英文名称client/packs/aces.vromfs.bin/gamedata/units/tankmodels/us_m2a4_mod_demo.blk按第 01 章第 2 节任一方式取出原版 aces.vromfs.bin 中的 gamedata/units/tankmodels/us_m2a4.blk(文本或二进制均可),另存为 us_m2a4_mod_demo.blk。保持顶部的 model:t="m2a4" 不变(这样它会直接复用原版 M2A4 的 3D 模型和贴图),把里面的最大前进速度和加速改快即可(文本 .blk 在构建时会自动编译为二进制 .blk):
model:t="m2a4"
-// ...(保留原版 us_m2a4.blk 其余内容不变,仅调高以下机动参数体验效果)...
-maxFwdSpeed:r=90.0
-maxRevSpeed:r=25.0
-maxAccel:r=12.0client/packs/char.vromfs.bin/config/wpcost.blk.patch.jsonc用 cloneBlock 一键复制 us_m2a4(自动继承全部武器、弹种、改装件与备用车配置),并把研发前提设为 us_m2a4、研发点设为 1000、银狮价格设为 500、三模式分房权重设为 1(即面板 1.3):
{
- "ops": [
- {
- "op": "cloneBlock",
- "from": ["us_m2a4"],
- "toParent": [],
- "newName": "us_m2a4_mod_demo",
- "replaceExisting": true,
- "ops": [
- { "op": "setParam", "path": [], "name": "reqAir", "value": "us_m2a4" },
- { "op": "setParam", "path": [], "name": "reqExp", "value": { "type": "int", "value": 1000 } },
- { "op": "setParam", "path": [], "name": "value", "value": { "type": "int", "value": 500 } },
- { "op": "setParam", "path": [], "name": "economicRank", "value": { "type": "int", "value": 1 } },
- { "op": "setParam", "path": [], "name": "economicRankArcade", "value": { "type": "int", "value": 1 } },
- { "op": "setParam", "path": [], "name": "economicRankHistorical", "value": { "type": "int", "value": 1 } },
- { "op": "setParam", "path": [], "name": "economicRankSimulation", "value": { "type": "int", "value": 1 } }
- ]
- }
- ]
+直接用 include "us_m2a4.blk" 继承原版 aces.vromfs.bin 中的同目录 us_m2a4.blk(无需手工解包复制几千行原版文件),只用 @override: 调高最大前进速度和加速(构建时会自动展开并编译为二进制 .blk):
+blkinclude "us_m2a4.blk"
+"@override:maxFwdSpeed":r = 90.0
+"@override:maxRevSpeed":r = 25.0
+"@override:maxAccel":r = 12.0
+② 经济与权重补丁 client/packs/char.vromfs.bin/config/wpcost.blk.patch.blk
+用 @clone: 一键复制 us_m2a4(自动继承全部武器、弹种、改装件与备用车配置),并把研发前提设为 us_m2a4、研发点设为 1000、银狮价格设为 500、三模式分房权重设为 1(即面板 1.3):
+blk"@clone:us_m2a4->us_m2a4_mod_demo" {
+ "@override:reqAir":t = "us_m2a4"
+ "@override:reqExp":i = 1000
+ "@override:value":i = 500
+ "@override:economicRank":i = 1
+ "@override:economicRankArcade":i = 1
+ "@override:economicRankHistorical":i = 1
+ "@override:economicRankSimulation":i = 1
}
-③ 科技树位置补丁 client/packs/char.vromfs.bin/config/shop.blk.patch.jsonc
-在 country_usa -> army -> range[0] 的 I 级段末尾(us_m3a1_stuart 之后、us_m5a1_stuart 断线之前)插入新车块,并显式声明 reqAir: "us_m2a4",游戏就会在不打断原有斯图亚特研发线的前提下,从 M2A4 连出一条侧支研发箭头指向你的新车:
-jsonc{
- "ops": [
- {
- "op": "addBlock",
- "path": ["country_usa", "army", "range[0]"],
- "name": "us_m2a4_mod_demo",
- "after": "us_m3a1_stuart",
- "block": {
- "params": [
- { "name": "rank", "value": { "type": "int", "value": 1 } },
- { "name": "reqAir", "value": "us_m2a4" }
- ]
+③ 科技树位置补丁 client/packs/char.vromfs.bin/config/shop.blk.patch.blk
+在 country_usa -> army -> range[0] 的 I 级段末尾(us_m3a1_stuart 之后、us_m5a1_stuart 断线之前)插入新车块,并显式声明 reqAir:t = "us_m2a4",游戏就会在不打断原有斯图亚特研发线的前提下,从 M2A4 连出一条侧支研发箭头指向你的新车:
+blk"@override:country_usa" {
+ "@override:army" {
+ "@override:range[0]" {
+ "@after:us_m3a1_stuart:us_m2a4_mod_demo" {
+ rank:i = 1
+ reqAir:t = "us_m2a4"
}
}
- ]
-}
-④ 载具标签与试驾场补丁 client/packs/char.vromfs.bin/config/unittags.blk.patch.jsonc
-同样用 cloneBlock 从 us_m2a4 克隆出 type:t="tank"、机库车位 hangar_place:t="tank"、陆战试车场 testFlight 与轻坦标签:
-jsonc{
- "ops": [
- {
- "op": "cloneBlock",
- "from": ["us_m2a4"],
- "toParent": [],
- "newName": "us_m2a4_mod_demo",
- "replaceExisting": true
- }
- ]
+ }
}
+④ 载具标签与试驾场补丁 client/packs/char.vromfs.bin/config/unittags.blk.patch.blk
+同样用 @clone: 从 us_m2a4 克隆出 type:t="tank"、机库车位 hangar_place:t="tank"、陆战试车场 testFlight 与轻坦标签:
+blk"@clone:us_m2a4->us_m2a4_mod_demo" {}
⑤ 多语言名称补丁 client/packs/lang.vromfs.bin/lang/units.csv.patch.csv
直接复用上面第 6.2 节的 4 行 CSV 内容即可。保存后在启动器勾选启用模组并启动游戏,切到美国陆军科技树 I 级,就能看到 M2A4(教学改型) 并立刻右键「试驾」体验 90 km/h 飙车!
@@ -578,9 +560,9 @@ maxAccel:r=12.0Most War Thunder data mods—tweaking vehicle performance, shell penetration, missile maneuverability, tech-tree layouts, Silver Lion / Research Point prices, Battle Ratings, localized names, and vehicle icons—live inside .vromfs.bin data packs. This chapter explains how to modify those packs in a 100% stackable, conflict-free way, ending with a copy-pasteable walkthrough that clones a playable standalone tank into the US Rank I tech tree.
War Thunder's Dagor Engine stores nearly all game configurations in BLK (DataBlock) files—compiled to compact binary inside .vromfs.bin packs, and readable as plain text .blk when unpacked. While text BLK looks superficially similar to JSON, it differs in three fundamental ways:
War Thunder's Dagor Engine stores nearly all game configurations in BLK (DataBlock) files—compiled to compact binary inside .vromfs.bin packs, and readable as plain text .blk when unpacked. While text BLK looks superficially similar to JSON, it differs in three fundamental ways:
:i (32-bit integer), :r (32-bit float), :t (string), or :b (boolean yes/no). Writing :i where the engine expects :r causes the engine to ignore decimal values;slaveUnit:t="launcher_a" followed immediately by slaveUnit:t="launcher_b" (converting naively to a plain JSON object would overwrite the first key!);shop.blk, where every army/aviation branch contains multiple sibling range { ... } blocks side by side.Compare this 8-line stock text .blk excerpt (us_m2a4 in wpcost.blk) side by side with its .blk.patch.jsonc patch operation:
Compare this 8-line stock text .blk excerpt (us_m2a4 in wpcost.blk) side by side with its .blk.patch.blk incremental patch:
// Stock readable text BLK (excerpt from char.vromfs.bin -> config/wpcost.blk)
us_m2a4 {
value:i = 0
@@ -590,38 +572,51 @@ us_m2a4 {
country:t = "country_usa"
unitClass:t = "exp_tank"
}// Matching incremental patch: client/packs/char.vromfs.bin/config/wpcost.blk.patch.jsonc
+blk// Matching incremental patch (recommended): client/packs/char.vromfs.bin/config/wpcost.blk.patch.blk
// Touches ONLY us_m2a4's Realistic reward multiplier without clobbering other fields or other mods!
-{
- "ops": [
- {
- "op": "setParam",
- "path": ["us_m2a4"],
- "name": "rewardMulHistorical",
- "value": { "type": "real", "value": 1.2 }
- }
- ]
+"@override:us_m2a4" {
+ "@override:rewardMulHistorical":r = 1.2
}
2. The 8 Overlayable Client Data Packs
-Place your files under client/packs/<pack-path>/ matching the target archive's internal path:
-Target Directory Common Contents Backup Strategy client/packs/char.vromfs.bin/config/shop.blk (tech tree), config/wpcost.blk (economy/BR/modifications), config/unittags.blk, config/items.blk, config/modifications.blkAlways rebuilt from stock client/packs/aces.vromfs.bin/gamedata/units/.../*.blk (vehicle models/DM/turrets), gamedata/flightmodels/... (FMs), gamedata/weapons/... (guns/shells/missiles), config/settings.blkAlways rebuilt from stock client/packs/gui.vromfs.bin/New standalone .nut scripts, .tpl templates, .css stylesheets (to edit stock UI files, see Chapter 04 gui-patches) Always rebuilt from stock client/packs/lang.vromfs.bin/lang/units.csv, lang/menu.csv, lang/units_weaponry.csv, and other localization CSVsBacked up on demand, restored on disable client/packs/mis.vromfs.bin/gamedata/missions/.../*.blk multiplayer and custom missionsBacked up on demand, restored on disable client/packs/game.vromfs.bin/danetlibs/..., game/... scripts and configsBacked up on demand, restored on disable client/packs/ui/atlases.vromfs.bin/gameuiskin/<lowercase_unit_id>_ico.svg (tech-tree & local web store silhouette icons)Backed up on demand, restored on disable client/packs/ui/images.vromfs.bin/units/<unit_id>.ddsx or .png (stat-card / crew-slot vehicle images)Backed up on demand, restored on disable
+Place your files under client/packs/<pack-path>/ matching the target archive's internal path:
+Target Directory Common Contents Backup Strategy client/packs/char.vromfs.bin/config/shop.blk (tech tree), config/wpcost.blk (economy/BR/modifications), config/unittags.blk, config/items.blk, config/modifications.blkAlways rebuilt from stock client/packs/aces.vromfs.bin/gamedata/units/.../*.blk (vehicle models/DM/turrets), gamedata/flightmodels/... (FMs), gamedata/weapons/... (guns/shells/missiles), config/settings.blkAlways rebuilt from stock client/packs/gui.vromfs.bin/New standalone .nut scripts, .tpl templates, .css stylesheets (to edit stock UI files, see Chapter 04 gui-patches) Always rebuilt from stock client/packs/lang.vromfs.bin/lang/units.csv, lang/menu.csv, lang/units_weaponry.csv, and other localization CSVsBacked up on demand, restored on disable client/packs/mis.vromfs.bin/gamedata/missions/.../*.blk multiplayer and custom missionsBacked up on demand, restored on disable client/packs/game.vromfs.bin/danetlibs/..., game/... scripts and configsBacked up on demand, restored on disable client/packs/ui/atlases.vromfs.bin/gameuiskin/<lowercase_unit_id>_ico.svg (tech-tree & local web store silhouette icons), units/<lowercase_unit_id>.ddsx (default DXT5 crew-slot portrait)Backed up on demand, restored on disable client/packs/ui/images.vromfs.bin/images/*.png / .avif / .ddsx (custom UI images, or vehicle portraits via wpcost.blk customImage:t="!ui/images/..." / customTooltipImage:t="!ui/images/..."; note: plain .dds is not supported by UI PictureManager)Backed up on demand, restored on disable
Automatic Server Sync: The local server reads static datasets directly from the overlaid .vromfs.bin packs on startup. Any vehicle added or tweaked in shop.blk / wpcost.blk is automatically picked up for prices, tech-tree prerequisites, Research Points, modifications, Battle Ratings, AI bot pools, and store pack GUIDs—no duplicate server registration needed.
3. Three File Handling Modes Inside Packs (Auto-Detected by Suffix)
The patcher determines how to process each file under client/packs/<pack>/ by its filename suffix:
-<target-path>.patch.jsonc → Structured Incremental BLK Patch: decodes the target .blk into a type-preserving tree, applies ops in order, and re-encodes a self-contained binary BLK;<target-path>.patch.csv → Incremental Localization CSV Merge: merges rows by column 0 (updating only the non-empty language columns you provide on existing keys, and appending new keys at the end);- Any other file (e.g.
us_m2a4_mod_demo.blk, us_m2a4_mod_demo_ico.svg) → Add or Replace File:
-- If the path ends with
.blk and your source file is plain text BLK (for example, extracted and edited from your stock client), the builder automatically compiles it into binary BLK for the engine; - Binary
.blk files and other assets (.svg, .ddsx, .nut, .tpl, .css) are written into the archive as-is.
+<target-path>.patch.blk (Recommended) or <target-path>.patch.jsonc → Incremental BLK Patch: decodes the target .blk into a type-preserving tree, applies the patch in order, and re-encodes a self-contained binary BLK. Different mods may mix .patch.blk and .patch.jsonc on the same target and stack cleanly; within a single mod, pick one format per target file;<target-path>.patch.csv → Incremental Localization CSV Merge: merges rows by column 0 (updating only the non-empty language columns you provide on existing keys, and appending new keys at the end);- Any other file (e.g.
us_m2a4_mod_demo.blk, us_m2a4_mod_demo_ico.svg) → Add or Replace File:- If the path ends with
.blk and your source file is plain text BLK, the builder automatically expands include / includeOnce and Dagor @override: / @delete: directives and compiles it into binary BLK for the engine; - Binary
.blk files and other assets (.svg, .ddsx, .nut, .tpl, .css) are written into the archive as-is.
-4. Complete BLK Incremental Patch (*.blk.patch.jsonc) Reference
-4.1 Document Format & Path Addressing
+4. Complete BLK Incremental Patch Reference
+Two incremental BLK patch formats are supported:
+*.blk.patch.blk (Recommended): native Dagor BLK syntax with include, @override:, @delete:, and @clone:—compact and lets you paste stock BLK blocks directly;*.blk.patch.jsonc (Compatible / Programmatic): structured JSONC op list, kept for backwards compatibility and automated generators.
+4.1 Dagor-Style BLK Patches (*.blk.patch.blk) & include Compilation
+Statements execute strictly top-to-bottom in source order, with identical rules in both *.blk.patch.blk and standalone text .blk files (unprefixed items always append/add; modifying existing items explicitly uses @ directives).
+① File Inheritance (include / includeOnce)
+Syntax Behavior include "germ_pzkpfw_maus.blk"Loads and expands the target .blk into the current block (resolved relative to the current pack directory; supports ../, /gamedata/..., #/gamedata/..., and War Thunder CDK #/develop/gameBase/...). includeOnce "../common/smoke.blk"Same as include, but expands a given normalized path at most once per compilation.
+include resolves against the live in-memory pack archive (stock files + earlier mods) as well as sibling .blk files in the same mod, with automatic circular-include detection;- All
@ directives accept both quoted ("@override:model":t = "...") and unquoted (@override:model:t = "...", @override:ikPilot { ... }) Dagor syntax; - Ideal for derived vehicles without copying thousands of stock lines:
+blk// client/packs/aces.vromfs.bin/gamedata/units/tankmodels/germ_pzkpfw_walross.blk
+include "germ_pzkpfw_maus.blk"
+"@override:model":t = "pzkpfw_VIII_walross"
+"@delete:commonWeapons" {}
+commonWeapons {
+ // Paste new weapon blocks directly here
+}
+② Parameter Directives
+Syntax Behavior Notes slaveUnit:t = "extra"Append param Preserves existing same-named params (for repeated keys) "@override:economicRankArcade":i = 18Set / overwrite Replaces first match and deduplicates, or appends if absent (do not quote :i / :r numbers) "@override-last:slaveUnit":t = "new"Overwrite last match Replaces only the last same-named param without touching earlier entries (appends if absent) "@delete:showOnlyWhenBought":b = noDelete first matching param Dummy type/value is ignored; no-op if absent "@delete-last:slaveUnit":t = ""Delete last matching param Removes only the last same-named param "@delete-all:slaveUnit":t = ""Delete all matching params Removes every param with that name in the current block
+③ Block Directives
+Syntax Behavior Notes Weapon { ... }Add child block Appends a new sibling block without clobbering existing same-named blocks "@override:us_m2a4" { ... }Edit existing block Supports name[index] (e.g. "@override:range[0]"); creates the block when absent without an index "@override-last:Weapon" { ... }Edit last matching block Edits the last sibling with that name (creates if absent) "@replace:commonWeapons" { ... }Replace block in place Replaces the matched block in place (preserving sibling order); supports name[index] "@delete:commonWeapons" {}Delete first matching block Supports name[index]; body must be empty "@delete-last:Weapon" {}Delete last matching block Removes only the last sibling with that name; body must be empty "@delete-all:Weapon" {}Delete all same-named blocks Removes all sibling blocks with that name; body must be empty "@clone:Weapon" { ... } / "@clone-last:Weapon" { ... }Same-name clone Deep-clones the first/last sibling with that name, appends it, and applies body edits "@clone:us_m2a4->us_m2a4_mod" { ... }Clone under new name Deep-clones source (supports relative a/b/src or root /src) into newName (replacing existing newName in place) and applies body edits "@inherit:base_weapon" {}Inherit into block Copies params/blocks from a sibling or root template block into the current block (optional body applies overrides) "@after:<anchor>:<newName>" { ... } / "@before:<anchor>:<newName>" { ... }Anchored insertion Inserts right after/before a sibling anchor (supports anchor[index] and @clone:src->dst as target)
+Typo Guard & Escaping: Any unknown "@xxx:..." prefix fails immediately with a line number so misspelled directives are never silently baked into binary BLKs. Use @@ to escape a literal leading @.
+
+4.2 Structured JSONC Patches (*.blk.patch.jsonc, Backwards-Compatible Format)
+Document Format & Path Addressing
jsonc{
"ops": [
// Ordered list of patch operations
]
}
path is an array of child block names starting from the BLK root, e.g. ["country_usa", "army", "range[0]"];- Duplicate sibling blocks (such as consecutive
range blocks in shop.blk) can be addressed precisely with name[index] (zero-based); omitting [index] selects occurrence 0; [] refers to the root block of the current document.
-4.2 All 7 Patch Operations (op)
+All 7 Patch Operations (op)
① setParam: Set a parameter (overwrites & deduplicates same-named params if present; appends if absent)
Always prefer setParam when updating a single parameter on an existing block:
jsonc{
@@ -701,20 +696,20 @@ us_m2a4 {
mrankDisplayed BR mrankDisplayed BR mrankDisplayed BR mrankDisplayed BR 01.0 104.3 207.7 3011.0 11.3 114.7 218.0 3111.3 21.7 125.0 228.3 3211.7 32.0 135.3 238.7 3312.0 42.3 145.7 249.0 3412.3 52.7 156.0 259.3 3512.7 63.0 166.3 269.7 3613.0 73.3 176.7 2710.0 3713.3 83.7 187.0 2810.3 3813.7 94.0 197.3 2910.7 3914.0
5.2 Legacy Mode Suffixes in wpcost.blk vs Tech-Tree Tier rank
War Thunder retains internal field names from its alpha era—be careful not to confuse tech-tree tier rank with matchmaking BR economicRank*:
-Field Name Value Range Meaning rank1 .. 8Tech-Tree Era Tier (Rank I – VIII): controls which horizontal tier row the vehicle occupies, tier unlock gates, and default store rank-tier pricing economicRankArcade0 .. 39+Arcade Battles (AB) matchmaking mrank economicRankHistorical0 .. 39+Realistic Battles (RB) default matchmaking mrank (RB was originally called *Historical Battles*) economicRankSimulation0 .. 39+Simulator Battles (SB) default matchmaking mrank economicRankTankHistorical0 .. 39+*(Optional)* Split Ground RB mrank for aircraft/helicopters with separate air vs ground BRs; falls back to economicRankHistorical when omitted economicRankTankSimulation0 .. 39+*(Optional)* Split Ground SB mrank for aircraft/helicopters
+Field Name Value Range Meaning rank1 .. 8Tech-Tree Era Tier (Rank I – VIII): controls which horizontal tier row the vehicle occupies, tier unlock gates, and default store rank-tier pricing economicRankArcade0 .. 39+Arcade Battles (AB) matchmaking mrank economicRankHistorical0 .. 39+Realistic Battles (RB) default matchmaking mrank (RB was originally called Historical Battles) economicRankSimulation0 .. 39+Simulator Battles (SB) default matchmaking mrank economicRankTankHistorical0 .. 39+(Optional) Split Ground RB mrank for aircraft/helicopters with separate air vs ground BRs; falls back to economicRankHistorical when omitted economicRankTankSimulation0 .. 39+(Optional) Split Ground SB mrank for aircraft/helicopters
6. shop.blk Anatomy & units.csv Localization Suffixes
6.1 The 4-Level Hierarchy of config/shop.blk
-Inside char.vromfs.bin, config/shop.blk organizes every nation's research tree into a uniform 4-level hierarchy:
+Inside char.vromfs.bin, config/shop.blk organizes every nation's research tree into a uniform 4-level hierarchy:
textcountry_usa (or country_germany / country_ussr / country_britain / country_japan / country_china / ...)
└─ army | helicopters | aviation | ships | boats
├─ range { ... } <-- range[0]: 1st vertical column (e.g. US Light Tank line)
├─ range { ... } <-- range[1]: 2nd vertical column (e.g. US Medium Tank line, containing folder us_sherman_group)
├─ range { ... } <-- range[2]..range[4]: remaining regular Silver Lions research columns
└─ range { ... } <-- range[5]..range[6]: right-hand Golden Eagle / Pack / Event / Squadron columns
-Keep three rules in mind when writing shop.blk.patch.jsonc:
-- Each sibling
range block is one vertical column in the tech tree: since every column block is named range, address them left-to-right (zero-based) as "range[0]", "range[1]", "range[5]", etc.; - Collapsible folder groups (
*_group): when multiple variants share one tech-tree folder, range contains a child block ending in _group (e.g. us_sherman_group) whose children are the grouped vehicles; the folder's display label comes from shop/group/<group_name> in units.csv; - Why is the prerequisite arrow field named
reqAir even on tanks and ships? War Thunder began life as an aviation-only game (*World of Planes*), so air / aircraft remained the universal internal noun for any unit. Consequently, reqAir defines the research prerequisite vehicle across tanks, helicopters, aircraft, and ships alike!
-- Setting
reqAir:t="us_m2a4" in wpcost.blk requires owning us_m2a4 before researching the unit; - Inside a
range column in shop.blk: consecutive vehicles with no reqAir property automatically connect with vertical arrows; reqAir:t="us_m2a4" draws an explicit arrow from us_m2a4; and reqAir:t="" (empty string) explicitly breaks the arrow from the vehicle above it (used at mid-column gaps and throughout the right-hand premium/pack columns).
+Keep three rules in mind when writing shop.blk.patch.blk (or .patch.jsonc):
+- Each sibling
range block is one vertical column in the tech tree: since every column block is named range, address them left-to-right (zero-based) as "range[0]", "range[1]", "range[5]", etc.; - Collapsible folder groups (
*_group): when multiple variants share one tech-tree folder, range contains a child block ending in _group (e.g. us_sherman_group) whose children are the grouped vehicles; the folder's display label comes from shop/group/<group_name> in units.csv; - Why is the prerequisite arrow field named
reqAir even on tanks and ships?
+War Thunder began life as an aviation-only game (World of Planes), so air / aircraft remained the universal internal noun for any unit. Consequently, reqAir defines the research prerequisite vehicle across tanks, helicopters, aircraft, and ships alike!- Setting
reqAir:t="us_m2a4" in wpcost.blk requires owning us_m2a4 before researching the unit; - Inside a
range column in shop.blk: consecutive vehicles with no reqAir property automatically connect with vertical arrows; reqAir:t="us_m2a4" draws an explicit arrow from us_m2a4; and reqAir:t="" (empty string) explicitly breaks the arrow from the vehicle above it (used at mid-column gaps and throughout the right-hand premium/pack columns).
6.2 All 4 lang/units.csv Keys & Incremental CSV Merging
When localizing a vehicle <id> in client/packs/lang.vromfs.bin/lang/units.csv.patch.csv, War Thunder uses 4 standard localization keys for different UI contexts and HUD distances:
Key Pattern Where It Appears in Game Example (for us_m2a4_mod_demo) <id>_shopTech-tree card, crew slot bar, and local web store card short name "M2A4 (Mod Demo)" / "M2A4(教学改型)"<id>_0Stat-card header, research completion modal, and battle debriefing full formal title "Light Tank M2A4 (Mod Demo)" / "M2A4 轻型坦克(教学改型)"<id>_1In-battle medium-distance 3D HUD marker name "M2A4 Demo" / "M2A4 教学型"<id>_2In-battle far-distance HUD marker / compact killfeed short name "M2A4" / "M2A4"
@@ -726,23 +721,16 @@ us_m2a4 {
"us_m2a4_mod_demo_2";"M2A4";"M2A4";"M2A4"
- Fields must be separated by semicolons
; and wrapped in double quotes, with column headers on line 1 (list only the language columns you want to populate; omitted columns keep their stock values or default to empty); - Existing row keys update only your non-empty columns in place; new keys are appended to the end of the file.
-7. Patching Root config.blk (client/config-blk.patch.jsonc)
-If your mod needs to adjust the client root config.blk (for example enabling sound mods via sound{ enable_mod:b=yes } or setting a custom hangar hangarBlk:t="..."), place a standard BLK patch at client/config-blk.patch.jsonc:
-jsonc{
- "ops": [
- {
- "op": "setParam",
- "path": ["sound"],
- "name": "enable_mod",
- "value": { "type": "bool", "value": true },
- "createBlocks": true
- }
- ]
+7. Patching Root config.blk (client/config-blk.patch.blk / .jsonc)
+If your mod needs to adjust the client root config.blk (for example enabling sound mods via sound{ enable_mod:b=yes } or setting a custom hangar hangarBlk:t="..."), place a BLK patch at client/config-blk.patch.blk (recommended; client/config-blk.patch.jsonc is also supported):
+blk// client/config-blk.patch.blk
+"@override:sound" {
+ "@override:enable_mod":b = yes
}
The launcher backs up the stock config.blk to wtoffline/stock/config.blk before applying patches and restores it automatically when no enabled mod touches config.blk.
8. End-to-End Walkthrough: Clone a Playable Standalone Tank (us_m2a4_mod_demo) in 5 Minutes
-Let's connect every piece from this chapter into a complete, copy-pasteable mod that derives a standalone us_m2a4_mod_demo light tank from stock us_m2a4—boosted to 90 km/h, rated at BR 1.3 (mrank = 1), and wired into US Ground Rank I with a research arrow from M2A4. Because every player profile owns the reserve us_m2a4 from the start, you can see the new tank in the US tree and Test Drive it immediately!
+Let's connect every piece from this chapter into a complete, copy-pasteable mod that derives a standalone us_m2a4_mod_demo light tank from stock us_m2a4—boosted to 90 km/h, rated at BR 1.3 (mrank = 1), and wired into US Ground Rank I with a research arrow from M2A4. Because every player profile owns the reserve us_m2a4 from the start, you can see the new tank in the US tree and Test Drive it immediately!
8.1 Mod Folder Tree
Create demo-standalone-m2a4/ inside your global mods/ directory:
textmods/demo-standalone-m2a4/
@@ -751,12 +739,12 @@ us_m2a4 {
└─ packs/
├─ aces.vromfs.bin/
│ └─ gamedata/units/tankmodels/
- │ └─ us_m2a4_mod_demo.blk # ① Tank physics/armor/weapons (copied from stock us_m2a4.blk)
+ │ └─ us_m2a4_mod_demo.blk # ① Inherits stock us_m2a4.blk via include & boosts speed
├─ char.vromfs.bin/
│ └─ config/
- │ ├─ wpcost.blk.patch.jsonc # ② Clone economy, BR, modifications & ammo racks
- │ ├─ shop.blk.patch.jsonc # ③ Insert into US Army column 0 (Rank I)
- │ └─ unittags.blk.patch.jsonc # ④ Clone unit class tags & test-drive mission
+ │ ├─ wpcost.blk.patch.blk # ② Clone economy, BR, modifications & ammo racks
+ │ ├─ shop.blk.patch.blk # ③ Insert into US Army column 0 (Rank I)
+ │ └─ unittags.blk.patch.blk # ④ Clone unit class tags & test-drive mission
└─ lang.vromfs.bin/
└─ lang/
└─ units.csv.patch.csv # ⑤ Localized _shop / _0 / _1 / _2 names
@@ -779,65 +767,37 @@ us_m2a4 {
"game_versions": ["2.61.0.*"]
}
① Tank Model Definition client/packs/aces.vromfs.bin/gamedata/units/tankmodels/us_m2a4_mod_demo.blk
-Extract stock gamedata/units/tankmodels/us_m2a4.blk from aces.vromfs.bin using any method from Chapter 01 Section 2, and save it as us_m2a4_mod_demo.blk. Keep model:t="m2a4" at the top (so the engine reuses the stock M2A4 3D mesh and textures) and raise its speed and acceleration (plain text .blk compiles to binary automatically on build):
-blkmodel:t="m2a4"
-// ... (keep the rest of stock us_m2a4.blk unchanged; tweak mobility below to feel the difference) ...
-maxFwdSpeed:r=90.0
-maxRevSpeed:r=25.0
-maxAccel:r=12.0
-② Economy & BR Patch client/packs/char.vromfs.bin/config/wpcost.blk.patch.jsonc
-Use cloneBlock to copy us_m2a4 (inheriting all weapons, shells, modifications, and backup settings), and set reqAir to "us_m2a4", RP cost to 1000, SL price to 500, and all mode mrank values to 1 (displayed BR 1.3):
-jsonc{
- "ops": [
- {
- "op": "cloneBlock",
- "from": ["us_m2a4"],
- "toParent": [],
- "newName": "us_m2a4_mod_demo",
- "replaceExisting": true,
- "ops": [
- { "op": "setParam", "path": [], "name": "reqAir", "value": "us_m2a4" },
- { "op": "setParam", "path": [], "name": "reqExp", "value": { "type": "int", "value": 1000 } },
- { "op": "setParam", "path": [], "name": "value", "value": { "type": "int", "value": 500 } },
- { "op": "setParam", "path": [], "name": "economicRank", "value": { "type": "int", "value": 1 } },
- { "op": "setParam", "path": [], "name": "economicRankArcade", "value": { "type": "int", "value": 1 } },
- { "op": "setParam", "path": [], "name": "economicRankHistorical", "value": { "type": "int", "value": 1 } },
- { "op": "setParam", "path": [], "name": "economicRankSimulation", "value": { "type": "int", "value": 1 } }
- ]
- }
- ]
+Inherit stock us_m2a4.blk directly via include (no need to unpack or copy thousands of stock lines) and override just its speed and acceleration (compiled to binary automatically on build):
+blkinclude "us_m2a4.blk"
+"@override:maxFwdSpeed":r = 90.0
+"@override:maxRevSpeed":r = 25.0
+"@override:maxAccel":r = 12.0
+② Economy & BR Patch client/packs/char.vromfs.bin/config/wpcost.blk.patch.blk
+Use @clone: to copy us_m2a4 (inheriting all weapons, shells, modifications, and backup settings), and set reqAir to "us_m2a4", RP cost to 1000, SL price to 500, and all mode mrank values to 1 (displayed BR 1.3):
+blk"@clone:us_m2a4->us_m2a4_mod_demo" {
+ "@override:reqAir":t = "us_m2a4"
+ "@override:reqExp":i = 1000
+ "@override:value":i = 500
+ "@override:economicRank":i = 1
+ "@override:economicRankArcade":i = 1
+ "@override:economicRankHistorical":i = 1
+ "@override:economicRankSimulation":i = 1
}
-③ Tech-Tree Slot Patch client/packs/char.vromfs.bin/config/shop.blk.patch.jsonc
-Insert us_m2a4_mod_demo into country_usa -> army -> range[0] right after us_m3a1_stuart (just before the us_m5a1_stuart Rank II break) with an explicit reqAir: "us_m2a4", creating a clean Rank I side-branch arrow from M2A4 without disturbing the stock Stuart chain:
-jsonc{
- "ops": [
- {
- "op": "addBlock",
- "path": ["country_usa", "army", "range[0]"],
- "name": "us_m2a4_mod_demo",
- "after": "us_m3a1_stuart",
- "block": {
- "params": [
- { "name": "rank", "value": { "type": "int", "value": 1 } },
- { "name": "reqAir", "value": "us_m2a4" }
- ]
+③ Tech-Tree Slot Patch client/packs/char.vromfs.bin/config/shop.blk.patch.blk
+Insert us_m2a4_mod_demo into country_usa -> army -> range[0] right after us_m3a1_stuart (just before the us_m5a1_stuart Rank II break) with an explicit reqAir:t = "us_m2a4", creating a clean Rank I side-branch arrow from M2A4 without disturbing the stock Stuart chain:
+blk"@override:country_usa" {
+ "@override:army" {
+ "@override:range[0]" {
+ "@after:us_m3a1_stuart:us_m2a4_mod_demo" {
+ rank:i = 1
+ reqAir:t = "us_m2a4"
}
}
- ]
+ }
}
-④ Unit Tags & Test-Drive Patch client/packs/char.vromfs.bin/config/unittags.blk.patch.jsonc
+④ Unit Tags & Test-Drive Patch client/packs/char.vromfs.bin/config/unittags.blk.patch.blk
Clone us_m2a4 in unittags.blk so the new ID inherits type:t="tank", hangar_place:t="tank", the ground testFlight mission, and light-tank tags:
-jsonc{
- "ops": [
- {
- "op": "cloneBlock",
- "from": ["us_m2a4"],
- "toParent": [],
- "newName": "us_m2a4_mod_demo",
- "replaceExisting": true
- }
- ]
-}
+blk"@clone:us_m2a4->us_m2a4_mod_demo" {}
⑤ Localization Patch client/packs/lang.vromfs.bin/lang/units.csv.patch.csv
Copy the 4-row CSV snippet from Section 6.2 above. Enable the mod in the launcher, start the game, open the US Ground Rank I tree, and right-click M2A4 (Mod Demo) › Test Drive to take your 90 km/h light tank for a spin!
@@ -874,9 +834,9 @@ maxAccel:r=12.0
│ └─ us_mbt_demo.blk # ② 载具物理、装甲、炮塔、武器配置(文本 BLK 自动编译)
├─ char.vromfs.bin/
│ └─ config/
- │ ├─ wpcost.blk.patch.jsonc # ③ 价格、研发点、权重、改装件(用 cloneBlock 最快)
- │ ├─ shop.blk.patch.jsonc # ④ 挂进对应国家科技树纵列位置
- │ └─ unittags.blk.patch.jsonc # ④ 注册载具类型、机库车位、试车场与标签
+ │ ├─ wpcost.blk.patch.blk # ③ 价格、研发点、权重、改装件(用 @clone: 最快;也兼容 .patch.jsonc)
+ │ ├─ shop.blk.patch.blk # ④ 挂进对应国家科技树纵列位置
+ │ └─ unittags.blk.patch.blk # ④ 注册载具类型、机库车位、试车场与标签
├─ lang.vromfs.bin/
│ └─ lang/
│ └─ units.csv.patch.csv # ⑤ 中英文名称(_shop、_0、_1、_2)
@@ -890,17 +850,15 @@ maxAccel:r=12.0tankmodels/us_mbt_demo.blk 文件名(或空军 flightmodels/us_jet_demo.blk)、wpcost.blk 块名、shop.blk 块名与 unittags.blk 块名必须一字不差。ui/atlases.vromfs.bin 图标路径必须全小写:原版图标包内部键名统一为全小写,请命名为 gameuiskin/<全小写载具id>_ico.svg(本地网页商店的商品卡片也会自动读取这张 SVG 图标!)。.blk 里的模型资产名与 .grp 一致:gamedata/units/tankmodels/us_mbt_demo.blk 顶部的 model:t="..." 名称必须与你在 CDK 中导出 .grp 时的资产名完全一致。gift 商城礼包车(以及 AI 机器人池准入规则)在 wpcost.blk.patch.jsonc 和 shop.blk.patch.jsonc 中,你可以自由决定这辆新车是走常规银狮研发线还是走本地网页商城礼包:
在 wpcost.blk.patch.blk 和 shop.blk.patch.blk(或 .patch.jsonc)中,你可以自由决定这辆新车是走常规银狮研发线还是走本地网页商城礼包:
wpcost.blk 中设置常规 value(银狮售价)与 reqExp(研发点),不要设置 gift、premPackAir、costGold、event 或 researchType(联队车标记),也不要在 shop.blk 设置 showOnlyWhenBought:b=yes;battle-ranks.ts)会自动把已挂入科技树(shop.blk)且不含 gift、premPackAir、event、researchType、showOnlyWhenBought 标记的常规银狮科技树载具纳入对应国家与分房权重的 AI 出战池!这意味着你在单机对局里也能遇到驾驶你自制新车的友军和敌军 AI。gift:t="msi_notebook")很多模组作者在翻看原版 wpcost.blk / shop.blk 时会好奇:为什么满地都是 gift:t="msi_notebook"?
gift:t="..." 字符串(官方历史遗留常填 "msi_notebook" 等推广代号),客户端就会把该车识别为“需通过商店礼包购买解锁的礼品车”,点击「购买」按钮时会拉起商店页面而非扣除银狮/金鹰;wpcost.blk 时,会自动为每一辆带 gift 参数的载具注册确定性的本地商城商品 ID wto_pack_<载具ID>(例如 wto_pack_us_mbt_demo)与对应 GUID:
-rank 等级自动套用默认档位定价与金鹰/高账赠品,玩家点开游戏内置商店就能直接购买解锁!server/tuning/store.jsonc 的 vehiclePacks.byVehicle 下加一行即可(详见第 05 章)。gift、premPackAir、event、researchType 或 showOnlyWhenBought 标记的特殊载具不会自动混入常规 AI 机器人池,避免稀有礼包原型车在普通对局满街跑。gift:t="..." 字符串(官方历史遗留常填 "msi_notebook" 等推广代号),客户端就会把该车识别为“需通过商店礼包购买解锁的礼品车”,点击「购买」按钮时会拉起商店页面而非扣除银狮/金鹰;wpcost.blk 时,会自动为每一辆带 gift 参数的载具注册确定性的本地商城商品 ID wto_pack_<载具ID>(例如 wto_pack_us_mbt_demo)与对应 GUID:rank 等级自动套用默认档位定价与金鹰/高账赠品,玩家点开游戏内置商店就能直接购买解锁!server/tuning/store.jsonc 的 vehiclePacks.byVehicle 下加一行即可(详见第 05 章)。gift、premPackAir、event、researchType 或 showOnlyWhenBought 标记的特殊载具不会自动混入常规 AI 机器人池,避免稀有礼包原型车在普通对局满街跑。UserSkins/、UserSights/、UserMissions/ 即可,启动器完全不会干预或清理这些原生文件夹,无需封装成模组;client/files/ 随模组一起启停:
-client/files/UserSkins/mod_us_mbt_demo_camo/...(单模组独占子目录 → 自动走跨盘 NTFS Junction 零拷贝秒挂)client/files/UserSights/us_mbt_demo/...(单模组独占子目录 → 自动走跨盘 NTFS Junction 零拷贝秒挂)client/files/sound/mod/my_cannon.bank(多模组共享的平铺目录散文件 → 依次尝试文件符号链接 → 同盘硬链接 → 按大小与修改时间比对的增量缓存复制)client/files/ 中的目标路径在游戏目录里已经作为玩家手动放置的原生文件/文件夹存在,启动器会自动跳过该项并在日志中输出冲突告警,不会覆盖或删除玩家的自有文件。UserSkins/、UserSights/、UserMissions/ 即可,启动器完全不会干预或清理这些原生文件夹,无需封装成模组;client/files/ 随模组一起启停:client/files/UserSkins/mod_us_mbt_demo_camo/...(单模组独占子目录 → 自动走跨盘 NTFS Junction 零拷贝秒挂)client/files/UserSights/us_mbt_demo/...(单模组独占子目录 → 自动走跨盘 NTFS Junction 零拷贝秒挂)client/files/sound/mod/my_cannon.bank(多模组共享的平铺目录散文件 → 依次尝试文件符号链接 → 同盘硬链接 → 按大小与修改时间比对的增量缓存复制)client/files/ 中的目标路径在游戏目录里已经作为玩家手动放置的原生文件/文件夹存在,启动器会自动跳过该项并在日志中输出冲突告警,不会覆盖或删除玩家的自有文件。| Term / Extension | Plain-Language Meaning |
|---|---|
.grp | Dagor Engine 3D geometry & skeleton archive (exported from the official War Thunder CDK AssetViewer / exporter), containing multi-LOD meshes, animation skeleton nodes (animChar), collision volumes, and internal damage-model (DM) parts. |
.dxp.bin | Dagor Engine compressed texture pack, bundling multiple diffuse, normal, and metallic/roughness DDSx textures referenced by name inside .grp materials. |
.ddsx | A single Dagor compressed texture file (DDSx), commonly used for UI stat-card vehicle portraits (ui/images.vromfs.bin/units/<unit_id>.ddsx) or standalone skin textures. |
| NTFS Directory Junction | Think of it as an OS-level zero-copy folder shortcut built into Windows NTFS: when the game engine opens <copy>/content/pkg_user/<modId>, Windows transparently serves the files straight from your mods/ folder on any drive—no administrator rights needed, works across drives, consumes 0 extra disk bytes, and mounts/unmounts in ~1 ms! |
client/addon/ AutomaticallyVerified directly against 2.61.0.x aces.exe (dlContent.cpp) and aces.vromfs.bin/config/settings.blk:
addons, addons_no_check, and addonsWithBasePath inside config/settings.blk;/pkg_user/ (mounted by default at <copy>/content/pkg_user/<safeModId>) skips the mandatory res/grp_hdr.vromfs.bin header check and directly scans <addon>/res/ for all .grp model and .dxp.bin texture archives, registering them into the global asset manager;res/grp_hdr.vromfs.bin, the patcher mounts it at <copy>/content/pkg_wto_<safeModId> so the native grp_hdr loader handles it;mods/.addons, addons_no_check, and addonsWithBasePath inside config/settings.blk;/pkg_user/ (mounted by default at <copy>/content/pkg_user/<safeModId>) skips the mandatory res/grp_hdr.vromfs.bin header check and directly scans <addon>/res/ for all .grp model and .dxp.bin texture archives, registering them into the global asset manager;res/grp_hdr.vromfs.bin, the patcher mounts it at <copy>/content/pkg_wto_<safeModId> so the native grp_hdr loader handles it;mods/.Suppose your mod ID is demo.new-mbt and your new vehicle's internal ID is us_mbt_demo:
Suppose your mod ID is demo.new-mbt and your new vehicle's internal ID is us_mbt_demo:
mods/demo-new-mbt/
├─ mod.jsonc
└─ client/
@@ -928,9 +886,9 @@ maxAccel:r=12.0tankmodels/us_mbt_demo.blk filename (or flightmodels/us_jet_demo.blk for aircraft) and the block names in wpcost.blk, shop.blk, and unittags.blk must match character for character.ui/atlases.vromfs.bin icon paths must be all lowercase: stock icon packs store paths in lowercase, so name your icon gameuiskin/<lowercase_unit_id>_ico.svg (the local web store also displays this exact SVG on pack cards!)..blk asset names to .grp exports: model:t="..." inside gamedata/units/tankmodels/us_mbt_demo.blk must match the exact asset name exported into your .grp archive from the CDK.tankmodels/us_mbt_demo.blk filename (or flightmodels/us_jet_demo.blk for aircraft) and the block names in wpcost.blk, shop.blk, and unittags.blk must match character for character.ui/atlases.vromfs.bin icon paths must be all lowercase: stock icon packs store paths in lowercase, so name your icon gameuiskin/<lowercase_unit_id>_ico.svg (the local web store also displays this exact SVG on pack cards!)..blk asset names to .grp exports: model:t="..." inside gamedata/units/tankmodels/us_mbt_demo.blk must match the exact asset name exported into your .grp archive from the CDK.gift Store Packs (& AI Bot Pool Rules)In wpcost.blk.patch.jsonc and shop.blk.patch.jsonc, you can wire your custom vehicle either as a regular Silver Lions researchable vehicle or as a local web store pack vehicle:
In wpcost.blk.patch.blk and shop.blk.patch.blk (or .patch.jsonc), you can wire your custom vehicle either as a regular Silver Lions researchable vehicle or as a local web store pack vehicle:
value (Silver Lions price) and reqExp (Research Points) in wpcost.blk, and omit gift, premPackAir, costGold, event, and researchType (squadron tag), as well as showOnlyWhenBought:b=yes in shop.blk;battle-ranks.ts) automatically includes tech-tree vehicles (inTechTree in shop.blk) that have none of gift, premPackAir, event, researchType, or showOnlyWhenBought! Both friendly and enemy AI bots at matching BRs and nations will spawn in your custom vehicle during offline battles.value (Silver Lions price) and reqExp (Research Points) in wpcost.blk, and omit gift, premPackAir, costGold, event, and researchType (squadron tag), as well as showOnlyWhenBought:b=yes in shop.blk;battle-ranks.ts) automatically includes tech-tree vehicles (inTechTree in shop.blk) that have none of gift, premPackAir, event, researchType, or showOnlyWhenBought! Both friendly and enemy AI bots at matching BRs and nations will spawn in your custom vehicle during offline battles.gift:t="msi_notebook")Modders inspecting stock wpcost.blk / shop.blk often wonder: why do dozens of pack vehicles say gift:t="msi_notebook"?
gift:t="..." string (Gaijin historically reused promo strings like "msi_notebook" across countless store vehicles) marks the vehicle as an external store pack/gift unit whose Order button opens the web store instead of spending Silver Lions or Golden Eagles;gift in wpcost.blk and automatically registers a deterministic local store product ID wto_pack_<unitId> (e.g. wto_pack_us_mbt_demo) and bundle GUID:
-vehiclePacks.byRank for the vehicle's rank tier so players can buy and unlock it right away in the in-game store!vehiclePacks.byVehicle in server/tuning/store.jsonc (see Chapter 05).gift, premPackAir, event, researchType, or showOnlyWhenBought are intentionally excluded from the automatic AI bot pool so rare pack prototypes do not flood standard bot lineups.gift:t="..." string (Gaijin historically reused promo strings like "msi_notebook" across countless store vehicles) marks the vehicle as an external store pack/gift unit whose Order button opens the web store instead of spending Silver Lions or Golden Eagles;gift in wpcost.blk and automatically registers a deterministic local store product ID wto_pack_<unitId> (e.g. wto_pack_us_mbt_demo) and bundle GUID:vehiclePacks.byRank for the vehicle's rank tier so players can buy and unlock it right away in the in-game store!vehiclePacks.byVehicle in server/tuning/store.jsonc (see Chapter 05).gift, premPackAir, event, researchType, or showOnlyWhenBought are intentionally excluded from the automatic AI bot pool so rare pack prototypes do not flood standard bot lineups.UserSkins/, UserSights/, and UserMissions/ folders—the launcher never touches or deletes player-managed native folders, and they do not need to be wrapped as mods;client/files/ so they mount and unmount together with the mod:
-client/files/UserSkins/mod_us_mbt_demo_camo/... (mod-exclusive subfolder → mounts across drives via zero-copy NTFS Junction)client/files/UserSights/us_mbt_demo/... (mod-exclusive subfolder → mounts across drives via zero-copy NTFS Junction)client/files/sound/mod/my_cannon.bank (shared flat directory file → tries file symlink → same-drive hardlink → size/mtime incremental cached copy)client/files/ already exists in the game folder as a player-created native file or folder, the launcher skips that item with a log warning and never overwrites or deletes player content.UserSkins/, UserSights/, and UserMissions/ folders—the launcher never touches or deletes player-managed native folders, and they do not need to be wrapped as mods;client/files/ so they mount and unmount together with the mod:client/files/UserSkins/mod_us_mbt_demo_camo/... (mod-exclusive subfolder → mounts across drives via zero-copy NTFS Junction)client/files/UserSights/us_mbt_demo/... (mod-exclusive subfolder → mounts across drives via zero-copy NTFS Junction)client/files/sound/mod/my_cannon.bank (shared flat directory file → tries file symlink → same-drive hardlink → size/mtime incremental cached copy)client/files/ already exists in the game folder as a player-created native file or folder, the launcher skips that item with a log warning and never overwrites or deletes player content.启动器的所有模组构建与运行日志都会汇入标准日志目录,可在 「设置 › 诊断 › 打开日志目录」 或 「关于 › 导出诊断日志」 直接打开:
-launcher.log):
-[build]:查看本轮启用了哪些模组、各 .vromfs.bin 数据包叠加统计、以及哪条 gui-patches 或 exe-patches 被跳过与具体原因;[mods]:查看跨盘 Junction 挂载结果、被跳过的玩家原生文件重名告警、以及自动还原的按需备份数据包;[server] 或 [mod:<你的modId>]:查看服务端 tuning 校验错误、脚本加载报错堆栈、以及你在脚本里调用 ctx.logger.info/warn/error 打印的全部输出。<游戏副本目录>/.game_logs/*.clog):
-.clog(并配合第 04 章的 sq.exe 完整字节码检查快速定位);.clog 中的 [PACK]、pkg_user 或模型资产名确认是否被引擎挂载。launcher.log):[build]:查看本轮启用了哪些模组、各 .vromfs.bin 数据包叠加统计、以及哪条 gui-patches 或 exe-patches 被跳过与具体原因;[mods]:查看跨盘 Junction 挂载结果、被跳过的玩家原生文件重名告警、以及自动还原的按需备份数据包;[server] 或 [mod:<你的modId>]:查看服务端 tuning 校验错误、脚本加载报错堆栈、以及你在脚本里调用 ctx.logger.info/warn/error 打印的全部输出。<游戏副本目录>/.game_logs/*.clog):.clog(并配合第 04 章的 sq.exe 完整字节码检查快速定位);.clog 中的 [PACK]、pkg_user 或模型资产名确认是否被引擎挂载。| 现象 / 日志报错 | 常见原因 | 解决方法 |
|---|---|---|
| 启动器提示某模组目录读取失败 | mod.jsonc 存在 JSON 语法错误、拼错了未知字段名、id 含大写或非法字符、或声明的 server.entry 文件不存在 | 对照第 01 章第 5 节字段表核对 mod.jsonc |
| 点启动提示「存在阻塞性模组错误」 | 启用的模组缺少 requires 前置、前置未勾选启用,或同时勾选了声明 conflicts 互斥的两个模组 | 按「模组」页顶部的红色错误列表补齐前置或关闭其中一个互斥项 |
模组里的 server/tuning/*.jsonc 修改似乎没生效 | 测试客户端曾在启动器「数值」页手动改过同一字段(<数据目录>/tuning/*.jsonc 优先级高于模组),或 store.jsonc 把 vehiclePacks 内部字段写到了根级 | 在启动器「数值」页将该项重置为默认,并核对第 05 章的字段层级与 "gjn" 字段名 |
服务端加载 .ts 报语法错或找不到模块 | 在 .ts 中写了 enum/namespace,或写了运行时值导入 import { ... } from '@wto/mods' | 改用 as const 对象 + 联合类型;类型提示一律写成 import type { ... } from './server-api.ts' |
gui-patches 报错 the data pack has no script ... | patch.jsonc 里的 variant.file 含有大写字母(如 scripts/gameModes/...) | 将 variant.file 改为全小写(如 scripts/gamemodes/gamemodeselect.nut) |
新增的独立 .css 样式完全没生效 | 只把 .css 放进了 client/packs/gui.vromfs.bin/,未在根样式表 gui/css.css 中注册 | 在 client/gui-patches/ 给 gui/css.css 增加一条 @import "目录文件名.css" 补丁(见第 04 章 2.2 节) |
客户端 matchingApiFunc 回调不触发或服务端收到空 params | 把 matchingApiFunc 的第 2、第 3 个参数顺序写反了 | 记住签名是 matchingApiFunc(methodName, callback, params)——callback 在第 2 位,params 在第 3 位! |
| 进机库一直卡在「正在加载」 | 新增或修补后的完整 .nut 存在词法作用域重名、未声明标识符、保留字 base 误用或反引号字符串 ` ... | 用 sq.exe 对**完整 .nut 文件**跑 compilestring 字节码校验,插值字符串统一用 $"..."` | |
日志提示 overlaps protected core patch | 模组的 client/exe-patches/ 试图修改离线版核心隔离补丁锁定的字节区间 | 核心隔离区段受保护不可覆盖,请改用非重叠地址或服务端方案 |
日志提示 target already exists as a native/player file | client/files/ 中的某文件与玩家自己在 UserSkins/ 或 UserSights/ 手动放的文件重名 | 给模组附带的配套子目录加上专属前缀(如 mod_<你的id>_...)避免撞名 |
| 现象 / 日志报错 | 常见原因 | 解决方法 |
|---|---|---|
| 启动器提示某模组目录读取失败 | mod.jsonc 存在 JSON 语法错误、拼错了未知字段名、id 含大写或非法字符、或声明的 server.entry 文件不存在 | 对照第 01 章第 5 节字段表核对 mod.jsonc |
| 点启动提示「存在阻塞性模组错误」 | 启用的模组缺少 requires 前置、前置未勾选启用,或同时勾选了声明 conflicts 互斥的两个模组 | 按「模组」页顶部的红色错误列表补齐前置或关闭其中一个互斥项 |
模组里的 server/tuning/*.jsonc 修改似乎没生效 | 测试客户端曾在启动器「数值」页手动改过同一字段(<数据目录>/tuning/*.jsonc 优先级高于模组),或 store.jsonc 把 vehiclePacks 内部字段写到了根级 | 在启动器「数值」页将该项重置为默认,并核对第 05 章的字段层级与 "gjn" 字段名 |
服务端加载 .ts 报语法错或找不到模块 | 在 .ts 中写了 enum/namespace,或写了运行时值导入 import { ... } from '@wto/mods' | 改用 as const 对象 + 联合类型;类型提示一律写成 import type { ... } from './server-api.ts' |
gui-patches 报错 the data pack has no script ... | patch.jsonc 里的 variant.file 含有大写字母(如 scripts/gameModes/...) | 将 variant.file 改为全小写(如 scripts/gamemodes/gamemodeselect.nut) |
新增的独立 .css 样式完全没生效 | 只把 .css 放进了 client/packs/gui.vromfs.bin/,未在根样式表 gui/css.css 中注册 | 在 client/gui-patches/ 给 gui/css.css 增加一条 @import "目录\文件名.css" 补丁(见第 04 章 2.2 节) |
客户端 matchingApiFunc 回调不触发或服务端收到空 params | 把 matchingApiFunc 的第 2、第 3 个参数顺序写反了 | 记住签名是 matchingApiFunc(methodName, callback, params)——callback 在第 2 位,params 在第 3 位! |
| 进机库一直卡在「正在加载」 | 新增或修补后的完整 .nut 存在词法作用域重名、未声明标识符、保留字 base 误用或反引号字符串 `...` | 用 sq.exe 对完整 .nut 文件跑 compilestring 字节码校验,插值字符串统一用 $"..." |
日志提示 overlaps protected core patch | 模组的 client/exe-patches/ 试图修改离线版核心隔离补丁锁定的字节区间 | 核心隔离区段受保护不可覆盖,请改用非重叠地址或服务端方案 |
日志提示 target already exists as a native/player file | client/files/ 中的某文件与玩家自己在 UserSkins/ 或 UserSights/ 手动放的文件重名 | 给模组附带的配套子目录加上专属前缀(如 mod_<你的id>_...)避免撞名 |
在本地编写与调试模组时,了解客户端与服务端各自的加载时机能省下大量时间:
-client/packs/、client/gui-patches/、client/exe-patches/、client/addon/、client/files/、config-blk.patch.jsonc):
-wtoffline/stock/ 重新叠加生成最新数据包并启动游戏!client/addon/res/ 或 client/files/UserSkins/<子目录>/ 内部贴图,文件本身已经是零拷贝直连的,重启游戏(或游戏内点刷新涂装)即可直接读取最新文件。server/index.ts 与 server/tuning/*.jsonc):
-server/tuning/*.jsonc,并通过带时间戳的 ESM 动态导入(?wto_mod=<timestamp>)全新加载 server/index.ts,无需重启启动器本身。client/packs/、client/gui-patches/、client/exe-patches/、client/addon/、client/files/、config-blk.patch.blk / .jsonc):wtoffline/stock/ 重新叠加生成最新数据包并启动游戏!client/addon/res/ 或 client/files/UserSkins/<子目录>/ 内部贴图,文件本身已经是零拷贝直连的,重启游戏(或游戏内点刷新涂装)即可直接读取最新文件。server/index.ts 与 server/tuning/*.jsonc):server/tuning/*.jsonc,并通过带时间戳的 ESM 动态导入(?wto_mod=<timestamp>)全新加载 server/index.ts,无需重启启动器本身。.zip 结构)当你完成测试准备把模组分享给其他玩家时,请遵循统一的压缩包目录约定,让玩家解压即用、不踩套娃目录坑:
-my-awesome-mod,打包后的 my-awesome-mod.zip 内部结构应当是:my-awesome-mod,打包后的 my-awesome-mod.zip 内部结构应当是:my-awesome-mod.zip
└─ my-awesome-mod/ <-- 唯一顶层文件夹(玩家直接解压到 mods/ 即可得到 mods/my-awesome-mod/mod.jsonc)
├─ mod.jsonc
├─ client/
└─ server/mod.jsonc 裸放在 .zip 根目录(玩家直接“解压到当前文件夹”会把散文件撒满 mods/ 根目录导致无法识别);my-awesome-mod/my-awesome-mod/mod.jsonc),启动器只扫描 mods/ 下的一级子目录!.git/、node_modules/(若用第三方库请预打包进单文件 server/index.mjs)、.DS_Store、Thumbs.db、编辑器备份文件(*.bak、*.swp)以及临时解包参考用的原版大文件。.git/、node_modules/(若用第三方库请预打包进单文件 server/index.mjs)、.DS_Store、Thumbs.db、编辑器备份文件(*.bak、*.swp)以及临时解包参考用的原版大文件。client/addon/(3D 模型与贴图)和单模组独占子目录(如 UserSkins/<子目录>)全部通过 NTFS Directory Junction 挂载——跨盘可用、免管理员权限、0 额外空间、约 1 毫秒完成;sound/mod/*.bank):依次尝试文件符号链接(开启 Windows 开发者模式时跨盘零拷贝)→ 同盘硬链接 → 按文件大小与修改时间比对的增量缓存复制(未改动文件下次启动自动跳过);<作者>.<模组名>;新增载具 ID、武器、涂装子目录、自定义匹配 RPC(wto_mod.<模组名>.*)、自定义 Char 动作均加上专属前缀,避免与其他模组撞名;shop.blk、wpcost.blk、unittags.blk、units.csv、menu.csv 时使用 .patch.jsonc / .patch.csv,多车礼包与抽卡箱数组使用 $listOps;ctx.storage.forPlayer(userId),卸载模组后玩家主存档干干净净;client/packs/gui.vromfs.bin/,client/gui-patches/ 里只留几行挂入口按钮与 @import 样式的最小补丁,游戏大版本更新时几乎不用重写;<作者>.<模组名>;新增载具 ID、武器、涂装子目录、自定义匹配 RPC(wto_mod.<模组名>.*)、自定义 Char 动作均加上专属前缀,避免与其他模组撞名;shop.blk、wpcost.blk、unittags.blk、units.csv、menu.csv 时使用 .patch.blk(或 .patch.jsonc)/ .patch.csv,多车礼包与抽卡箱数组使用 $listOps;ctx.storage.forPlayer(userId),卸载模组后玩家主存档干干净净;client/packs/gui.vromfs.bin/,client/gui-patches/ 里只留几行挂入口按钮与 @import 样式的最小补丁,游戏大版本更新时几乎不用重写;All mod build and runtime logs flow into the launcher's standard log directory—open Settings › Diagnostics › Open logs folder or About › Export diagnostics:
-launcher.log):
-[build]: see which mods ran in the current build, .vromfs.bin overlay counts, and exact reasons why any gui-patches or exe-patches item was skipped;[mods]: see cross-drive Junction mounts, skipped native player-file collision warnings, and restored on-demand stock packs;[server] or [mod:<yourModId>]: see server tuning validation errors, script load stack traces, and everything printed via ctx.logger.info/warn/error.<copyFolder>/.game_logs/*.clog):
-.clog (and run sq.exe full bytecode verification from Chapter 04);.clog for [PACK], pkg_user, or your asset name to confirm engine mounting.All mod build and runtime logs flow into the launcher's standard log directory—open Settings › Diagnostics › Open logs folder or About › Export diagnostics:
+launcher.log):[build]: see which mods ran in the current build, .vromfs.bin overlay counts, and exact reasons why any gui-patches or exe-patches item was skipped;[mods]: see cross-drive Junction mounts, skipped native player-file collision warnings, and restored on-demand stock packs;[server] or [mod:<yourModId>]: see server tuning validation errors, script load stack traces, and everything printed via ctx.logger.info/warn/error.<copyFolder>/.game_logs/*.clog):.clog (and run sq.exe full bytecode verification from Chapter 04);.clog for [PACK], pkg_user, or your asset name to confirm engine mounting.| Symptom / Log Message | Common Cause | Solution |
|---|---|---|
| Discovery error on Launcher Mods page | mod.jsonc syntax error, unknown field name, uppercase/invalid id, or missing server.entry file | Validate mod.jsonc against the schema table in Chapter 01 Section 5 |
| "Blocking mod errors" when clicking Launch | Missing or disabled requires dependency, or two enabled mods declaring conflicts | Enable the missing dependency or disable one of the conflicting mods highlighted in red |
server/tuning/*.jsonc changes appear ignored | Test client has a manual override saved in the Launcher Tuning tab (<dataFolder>/tuning/*.jsonc has highest priority), or store.jsonc placed vehiclePacks subkeys at root | Reset overridden fields in the Launcher Tuning tab and check vehiclePacks nesting + "gjn" key names in Chapter 05 |
Server .ts fails with syntax or module-not-found error | Raw .ts used enum/namespace, or value-imported import { ... } from '@wto/mods' | Replace enum with as const + union type; use import type { ... } from './server-api.ts' for types |
gui-patches fails with the data pack has no script ... | variant.file in patch.jsonc used camelCase / uppercase letters (e.g. scripts/gameModes/...) | Change variant.file to all lowercase (e.g. scripts/gamemodes/gamemodeselect.nut) |
Standalone .css stylesheet has no effect | Added .css to client/packs/gui.vromfs.bin/ without registering it in gui/css.css | Add a client/gui-patches/ patch on gui/css.css appending @import "folderstyle.css" (Chapter 04 Section 2.2) |
Client matchingApiFunc callback does not fire or params arrive empty | Swapped the 2nd and 3rd arguments of matchingApiFunc | Use matchingApiFunc(methodName, callback, params) (callback is 2nd, params is 3rd) |
| Game hangs indefinitely on "Loading" before hangar | Resulting complete .nut file has a lexical scope collision, undeclared identifier, base keyword misuse, or backtick string ` ... | Run sq.exe compilestring on the **complete .nut file** and use $"..."` for string interpolation | |
Log reports overlaps protected core patch | Mod client/exe-patches/ overlaps locked core offline/isolation patch bytes | Core isolation bytes are protected; pick a non-overlapping site or use a server-side hook |
Log reports target already exists as a native/player file | A path under client/files/ collides with a player-owned file in UserSkins/ or UserSights/ | Prefix bundled companion subfolders with your mod namespace (e.g. mod_<yourId>_...) |
| Symptom / Log Message | Common Cause | Solution |
|---|---|---|
| Discovery error on Launcher Mods page | mod.jsonc syntax error, unknown field name, uppercase/invalid id, or missing server.entry file | Validate mod.jsonc against the schema table in Chapter 01 Section 5 |
| "Blocking mod errors" when clicking Launch | Missing or disabled requires dependency, or two enabled mods declaring conflicts | Enable the missing dependency or disable one of the conflicting mods highlighted in red |
server/tuning/*.jsonc changes appear ignored | Test client has a manual override saved in the Launcher Tuning tab (<dataFolder>/tuning/*.jsonc has highest priority), or store.jsonc placed vehiclePacks subkeys at root | Reset overridden fields in the Launcher Tuning tab and check vehiclePacks nesting + "gjn" key names in Chapter 05 |
Server .ts fails with syntax or module-not-found error | Raw .ts used enum/namespace, or value-imported import { ... } from '@wto/mods' | Replace enum with as const + union type; use import type { ... } from './server-api.ts' for types |
gui-patches fails with the data pack has no script ... | variant.file in patch.jsonc used camelCase / uppercase letters (e.g. scripts/gameModes/...) | Change variant.file to all lowercase (e.g. scripts/gamemodes/gamemodeselect.nut) |
Standalone .css stylesheet has no effect | Added .css to client/packs/gui.vromfs.bin/ without registering it in gui/css.css | Add a client/gui-patches/ patch on gui/css.css appending @import "folder\style.css" (Chapter 04 Section 2.2) |
Client matchingApiFunc callback does not fire or params arrive empty | Swapped the 2nd and 3rd arguments of matchingApiFunc | Use matchingApiFunc(methodName, callback, params) (callback is 2nd, params is 3rd) |
| Game hangs indefinitely on "Loading" before hangar | Resulting complete .nut file has a lexical scope collision, undeclared identifier, base keyword misuse, or backtick string `...` | Run sq.exe compilestring on the complete .nut file and use $"..." for string interpolation |
Log reports overlaps protected core patch | Mod client/exe-patches/ overlaps locked core offline/isolation patch bytes | Core isolation bytes are protected; pick a non-overlapping site or use a server-side hook |
Log reports target already exists as a native/player file | A path under client/files/ collides with a player-owned file in UserSkins/ or UserSights/ | Prefix bundled companion subfolders with your mod namespace (e.g. mod_<yourId>_...) |
Knowing when client builds versus server scripts reload keeps iteration fast while developing:
-client/packs/, client/gui-patches/, client/exe-patches/, client/addon/, client/files/, config-blk.patch.jsonc):
-mtime timestamps into a deterministic build fingerprint, automatically rebuilding any affected .vromfs.bin packs from wtoffline/stock/ before starting the game!client/addon/res/ or client/files/UserSkins/<subfolder>/) point directly to your mods/ folder with zero copying, so restarting the client (or refreshing skins in-game) reads updated assets immediately.server/index.ts & server/tuning/*.jsonc):
-server/tuning/*.jsonc overlays, and reloads server/index.ts with a cache-busting ESM query (?wto_mod=<timestamp>)—no need to restart the launcher itself.client/packs/, client/gui-patches/, client/exe-patches/, client/addon/, client/files/, config-blk.patch.blk / .jsonc):mtime timestamps into a deterministic build fingerprint, automatically rebuilding any affected .vromfs.bin packs from wtoffline/stock/ before starting the game!client/addon/res/ or client/files/UserSkins/<subfolder>/) point directly to your mods/ folder with zero copying, so restarting the client (or refreshing skins in-game) reads updated assets immediately.server/index.ts & server/tuning/*.jsonc):server/tuning/*.jsonc overlays, and reloads server/index.ts with a cache-busting ESM query (?wto_mod=<timestamp>)—no need to restart the launcher itself..zip Layout Rules)When packaging your mod for players to download, follow a consistent archive structure so unzipping into mods/ works every time:
<mod-folder>/ directory inside the .zip: For a mod folder named my-awesome-mod, structure my-awesome-mod.zip as:<mod-folder>/ directory inside the .zip:
+For a mod folder named my-awesome-mod, structure my-awesome-mod.zip as:my-awesome-mod.zip
└─ my-awesome-mod/ <-- Single top-level folder (extracting straight into mods/ yields mods/my-awesome-mod/mod.jsonc)
├─ mod.jsonc
├─ client/
└─ server/mod.jsonc loose at the root of the .zip (extracting into mods/ scatters loose files across mods/ where discovery ignores them);my-awesome-mod/my-awesome-mod/mod.jsonc), as the launcher scans direct child directories of mods/ only!.git/, node_modules/ (bundle third-party JS dependencies into a single server/index.mjs if needed), .DS_Store, Thumbs.db, editor backup files (*.bak, *.swp), and any unpacked stock game reference files..git/, node_modules/ (bundle third-party JS dependencies into a single server/index.mjs if needed), .DS_Store, Thumbs.db, editor backup files (*.bak, *.swp), and any unpacked stock game reference files.client/addon/ (3D models & textures) and mod-exclusive subfolders (e.g. UserSkins/<subfolder>) mount via NTFS Directory Junctions—works across drives, requires no admin rights, uses 0 extra disk space, and completes in ~1 ms;sound/mod/*.bank): tries file symlink (zero-copy across drives when Windows Developer Mode is on) → same-drive NTFS hardlink → incremental size/mtime cached copy (unchanged files are skipped on subsequent launches);<author>.<mod-name> and prefix custom vehicle IDs, weapons, skin subfolders, custom matching RPCs (wto_mod.<mod_name>.*), and custom Char actions to avoid collisions between mods;.patch.jsonc / .patch.csv for shop.blk, wpcost.blk, unittags.blk, units.csv, and menu.csv, and use $listOps on shared tuning arrays like multiVehiclePacks and supplyTrophies;ctx.storage.forPlayer(userId) so player saves remain 100% clean if your mod is disabled or uninstalled;client/packs/gui.vromfs.bin/ and keep client/gui-patches/ down to a few lines wiring the entry button and gui/css.css @import so game updates rarely break your mod;<author>.<mod-name> and prefix custom vehicle IDs, weapons, skin subfolders, custom matching RPCs (wto_mod.<mod_name>.*), and custom Char actions to avoid collisions between mods;.patch.blk (or .patch.jsonc) / .patch.csv for shop.blk, wpcost.blk, unittags.blk, units.csv, and menu.csv, and use $listOps on shared tuning arrays like multiVehiclePacks and supplyTrophies;ctx.storage.forPlayer(userId) so player saves remain 100% clean if your mod is disabled or uninstalled;client/packs/gui.vromfs.bin/ and keep client/gui-patches/ down to a few lines wiring the entry button and gui/css.css @import so game updates rarely break your mod;