get_terrain
AT WHAT HEIGHT DO I PLACE THIS, and where can I build. Many kits have a procedural TERRAIN program for their own ground (call with no id for which: the rest stand on floor tiles or flat turf, where y 0 is right). Ask with the KIT id to get the ground its composed place stands on, in place.group's coordinates, which is what buildKit builds and what place.groundAt(x, z) reads (setting: true for buildKit's wider setting ground); a terrain ASSET id answers for that program alone at its default knobs, a different patch of ground. 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. Every answer says its frame, so it 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 | No | a KIT id (the ground its composed place stands on, as buildKit builds it) or a terrain asset id (that program alone). Omit to list every kit that has ground. | |
| near | No | x,z,radius: keep the scatter points inside that circle, for dressing one clearing rather than the whole block | |
| 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. | |
| setting | No | with a kit id: the ground of buildKit({ setting: true }), twice the composed span, instead of the composed place's |