read_displacements
Read displacement grids from a .vmf to report grid power and size, vertex world positions, painted area, and seam cracks where terrain separates.
Instructions
Reads the displacements of a .vmf: the grids of vertices that replace a brush face and make every piece of terrain in Source. Until now this toolkit could only detect one -- read_vmf_solids has reported hasDisplacement since the beginning and nothing has ever read what was in it. Reports each grid's power and size, where it starts, how far the terrain moves, how much of it is painted, and the world position of every vertex. Positions rather than raw arrays, because every question worth asking about a displacement is a question about where its vertices are. Also finds seams: two vertices that share an undisplaced point and no longer share a displaced one, which is the crack a player falls through and which is invisible in the editor.
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_displacements"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the .vmf, absolute or relative to the repo root. | |
| includeVertices | No | Return every vertex. Off by default: a power-4 displacement has 289 of them and a hillside has dozens of displacements. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| count | Yes | ||
| seams | Yes | ||
| nextStep | Yes | ||
| warnings | Yes | ||
| displacements | Yes |