mpq_create
Pack a folder into a new MPQ archive in Diablo II 1.x format with selectable compression, then verify each member against its source file.
Instructions
Pack a folder into a new MPQ archive (format version 1, as Diablo II 1.x uses) on the local disk. Every file under src_dir goes in under its path relative to src_dir, with backslashes (src_dir/data/global/excel/x.txt becomes data\global\excel\x.txt), plus a (listfile) naming them all. src_dir: the folder to pack. out_path: the .mpq to write; an existing file is refused unless overwrite is true. compression: 'zlib' (default), 'bzip2', 'pkware', 'implode' (the older whole-file PKWARE flag) or 'store'. After writing, the archive is opened again with this package's reader and every member compared with its source file; the result says so. That is the only check made: the output has not been loaded by the game itself, so try it in the game before relying on it. Members aren't encrypted. It only makes a new archive; it can't add to or change an existing one. Member names must fit Latin-1.
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": {
"src_dir": "<src_dir>",
"out_path": "<out_path>"
},
"name": "mpq_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| src_dir | Yes | ||
| out_path | Yes | ||
| overwrite | No | ||
| compression | No | zlib |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |