apply_autotile
Paint autotiles and compute matching edge variants from surrounding cells so water, roads, or cliffs blend seamlessly. Supports blob, path, cell, and rectangle input.
Instructions
Paint an autotile (slot 0..6 = tileset autotile_names index) and compute the correct edge variant per cell from 8-neighbour connectivity (seamless coastlines/paths/cliffs). Supply ONE of: blob (organic roundish shape — USE for ponds/lakes/forest patches); path (autotile-safe road/trail/river through waypoints, width >=2); cells (arbitrary [x,y] list); or region (rect — only for rectangular floors). All shapes are auto-sanitized to be autotile-safe (4-connected, no diagonal pinches or 1-cell holes) so they never render broken/pinched. The border ring of existing same-autotile cells is recomputed so it blends. Preview with render_map.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| blob | No | Organic blob: ellipse (rx,ry) around (cx,cy) with wobbly edges. Best for ponds/lakes/forest patches. | |
| path | No | Autotile-safe road/trail/river through waypoints (orthogonal, never diagonal). width >= 2 recommended. | |
| cells | No | Explicit [x,y] cells (custom shapes; auto-sanitized) | |
| layer | Yes | 0=ground, 1=detail, 2=overhead | |
| mapId | Yes | ||
| region | No | Rectangle (only for rectangular things; use blob/cells for nature) | |
| edgeMode | No | Map-border connectivity (default same) | |
| autotileSlot | Yes | Autotile slot 0..6 (index into the tileset autotile_names) |