docs(mods): align handbook chapters with .patch.blk and UI image format notes
This commit is contained in:
1 parent
0af4183cb1
commit
37cbcd806f
9 files changed
+26
-26
No files matched your search
@@ -12,7 +12,7 @@
|
||||
| 章节 | 内容概览 |
|
||||
| --- | --- |
|
||||
| [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` 详解、从零克隆独立新坦克完整实战 |
|
||||
| [02 · 客户端数据包与 BLK 增量补丁](zh-CN/02-client-packs-and-blk.md) | BLK 与 JSON 差异对照、8 个可叠加数据包、Dagor 原生 `*.blk.patch.blk` 与 `include` 编译语法、JSONC 兼容格式、13 种 BLK 类型、分房权重(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` 增量语法 |
|
||||
@@ -41,7 +41,7 @@
|
||||
| Chapter | Topics |
|
||||
| --- | --- |
|
||||
| [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 |
|
||||
| [02 · Client Packs & BLK Patching](en/02-client-packs-and-blk.md) | BLK vs JSON side-by-side intro, 8 overlayable `.vromfs.bin` packs, Dagor-style `*.blk.patch.blk` & `include` compiler, legacy JSONC format, all 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 |
|
||||
|
||||
@@ -118,7 +118,7 @@ Create only the subdirectories your mod actually uses—unused folders can be om
|
||||
├─ 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 patch
|
||||
└─ config-blk.patch.blk # optional root config.blk incremental patch (also accepts .patch.jsonc)
|
||||
```
|
||||
|
||||
---
|
||||
@@ -149,7 +149,7 @@ Manifest parsing enforces **strict whitelist validation**: typos or unknown keys
|
||||
|
||||
After 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 / Assets (`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`);
|
||||
- **Data / Assets (`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`);
|
||||
- **UI Patches (`gui`)**: contains `client/gui-patches/`;
|
||||
- **Server Script (`script`)**: contains an executable server JS/TS entry script;
|
||||
- **Binary Patches (`exe`)**: contains `client/exe-patches/` (high-risk; guarded by the core offline isolation patch lock).
|
||||
|
||||
@@ -48,8 +48,8 @@ Place your files under `client/packs/<pack-path>/` matching the target archive's
|
||||
| `client/packs/lang.vromfs.bin/` | `lang/units.csv`, `lang/menu.csv`, `lang/units_weaponry.csv`, and other localization CSVs | Backed up on demand, restored on disable |
|
||||
| `client/packs/mis.vromfs.bin/` | `gamedata/missions/.../*.blk` multiplayer and custom missions | Backed up on demand, restored on disable |
|
||||
| `client/packs/game.vromfs.bin/` | `danetlibs/...`, `game/...` scripts and configs | Backed 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 |
|
||||
| `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.
|
||||
|
||||
@@ -145,7 +145,7 @@ commonWeapons {
|
||||
- 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)
|
||||
|
||||
@@ -322,7 +322,7 @@ country_usa (or country_germany / country_ussr / country_britain / country_japan
|
||||
└─ range { ... } <-- range[5]..range[6]: right-hand Golden Eagle / Pack / Event / Squadron columns
|
||||
```
|
||||
|
||||
Keep three rules in mind when writing `shop.blk.patch.jsonc`:
|
||||
Keep three rules in mind when writing `shop.blk.patch.blk` (or `.patch.jsonc`):
|
||||
|
||||
1. **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.;
|
||||
2. **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`;
|
||||
|
||||
@@ -44,9 +44,9 @@ mods/demo-new-mbt/
|
||||
│ └─ us_mbt_demo.blk # ② Physics, armor, turret & weapons (text BLK compiles automatically)
|
||||
├─ char.vromfs.bin/
|
||||
│ └─ config/
|
||||
│ ├─ wpcost.blk.patch.jsonc # ③ Price, RP, BR & modifications (fastest via cloneBlock)
|
||||
│ ├─ shop.blk.patch.jsonc # ④ Tech-tree column & position
|
||||
│ └─ unittags.blk.patch.jsonc # ④ Unit class, hangar slot, test-drive mission & tags
|
||||
│ ├─ wpcost.blk.patch.blk # ③ Price, RP, BR & modifications (fastest via @clone:; .patch.jsonc also supported)
|
||||
│ ├─ shop.blk.patch.blk # ④ Tech-tree column & position
|
||||
│ └─ unittags.blk.patch.blk # ④ Unit class, hangar slot, test-drive mission & tags
|
||||
├─ lang.vromfs.bin/
|
||||
│ └─ lang/
|
||||
│ └─ units.csv.patch.csv # ⑤ Localized names (_shop, _0, _1, _2)
|
||||
@@ -68,7 +68,7 @@ mods/demo-new-mbt/
|
||||
|
||||
## 3. Regular Tech-Tree Vehicles vs `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**:
|
||||
|
||||
### Option A: Regular Silver Lions Tech-Tree Vehicle (Recommended If You Want AI Bots to Drive It)
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ All mod build and runtime logs flow into the launcher's standard log directory
|
||||
|
||||
Knowing when client builds versus server scripts reload keeps iteration fast while developing:
|
||||
|
||||
1. **Client-side edits (`client/packs/`, `client/gui-patches/`, `client/exe-patches/`, `client/addon/`, `client/files/`, `config-blk.patch.jsonc`)**:
|
||||
1. **Client-side edits (`client/packs/`, `client/gui-patches/`, `client/exe-patches/`, `client/addon/`, `client/files/`, `config-blk.patch.blk` / `.jsonc`)**:
|
||||
- Close the running game client first;
|
||||
- Save your edited mod files and click **Launch** in the launcher: the launcher hashes source file sizes and `mtime` timestamps into a deterministic build fingerprint, automatically rebuilding any affected `.vromfs.bin` packs from `wtoffline/stock/` before starting the game!
|
||||
- Tip: textures inside already-mounted NTFS Junction directories (`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.
|
||||
@@ -77,7 +77,7 @@ my-awesome-mod.zip
|
||||
## 6. Practical Recommendations for Mod Authors
|
||||
|
||||
1. **Namespace Everything**: format your mod ID as `<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;
|
||||
2. **Prefer Incremental Patches Over Replacing Shared Tables**: use `.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`;
|
||||
2. **Prefer Incremental Patches Over Replacing Shared Tables**: use `.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`;
|
||||
3. **Read Stock Profiles, Persist in Isolated Storage**: write all custom mod state to `ctx.storage.forPlayer(userId)` so player saves remain 100% clean if your mod is disabled or uninstalled;
|
||||
4. **Keep UI Logic in Standalone Files**: put custom modals under `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;
|
||||
5. **Run One Full "Enable → Play → Disable → Relaunch" Cycle Before Release**: verify your mod works when enabled, restores stock behavior cleanly when disabled, and coexists peacefully alongside other enabled mods.
|
||||
@@ -118,7 +118,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 的增量补丁
|
||||
└─ config-blk.patch.blk # 可选:游戏根目录 config.blk 的增量补丁(也兼容 .patch.jsonc)
|
||||
```
|
||||
|
||||
---
|
||||
@@ -149,7 +149,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`);
|
||||
- **数据/资源(`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/`(高风险,且受离线核心隔离补丁锁保护)。
|
||||
|
||||
@@ -48,8 +48,8 @@ us_m2a4 {
|
||||
| `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/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,无需手工同步两遍。
|
||||
|
||||
@@ -145,7 +145,7 @@ commonWeapons {
|
||||
- 同名并列子块(如 `shop.blk` 里连续多个 `range` 块)可以用 **`名称[索引]`**(0 起始)精确定位;不写索引默认命中第 0 个同名子块;
|
||||
- `[]` 表示当前文档根节点本身。
|
||||
|
||||
### 4.2 全部 7 种操作(`op`)
|
||||
#### 全部 7 种操作(`op`)
|
||||
|
||||
#### ① `setParam`:设置参数(存在则覆盖并去重同名项,不存在则新增)
|
||||
|
||||
@@ -322,7 +322,7 @@ country_usa (或 country_germany / country_ussr / country_britain / country_japa
|
||||
└─ range { ... } <-- range[5]..range[6]:右侧金币车 / 礼包车 / 活动车 / 联队车独立纵列
|
||||
```
|
||||
|
||||
编写 `shop.blk.patch.jsonc` 时只需记住三条核心规则:
|
||||
编写 `shop.blk.patch.blk`(或 `.patch.jsonc`)时只需记住三条核心规则:
|
||||
|
||||
1. **每个 `range` 就是科技树上的一条纵向列**:因为它们都叫 `range`,在补丁 `path` 里用 `"range[0]"`、`"range[1]"`、`"range[5]"` 按从左到右(0 起始)定位;
|
||||
2. **折叠文件夹(`*_group`)**:当同一格折叠了多辆同系载具时,`range` 下会放一个以 `_group` 结尾的子块(例如 `us_sherman_group`),里面再嵌套各辆具体载具子块,折叠封面标题来自 `units.csv` 的 `shop/group/<组名>`;
|
||||
|
||||
@@ -44,9 +44,9 @@ mods/demo-new-mbt/
|
||||
│ └─ 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)
|
||||
@@ -68,7 +68,7 @@ mods/demo-new-mbt/
|
||||
|
||||
## 3. 银狮研发车 vs `gift` 商城礼包车(以及 AI 机器人池准入规则)
|
||||
|
||||
在 `wpcost.blk.patch.jsonc` 和 `shop.blk.patch.jsonc` 中,你可以自由决定这辆新车是走**常规银狮研发线**还是走**本地网页商城礼包**:
|
||||
在 `wpcost.blk.patch.blk` 和 `shop.blk.patch.blk`(或 `.patch.jsonc`)中,你可以自由决定这辆新车是走**常规银狮研发线**还是走**本地网页商城礼包**:
|
||||
|
||||
### 方式 A:常规银狮科技树研发车(推荐希望 AI 也能开这辆车出战时使用)
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
在本地编写与调试模组时,了解客户端与服务端各自的加载时机能省下大量时间:
|
||||
|
||||
1. **修改客户端内容(`client/packs/`、`client/gui-patches/`、`client/exe-patches/`、`client/addon/`、`client/files/`、`config-blk.patch.jsonc`)**:
|
||||
1. **修改客户端内容(`client/packs/`、`client/gui-patches/`、`client/exe-patches/`、`client/addon/`、`client/files/`、`config-blk.patch.blk` / `.jsonc`)**:
|
||||
- 先正常退出游戏客户端;
|
||||
- 保存你修改的模组源文件后,直接在启动器点击 **「启动游戏」**:启动器会自动比对所有启用模组源文件的大小与修改时间指纹(Fingerprint),一旦发现任一补丁或包内文件有改动,就会自动从 `wtoffline/stock/` 重新叠加生成最新数据包并启动游戏!
|
||||
- 提示:如果只是微调已通过 NTFS Junction 挂载的 `client/addon/res/` 或 `client/files/UserSkins/<子目录>/` 内部贴图,文件本身已经是零拷贝直连的,重启游戏(或游戏内点刷新涂装)即可直接读取最新文件。
|
||||
@@ -77,7 +77,7 @@ my-awesome-mod.zip
|
||||
## 6. 开发与发布建议
|
||||
|
||||
1. **命名空间隔离**:模组 ID 用 `<作者>.<模组名>`;新增载具 ID、武器、涂装子目录、自定义匹配 RPC(`wto_mod.<模组名>.*`)、自定义 Char 动作均加上专属前缀,避免与其他模组撞名;
|
||||
2. **公共表优先使用增量补丁而非整文件覆盖**:修改 `shop.blk`、`wpcost.blk`、`unittags.blk`、`units.csv`、`menu.csv` 时使用 `.patch.jsonc` / `.patch.csv`,多车礼包与抽卡箱数组使用 `$listOps`;
|
||||
2. **公共表优先使用增量补丁而非整文件覆盖**:修改 `shop.blk`、`wpcost.blk`、`unittags.blk`、`units.csv`、`menu.csv` 时使用 `.patch.blk`(或 `.patch.jsonc`)/ `.patch.csv`,多车礼包与抽卡箱数组使用 `$listOps`;
|
||||
3. **只读原版,不污染玩家主存档**:模组自定数据一律写进 `ctx.storage.forPlayer(userId)`,卸载模组后玩家主存档干干净净;
|
||||
4. **界面大逻辑拆独立文件**:新弹窗放 `client/packs/gui.vromfs.bin/`,`client/gui-patches/` 里只留几行挂入口按钮与 `@import` 样式的最小补丁,游戏大版本更新时几乎不用重写;
|
||||
5. **发布前做一次完整的「启用 → 进游验证 → 关闭 → 再进游还原」测试循环**:确认启用时功能正常、关闭后彻底无痕还原,且能与其他常用模组同时勾选共存。
|
||||
Reference in new issue
Block a user