feat(accounts)!: require explicit local account registration

Open the local signup page in the game's embedded browser before sign-in. Return the existing login error for unknown accounts or invalid passwords.

BREAKING CHANGE: First-time players must register in the game's signup window or create a save in the launcher before signing in. Existing accounts can sign in with their saved credentials.
This commit is contained in:
N0VAN0M4LY committed 2026-11-29 18:00:21 +08:00
1 parent d20b7f4249
commit d043a8f0f8
23 files changed
+134 -32

No files matched your search

+6 -2
View File
@@ -74,7 +74,7 @@ AI 的驾驶、寻路和战术使用游戏自带的 AI,目前仍有明显不
- **服务地址**:`config/network.blk`(`char.vromfs.bin`)和 `config/settings.blk`(`aces.vromfs.bin`)中所有 Gaijin 地址改写为 `127.0.0.1:<端口>`。端口在构建时写入,因此服务器必须使用相同的端口。
- **配置表**:开启离线需要的功能开关,放出隐藏载具,写入贴花索引,为本地商店的礼包登记 GUID。
- **exe 补丁**:`patches/exe/` 下共 12 项,见下表。
- **界面脚本补丁**:`patches/gui/` 下共 35 项,用于本地对局的开局与结算、本地商店的购买回执,以及库存签名公钥等。
- **界面脚本补丁**:`patches/gui/` 下共 37 项,用于本地账号注册、本地对局的开局与结算、本地商店的购买回执,以及库存签名公钥等。
- **网络钩子库**:exe 的导入表把 `WS2_32.dll` 改为同长度的 `wto_ws.dll`。该库转发系统 `ws2_32.dll` 的全部导出,并用 MinHook 挂钩域名解析(`getaddrinfo` 等)、连接(`connect`、`ConnectEx` 等)和 UDP 发送,把所有外部连接重定向到本地服务器端口。端口从 exe 旁的 `wto_ws.cfg` 读取。
| exe 补丁 | 作用 |
@@ -178,6 +178,8 @@ node scripts/build-game-copy.ts --game "<原版目录>" --out "<副本目录>" -
node apps/server/src/cli.ts --game "<副本目录>" --data "<数据目录>" --port 27015
```
第一次登录前,在游戏登录界面点击「注册」,或在启动器的「存档」页创建本地账号。已有本地账号可以直接登录。
`build-game-copy.ts` 的可选参数:
| 参数 | 说明 |
@@ -327,7 +329,7 @@ Static data such as vehicles, tech trees, prices, and reward factors is extracte
- **Service addresses**: every Gaijin address in `config/network.blk` (`char.vromfs.bin`) and `config/settings.blk` (`aces.vromfs.bin`) is rewritten to `127.0.0.1:<port>`. The port is written at build time, so the server must use the same port.
- **Config tables**: enables feature flags the offline copy needs, reveals hidden vehicles, adds a decal index, and registers GUIDs for local store packs.
- **exe patches**: 12 patches under `patches/exe/`, listed below.
- **UI script patches**: 35 patches under `patches/gui/`, covering local battle start and settlement, local store purchase receipts, and the inventory signing key, among others.
- **UI script patches**: 37 patches under `patches/gui/`, covering local account registration, battle start and settlement, store purchase receipts, and the inventory signing key.
- **Network hook library**: the import table entry `WS2_32.dll` is renamed to `wto_ws.dll`, which has the same length. The library forwards every export of the system `ws2_32.dll` and uses MinHook to hook name resolution (`getaddrinfo` and others), connections (`connect`, `ConnectEx`, and others), and UDP sends, redirecting every external connection to the local server port. The port is read from `wto_ws.cfg` next to the exe.
| exe patch | Purpose |
@@ -431,6 +433,8 @@ node scripts/build-game-copy.ts --game "<stock folder>" --out "<copy folder>" --
node apps/server/src/cli.ts --game "<copy folder>" --data "<data folder>" --port 27015
```
Before the first sign-in, select **Register** on the game login screen or create a local account on the launcher's **Saves** page. Existing local accounts can sign in directly.
Optional arguments for `build-game-copy.ts`:
| Argument | Description |