[M19-P1] 烘焙 1.13c 商人经济与库存权威数据表 (Npc.txt / Vendor Columns / Gamble.txt / Books.txt / Stat & Skill Costs) #481

Closed
opened 2026-09-26 04:22:14 +00:00 by troytt · 1 comment
Owner

背景与目标

为 1.13c 商人库存生成器与价格计算引擎提供零网络、100% 忠实于官方 MPQ 数据表的底层数据契约。

1.13c Ground Truth 对标 (ItemsTbls.cpp / MonsterTbls.cpp)

  1. 17 位商人配置列 (Weapons.txt / Armor.txt / Misc.txt):
    • 提取 nNpcId = 0..16 的 Min, Max, MagicMin, MagicMax, MagicLvl(注意 nNpcId = 6 赫拉铁力在原版表中的列名拼写为 HraltiMin / HraltiMax / HraltiMagicMin / HraltiMagicMax / HraltiMagicLvl)。
    • 提取 PermStoreItem、multibuy、NightmareUpgrade、HellUpgrade、cost、gamble cost、bitfield1。
  2. Npc.txt 商人经济表 (src/game/npc-table.ts):
    • 解析 npc, buy mult, sell mult, rep mult, questflag A/B/C, questbuymult A/B/C, questsellmult A/B/C, questrepmult A/B/C, max buy, max buy (N), max buy (H)。
    • 建立 MonsterId (hcIdx) \leftrightarrow VendorNpcId (0..16) 及 NPC 服务能力矩阵(Trade / Gamble / Repair / Heal / Identify)。
  3. ItemTypes.txt / ItemStatCost.txt / Skills.txt / Gamble.txt / Books.txt / LowQualityItems.txt:
    • ItemTypes.txt:解析 StorePage (armr / weap / misc)、StaffMods 与 Class(用于职业专属物品收购价 /4 折算)。
    • ItemStatCost.txt:解析 ID, Stat, Encode, Multiply, Add, ValShift。
    • Skills.txt:解析 Id, skill, charclass, cost mult, cost add。
    • 烘焙 Gamble.txt(赌博底材代码池)与 Books.txt(回城/辨识书卷轴价格与充能成本)。

验收标准

  • canonical-drop-data.ts 与 embedded-drop-tables.ts 零网络同步导出上述全部权威表结构。
  • 单元测试验证全部 17 位商人的列解析(含 Hralti*)及 Npc.txt 三难度 max buy 上限(普通 5000~25000,噩梦 30000,地狱 35000)准确无误。
## 背景与目标 为 1.13c 商人库存生成器与价格计算引擎提供零网络、100% 忠实于官方 MPQ 数据表的底层数据契约。 ## 1.13c Ground Truth 对标 (`ItemsTbls.cpp` / `MonsterTbls.cpp`) 1. **17 位商人配置列 (`Weapons.txt` / `Armor.txt` / `Misc.txt`)**: - 提取 `nNpcId = 0..16` 的 `Min`, `Max`, `MagicMin`, `MagicMax`, `MagicLvl`(注意 `nNpcId = 6` 赫拉铁力在原版表中的列名拼写为 `HraltiMin` / `HraltiMax` / `HraltiMagicMin` / `HraltiMagicMax` / `HraltiMagicLvl`)。 - 提取 `PermStoreItem`、`multibuy`、`NightmareUpgrade`、`HellUpgrade`、`cost`、`gamble cost`、`bitfield1`。 2. **`Npc.txt` 商人经济表 (`src/game/npc-table.ts`)**: - 解析 `npc`, `buy mult`, `sell mult`, `rep mult`, `questflag A/B/C`, `questbuymult A/B/C`, `questsellmult A/B/C`, `questrepmult A/B/C`, `max buy`, `max buy (N)`, `max buy (H)`。 - 建立 `MonsterId (hcIdx)` $\leftrightarrow$ `VendorNpcId (0..16)` 及 NPC 服务能力矩阵(Trade / Gamble / Repair / Heal / Identify)。 3. **`ItemTypes.txt` / `ItemStatCost.txt` / `Skills.txt` / `Gamble.txt` / `Books.txt` / `LowQualityItems.txt`**: - `ItemTypes.txt`:解析 `StorePage` (`armr` / `weap` / `misc`)、`StaffMods` 与 `Class`(用于职业专属物品收购价 `/4` 折算)。 - `ItemStatCost.txt`:解析 `ID`, `Stat`, `Encode`, `Multiply`, `Add`, `ValShift`。 - `Skills.txt`:解析 `Id`, `skill`, `charclass`, `cost mult`, `cost add`。 - 烘焙 `Gamble.txt`(赌博底材代码池)与 `Books.txt`(回城/辨识书卷轴价格与充能成本)。 ## 验收标准 - [ ] `canonical-drop-data.ts` 与 `embedded-drop-tables.ts` 零网络同步导出上述全部权威表结构。 - [ ] 单元测试验证全部 17 位商人的列解析(含 `Hralti*`)及 `Npc.txt` 三难度 `max buy` 上限(普通 `5000~25000`,噩梦 `30000`,地狱 `35000`)准确无误。
troytt added this to the [M19] 原版商人 NPC 与交易经济系统 (1.13c Ground Truth) milestone 2026-09-26 04:22:14 +00:00
troytt changed title from [M15-P1] 烘焙 1.13c 商人经济与库存权威数据表 (Npc.txt / Vendor Columns / Gamble.txt / Books.txt / Stat & Skill Costs) to [M19-P1] 烘焙 1.13c 商人经济与库存权威数据表 (Npc.txt / Vendor Columns / Gamble.txt / Books.txt / Stat & Skill Costs) 2026-09-26 04:24:35 +00:00
Author
Owner

Implemented and verified in commit 3b993cf (tsc --noEmit 0 errors, vitest 17/17 passing, headless Chrome UI verification passing).

Implemented and verified in commit `3b993cf` (`tsc --noEmit` 0 errors, `vitest` 17/17 passing, headless Chrome UI verification passing).
Sign in to join this conversation.
No Label
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: troytt/diablo2-web#481
No description provided.