get_terrain
AT WHAT HEIGHT DO I PLACE THIS, and where can I build. Every kit ships a procedural TERRAIN program for its own ground, and the ground is no longer flat, so a y of 0 is wrong almost everywhere. Pass at with the x/z you want to place at and you get the ground height there; set position.y to it. flat_areas are the level building sites: square footprints whose ground barely varies, largest first, none overlapping, with the height to place at. Use it before laying out a town, a farm or a depot, instead of guessing a y and hoping. Pass profile to get the ground along a proposed road or wall: heights, the grade between points, and whether each point is under water, so you know where a bridge is needed. Everything is in world coordinates, the same ones the module takes, so an answer can be used directly. Terrain from two different kits joins edge to edge on a shared 64m grid, so several kits can share one landscape.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | No | x,z;x,z;… — AT WHAT HEIGHT DO I PLACE THIS. Returns the ground height and slope under each point; set the object's position.y to the y you get back and it rests on the terrain. Use this for anything that is not going on one of the level sites. Up to 64 points. | |
| id | Yes | terrain asset id. Omit to list every kit that has one. | |
| span | No | block size in 64m chunks, 1 to 4. Bigger blocks have more room and more sites. | |
| flats | No | how many level sites to return (default 12, max 40) | |
| erosion | No | 0 to 1. Weathers the landforms: valleys smooth out, crests stay sharp. Changes where the level sites are, so ask with the same value you intend to build with. | |
| flatten | No | 0 to 1. Clears a level area in the MIDDLE of the block for a settlement, leaving the landscape around it. Raise it when the natural sites are too small for what you are placing. | |
| profile | No | x0,z0,x1,z1[,steps] — the ground along a straight line, for a road, a wall or a bridge | |
| scatter | No | n placement points the terrain picks itself, already on the ground and already filtered to slopes gentle enough to stand on, each with a random yaw. For rocks, trees and dressing. |