tbl_to_json
Convert a Diablo II .tbl string table into an editable JSON file, preserving entry order and invalid UTF-8 as hex for reliable rebuilding.
Instructions
Convert a Diablo II string table (.tbl) on the local disk to a JSON file that can be edited and turned back with json_to_tbl. path: the .tbl file (extract it from an MPQ with mpq_extract first). out: the .json to write; an existing file is refused unless overwrite is true. The JSON has the table's version, hash table size and lookup limit, then "entries": one {"key", "text"} per line in string-number order (an entry's place in the list is its number, so add new strings at the end and don't reorder). Text is UTF-8; a key or text that isn't valid UTF-8 is kept exactly as "key_hex" / "text_hex". The reply says whether json_to_tbl would rebuild the same bytes from it.
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>",
"out": "<out>"
},
"name": "tbl_to_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| out | Yes | ||
| path | Yes | ||
| overwrite | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |