run_pack
Embeds custom assets into a compiled .bsp with bspzip so maps don't show purple checkerboards on clients missing them; can auto-derive the list from loose files the map references.
Instructions
Packs files into a compiled .bsp with bspzip, so custom assets ship with the map instead of appearing as purple checkerboards on every client that lacks them. Takes explicit pairs of in-game path and source file. With auto:true it also derives the list from the map itself, via read_map_dependencies: every asset the map references that resolves from a LOOSE file in the game's content tree rather than from a VPK. Those are the ones that ship broken -- they work at home because they are on that disk. VPK content is never packed: every player who owns the game has it. The derived list is returned, so what was packed is visible rather than inferred. Verifies afterwards by re-reading the pakfile: bspzip reports success whether or not anything was added.
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": {
"bsp": "<bsp>"
},
"name": "run_pack"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bsp | Yes | Target .bsp. It is rewritten in place. | |
| auto | No | Derive the list from the map: assets it references that sit loose in the game's content tree rather than in a VPK. Needs the Python sidecar. | |
| game | No | Game profile id. This fork supports only 'l4d2', which is also the default; any other id is refused rather than answered about the wrong game. | |
| files | No | Explicit pairs. Required unless auto is set; combined with it otherwise. | |
| confirm | No | ||
| exclude | No | Substrings of in-game paths auto should skip. For the occasional stock file that ships loose -- Garry's Mod keeps detail.vbsp in its own root -- which auto would otherwise pack harmlessly but pointlessly. | |
| toolchain | No | Which compilers to drive. The default 'plusplus' is ficool2's Hammer++ rebuild: much faster vvis and flags the stock chain does not have. Falls back to 'stock' when it is not installed, and the result says which one ran. 'stock' forces the compilers that ship with the game, which is what a comparison between the two needs. | plusplus |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| bsp | Yes | ||
| game | Yes | ||
| added | Yes | ||
| derived | Yes | ||
| autoNote | No | ||
| exitCode | Yes | ||
| requested | Yes | ||
| toolchain | Yes | ||
| bytesAfter | Yes | ||
| filesAfter | Yes | ||
| stdoutTail | Yes | ||
| bytesBefore | Yes | ||
| filesBefore | Yes | ||
| toolchainNote | Yes | ||
| missingSources | Yes | ||
| toolchainRequested | Yes |