docs(mods): fix schema errors and expand bilingual mod handbook to full parity
Fix store.jsonc vehiclePacks nesting and gjn field name, matchingApiFunc callback argument order, and DaGui CSS @import/lowercase rules; add stock archive inspection steps, BR-to-mrank table, cloned vehicle walkthrough, tuning field reference, and official-map-selector full-stack trace while bringing en/01..07.md to full 1:1 parity with zh-CN/.
This commit is contained in:
1 parent
e79866b96e
commit
a2fdcc1f15
15 files changed
+2320
-468
No files matched your search
+26
-16
@@ -11,23 +11,23 @@
|
||||
|
||||
| 章节 | 内容概览 |
|
||||
| --- | --- |
|
||||
| [01 · 快速入门与清单规范](zh-CN/01-quick-start.md) | 5 分钟做出第一个模组、目录结构、`mod.jsonc` 全字段表、依赖/互斥/排序、风险徽标与启动器调试 |
|
||||
| [02 · 客户端数据包与 BLK 增量补丁](zh-CN/02-client-packs-and-blk.md) | 8 个可叠加 `.vromfs.bin` 包、BLK 补丁全部 7 种操作(含 `cloneBlock`)、13 种 BLK 类型写法、文本 `.blk` 自动编译、CSV 词条合并、`config.blk` 补丁 |
|
||||
| [03 · 添加全新 3D 模型与贴图载具](zh-CN/03-custom-3d-vehicles.md) | `client/addon/res/`(`.grp` + `.dxp.bin`)跨盘 NTFS Junction 零拷贝挂载、挂进科技树/经济/图标/译名、原生涂装瞄具边界说明 |
|
||||
| [04 · 客户端 GUI 补丁与声明式 EXE 补丁](zh-CN/04-client-gui-and-exe.md) | 增量 GUI 脚本补丁、新增原生 DaGui 弹窗、`sq.exe` Quirrel 完整字节码检查、声明式 `exe` 补丁与核心隔离保护红线 |
|
||||
| [05 · 服务端零代码数值叠加(Tuning)](zh-CN/05-server-tuning.md) | 12 份 `server/tuning/*.jsonc` 说明、多层合并顺序、`$listOps` 列表增量操作(`append` / `prepend` / `upsertBy` / `removeBy`) |
|
||||
| [06 · 服务端 JS/TS 脚本完整接口手册](zh-CN/06-server-scripting-api.md) | Node 24 原生 TS 语法要求、`WtoServerModContext`、独立存档区 `storage`、全部生命周期与对局钩子(含 `onFilterMissions`)、`char` / `matching` / `http` 路由与完整范例 |
|
||||
| [07 · 排错、日志与最佳实践](zh-CN/07-troubleshooting-and-faq.md) | 定位 `launcher.log` 与本地服务器日志、冲突分析、防止损坏玩家存档、跨盘与非 NTFS 磁盘行为说明 |
|
||||
| [01 · 快速入门与清单规范](zh-CN/01-quick-start.md) | 叠加架构、原版数据解包与查阅指南、5 分钟做出第一个模组、标准目录结构、`mod.jsonc` 全字段表、叠加能力徽标与依赖排序 |
|
||||
| [02 · 客户端数据包与 BLK 增量补丁](zh-CN/02-client-packs-and-blk.md) | BLK 与 JSON 差异对照、8 个可叠加数据包、全部 7 种 BLK 补丁操作与 13 种类型、分房权重(BR ↔ `mrank`)速查表、`shop.blk` 与 `units.csv` 详解、从零克隆独立新坦克完整实战 |
|
||||
| [03 · 添加全新 3D 模型与贴图载具](zh-CN/03-custom-3d-vehicles.md) | `.grp`/`.dxp.bin`/`.ddsx` 与跨盘 NTFS Junction 通俗说明、新车 6 步接入清单、`gift` 礼包机制与 AI 机器人池准入规则、配套外置资源边界 |
|
||||
| [04 · 客户端 GUI 补丁与声明式 EXE 补丁](zh-CN/04-client-gui-and-exe.md) | DaGui 三件套(`.tpl`/`.css`/`.nut`)与 `gui/css.css` 注册规则、全小写精确路径与 `variants` 唯一命中机制、`sq.exe` 编译与完整字节码校验、声明式 `exe` 补丁与核心隔离锁 |
|
||||
| [05 · 服务端零代码数值叠加(Tuning)](zh-CN/05-server-tuning.md) | 多层合并优先级(含启动器玩家覆盖说明)、12 份 `server/tuning/*.jsonc` 一览、`store.jsonc` 等核心字段速查与 `$listOps` 增量语法 |
|
||||
| [06 · 服务端 JS/TS 脚本完整接口手册](zh-CN/06-server-scripting-api.md) | Node 24 可擦除 TS 语法对照与 VS Code 类型补全、`WtoServerModContext`、独立存档区、生命周期与对局钩子精确结构、`matchingApiFunc` 签名与三大路由对比、`official-map-selector` 全栈拆解 |
|
||||
| [07 · 排错、日志与最佳实践](zh-CN/07-troubleshooting-and-faq.md) | 日志定位、常见报错速查表、开发调试热重载循环、`.zip` 打包发布规范、跨盘与非 NTFS 磁盘行为、开发与发布建议 |
|
||||
|
||||
### 自带官方模组模板(`templates/`)
|
||||
|
||||
以下 3 个模组会随 WTOffline 启动器自动分发到玩家首次初始化的全局 `mods/` 目录(默认关闭,勾选即用),可直接对照源码学习或复制改造:
|
||||
以下 3 个模组会随 WTOffline 启动器自动分发到玩家首次初始化的全局 `mods/` 目录(默认关闭,勾选即用),可直接打开阅读源码或复制改造:
|
||||
|
||||
| 模板目录 | 定位 | 演示的核心能力 |
|
||||
| --- | --- | --- |
|
||||
| `templates/example-vehicle-tweak/` | 零代码数据与本地化示例 | `server/tuning/battle.jsonc` + `wpcost.blk.patch.jsonc` + `lang/units.csv.patch.csv` |
|
||||
| `templates/example-server-script/` | 服务端脚本最小示例 | `server/index.ts`、`onDatasetsLoaded`、`profile.onRefresh`、独立存档区、自定义 `/mods/<id>/status` 路由 |
|
||||
| `templates/official-map-selector/` | 实用全栈官方模组 | 模式选择 UI 按钮补丁 + 原生 DaGui 小地图网格弹窗 + 多语言词条 + 自定义匹配 RPC + 独立存档 + `battle.onFilterMissions` 白/黑名单选图 |
|
||||
| `templates/official-map-selector/` | 实用全栈官方模组 | 模式选择 UI 按钮补丁 + `gui/css.css` 样式注册 + 原生 DaGui 小地图网格弹窗 + 多语言词条 + 自定义匹配 RPC + 独立存档 + `battle.onFilterMissions` 白/黑名单选图 |
|
||||
|
||||
---
|
||||
|
||||
@@ -40,10 +40,20 @@
|
||||
|
||||
| Chapter | Topics |
|
||||
| --- | --- |
|
||||
| [01 · Quick Start & Manifest](en/01-quick-start.md) | Build your first mod in 5 minutes, folder layout, full `mod.jsonc` schema, dependencies/conflicts/ordering, risk badges |
|
||||
| [02 · Client Packs & BLK Patching](en/02-client-packs-and-blk.md) | 8 overlayable `.vromfs.bin` packs, all 7 BLK patch ops (including `cloneBlock`), all 13 BLK types, auto text-BLK compilation, CSV merging, `config.blk` patches |
|
||||
| [03 · Custom 3D Vehicle Models](en/03-custom-3d-vehicles.md) | `client/addon/res/` (`.grp` + `.dxp.bin`) cross-drive zero-copy NTFS Junction mounting, tech tree/economy/icons/localization wiring, native skins/sights boundary |
|
||||
| [04 · Client GUI & Declarative EXE Patches](en/04-client-gui-and-exe.md) | Incremental GUI script patches, adding standalone native DaGui modals, full Quirrel bytecode checks (`sq.exe`), declarative `exe` patches & core isolation lock |
|
||||
| [05 · Server Code-Free Tuning Overlays](en/05-server-tuning.md) | All 12 `server/tuning/*.jsonc` files, multi-layer precedence, `$listOps` (`append`, `prepend`, `upsertBy`, `removeBy`) |
|
||||
| [06 · Server JS/TS Scripting API Reference](en/06-server-scripting-api.md) | Node 24 erasable TypeScript rules, `WtoServerModContext`, isolated `storage`, all lifecycle & battle hooks (including `onFilterMissions`), `char` / `matching` / `http` routes |
|
||||
| [07 · Troubleshooting & FAQ](en/07-troubleshooting-and-faq.md) | Reading logs, diagnosing conflicts, keeping player saves clean, cross-drive and exFAT fallback behavior |
|
||||
| [01 · Quick Start & Manifest](en/01-quick-start.md) | Additive architecture, how to unpack & inspect stock game files, build your first mod in 5 minutes, folder layout, full `mod.jsonc` schema, additive capability badges & load-order rules |
|
||||
| [02 · Client Packs & BLK Patching](en/02-client-packs-and-blk.md) | BLK vs JSON side-by-side intro, 8 overlayable `.vromfs.bin` packs, all 7 BLK patch ops & 13 BLK types, BR ↔ `mrank` conversion table, `shop.blk` & `units.csv` anatomy, end-to-end standalone tank clone walkthrough |
|
||||
| [03 · Custom 3D Vehicle Models](en/03-custom-3d-vehicles.md) | Plain-language `.grp`/`.dxp.bin`/`.ddsx` & cross-drive NTFS Junction guide, 6-step custom 3D vehicle checklist, `gift` store packs & AI bot pool rules, companion files boundary |
|
||||
| [04 · Client GUI & Declarative EXE Patches](en/04-client-gui-and-exe.md) | DaGui triad (`.tpl`/`.css`/`.nut`) & `gui/css.css` `@import` rule, lowercase case-sensitive paths & single-match `variants`, building & running `sq.exe` bytecode checks, declarative `exe` patches & core isolation lock |
|
||||
| [05 · Server Code-Free Tuning Overlays](en/05-server-tuning.md) | Multi-layer precedence (including Launcher Tuning tab overrides), all 12 `server/tuning/*.jsonc` files, verified field quick-reference (`store.jsonc`, `battle.jsonc`, etc.), and `$listOps` rules |
|
||||
| [06 · Server JS/TS Scripting API Reference](en/06-server-scripting-api.md) | Node 24 erasable TS Do/Don't & VS Code autocomplete setup, `WtoServerModContext`, isolated `storage`, exact battle hook payloads, `matchingApiFunc` signature & route comparison, `official-map-selector` full-stack case study |
|
||||
| [07 · Troubleshooting & FAQ](en/07-troubleshooting-and-faq.md) | Reading logs, troubleshooting lookup table, development reload loop, `.zip` packaging & distribution rules, cross-drive/exFAT fallback behavior, and practical recommendations |
|
||||
|
||||
### Official Bundled Mod Templates (`templates/`)
|
||||
|
||||
The launcher automatically seeds these 3 ready-to-read official templates into the global `mods/` folder on first initialization (disabled by default—enable to try, or copy to start your own mod):
|
||||
|
||||
| Template Folder | Scope | Demonstrated Capabilities |
|
||||
| --- | --- | --- |
|
||||
| `templates/example-vehicle-tweak/` | Code-free data & localization | `server/tuning/battle.jsonc` + `wpcost.blk.patch.jsonc` + `lang/units.csv.patch.csv` |
|
||||
| `templates/example-server-script/` | Minimal server TypeScript mod | `server/index.ts`, `onDatasetsLoaded`, `profile.onRefresh`, isolated per-player storage, custom `/mods/<id>/status` HTTP route |
|
||||
| `templates/official-map-selector/` | Full-stack official mod | Mode-select UI button patch + `gui/css.css` stylesheet registration + standalone native DaGui map-grid modal + localized labels + custom matching RPC + isolated storage + `battle.onFilterMissions` whitelist/blacklist filtering |
|
||||
Reference in new issue
Block a user