get_terrain
Samples painted terrain on a grid to verify fills and paints landed where intended and to inspect inherited ground without taking a screenshot.
Instructions
Read the terrain back: sample the painted terrain on a grid.
rect: [x, y, w, h] in woxels; omit for the whole map.
samples: grid resolution per side, 2-64 (16 = 256 points).
Returns a `weights` grid, row-major from the rect's top-left. Each point is
[slot0, slot1, slot2, slot3], read directly from the splat image's RGBA
channels and summing to ~1, and `slots`: the texture each of those four
slots holds.
Slot 0 is the BASE: whatever slots 1-3 leave unclaimed shows slot 0's
texture. So [1, 0, 0, 0] means "all slot 0" — and what that looks like
depends entirely on `slots[0]`. On a new map every slot holds limestone, so
it is ground nobody chose; after fill_terrain(asset=grass) it is grass. The
weights cannot tell those apart, which is why `slots` is reported.
paint_terrain(slot=0) is accepted by the engine but never raises slot 0's
weight; fill_terrain(slot=0) replaces the base instead.
Slots 4-7 live in a second splat image, reported as weights2. All eight
weights are one blend: painting any slot takes weight from the other
seven. A slot 4-7 needs a texture (set_terrain_slot) before it is painted.
This is the only way to check terrain without a screenshot — use it to
confirm a fill or paint landed where you meant, and to see what ground you
inherited on a map you did not build.
render: also report how the GPU draws it (shader, bound textures, and at
`at` = [x, y] the CPU and GPU weights), for ground that reads wrong.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_terrain"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | No | ||
| rect | No | ||
| render | No | ||
| samples | No |