read_bin_table
Decode Diablo II .bin table records field by field using 1.14d layouts to inspect stored values, linked codes, and column layouts.
Instructions
Decode the records of a compiled Diablo II data table (.bin, e.g. data\global\excel\weapons.bin) field by field, using the 1.14d field layouts of github.com/Nugwa628/d2-114d-codex (cloned into the data folder). path: a .bin file on the local disk, or an MPQ archive with member= the .bin's name inside it; the file name picks the layout, so pass the file under its game name. start, limit: which records (from 0; at most 20 per call, 50 with columns=; a long reply stops early and says where to carry on). key: instead, the record whose key code is this (e.g. 'hax' in weapons.bin; tables keyed by a code only). columns: only these columns (a list, or names separated by commas), shown even when 0; otherwise every field that isn't 0, empty or -1. layout=True: list the table's columns with offset, type and link instead of records. The file is checked first: count x the 1.14d record size must be exactly the bytes after the count, or it is refused. A file from another version with the same record size would still decode wrongly: say which game version the file comes from. Links to code-keyed tables (item types, items, body locations...) show the linked code, read from that table's .bin beside the file or in the same MPQ folder; links to name-keyed tables (skills, monsters, states...) show the index only, since a .bin keeps no names. String ids are numbers (look them up with read_strings; 5382 means no string); formula fields are offsets into the *code.bin buffer, not decoded; fields a table-specific callback writes (cubemain inputs and outputs, monstats skill modes, monstats2 composite choices, monpreset Place) show the parts of their slot that the codex's callbacks.md gives, as stored indexes. The layouts don't record sign: a large 2- or 4-byte value also shows its signed reading. Values are as stored in the file, before the fix-ups the game makes after loading. For the record count and size of any version's file, use bin_table_info.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "read_bin_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | ||
| path | Yes | ||
| limit | No | ||
| start | No | ||
| layout | No | ||
| member | No | ||
| columns | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |