Operations
World Operations
CreateTerrain
Generate a procedural terrain entity with mesh, collision, and texturing.
| Parameter | Type | Required | Description |
|---|---|---|---|
entity_name | string | No | Terrain entity name (default: "Terrain") |
archetype | string | No | "wilderness" (heightmap) or "cave" (marching cubes). Default: "wilderness" |
biome | string | No | Texture biome. See table below |
width | number | No | Width in world units (default: 200) |
depth | number | No | Depth in world units (default: 200) |
height_scale | number | No | Max height displacement (default: 20) |
resolution | integer | No | Heightmap vertices per side, 2-512 (default: 256) |
roughness | number | No | Noise roughness (default: 0.5) |
octaves | integer | No | Noise octaves for detail (default: 6) |
seed | integer | No | Random seed, 0 = random (default: 0) |
position | array | No | Position [x, y, z] (default: [0,0,0]) |
parent_guid | string | No | Parent entity GUID |
cave_style | string | No | Cave only: "spacious", "moderate", "dense", "dramatic" |
room_height | number | No | Cave only: room height in world units |
Biomes
| Archetype | Available Biomes |
|---|---|
wilderness | forest, alpine, desert |
cave | stone_cave, crystal_cave, lava_cave |
Wilderness Example
{
"op": "CreateTerrain",
"params": {
"archetype": "wilderness",
"biome": "alpine",
"width": 300,
"depth": 300,
"height_scale": 40,
"resolution": 256,
"seed": 42
}
}
Cave Example
{
"op": "CreateTerrain",
"params": {
"archetype": "cave",
"biome": "crystal_cave",
"cave_style": "dramatic",
"width": 100,
"depth": 100,
"room_height": 10,
"seed": 99
}
}
CreateWorld
Generate a tiled world with multiple terrain chunks, biome blending, and optional water.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | World root entity name (default: "World") |
chunks_x | integer | No | Chunks in X direction (default: 4) |
chunks_z | integer | No | Chunks in Z direction (default: 4) |
world_width | number | No | Total width in units (default: 800) |
world_depth | number | No | Total depth in units (default: 800) |
height_scale | number | No | Height per chunk (default: 20) |
resolution | integer | No | Heightmap resolution per chunk (default: 128) |
roughness | number | No | Noise roughness (default: 0.5) |
octaves | integer | No | Noise octaves (default: 6) |
seed | integer | No | Random seed (default: 0) |
biomes | array | No | Biome names for Voronoi zones (default: ["forest","alpine","desert"]) |
water_level | number | No | Water surface Y level. > 0 for visible water (default: -100 = no water) |
Example: Island World
{
"op": "CreateWorld",
"params": {
"chunks_x": 4,
"chunks_z": 4,
"world_width": 800,
"world_depth": 800,
"height_scale": 25,
"biomes": ["forest", "alpine", "desert"],
"water_level": 2.0,
"seed": 42
}
}
Creates a root World entity with terrain chunks and scatter objects as children. Chunks are seamlessly tiled using world-space noise, and biomes are assigned via Voronoi noise partitioning.
Uniform Biome World
{
"op": "CreateWorld",
"params": {
"chunks_x": 2,
"chunks_z": 2,
"world_width": 400,
"world_depth": 400,
"biomes": ["forest"],
"seed": 7
}
}