Preview seeded procedural generation
tiled_preview_generateGenerate deterministic tilemaps with value noise, cellular caves, or connected dungeons over a bounded region, then map values to tiles and return a mapEdit change set for preview.
Instructions
Computes a deterministic seeded value field over one bounded region — smooth value noise (stateless coordinate hash, so the same seed always reproduces the same output and results are translation-stable), a cellular cave automaton yielding exactly 0 (open) and 1 (wall), or a rooms-and-corridors dungeon yielding exactly 0 (floor) and 1 (wall) with every floor cell connected (sequential seeded stream drawn region-relative, so a shifted region reproduces the same layout) — then maps values to tiles through explicit [min, max) intervals (max 1 inclusive; unmatched cells are skipped for sparse generation) and returns an ordinary mapEdit change set carrying the setTiles writes. Math.random is never involved; a mapping that matches no cells fails closed, as does a dungeon region too small for one minimum room plus its wall ring.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | Yes | ||
| region | Yes | ||
| layerId | Yes | ||
| mapPath | Yes | Canonical project-relative POSIX path; absolute paths and .. are forbidden | |
| mapping | Yes | ||
| generator | Yes | ||
| expectedMapRevision | Yes | SHA-256 revision returned by a read or preview | |
| expectedDependencyRevisions | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |