write_displacement
Creates 5x5, 9x9, or 17x17 displacement grids on selected VMF brush faces for terrain sculpting, and refuses faces that already have a displacement to protect existing work.
Instructions
Creates displacements on selected faces: the vertex grids that make every piece of terrain in Source. Power 2, 3 or 4, which are 5x5, 9x9 and 17x17 grids -- Source accepts 0 and 1 and no terrain is built with them. Flat by default, which is what Hammer's own create makes and what a mapper then sculpts. WARNING: a displacement does not seal. vbsp builds the hull from the brush's own planes and draws the terrain over it, so displacing a face of the map's shell leaks through a shape the terrain no longer has, and the leak names a brush that looks solid in the editor. Refuses a face that already carries one rather than discarding what was sculpted onto 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>",
"power": "<power>"
},
"name": "write_displacement"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | Every quadrilateral face of the map. Required when nothing else narrows it. | |
| path | Yes | Path to the .vmf, absolute or relative to the repo root. | |
| power | Yes | 2, 3 or 4: a 5x5, 9x9 or 17x17 grid. | |
| backup | No | Copy the file to <file>.bak before writing. Nothing is copied on a no-op. | |
| dryRun | No | Check and report without writing. Every verification runs either way. | |
| facing | No | ||
| confirm | No | Required (true) to run this tool: it writes or executes. | |
| minArea | No | ||
| material | No | Faces carrying this. Substring, case-insensitive. | |
| solidIds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| created | Yes | ||
| matched | Yes | ||
| written | Yes | ||
| nextStep | Yes | ||
| warnings | Yes | ||
| unchanged | Yes | ||
| backupPath | Yes |