fill_region
Fill a rectangular area or an entire layer with a specified tile ID, clearing tiles with 0 and placing base autotile variants.
Instructions
Fill a rectangle of a layer with one tile id (or the whole layer if rect is omitted). Tile id 0 clears. For autotiles this places the base variant (P1) — smart edges come with apply_autotile.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rect | No | Rectangle in tiles (default whole layer) | |
| layer | Yes | 0=ground, 1=detail, 2=overhead | |
| mapId | Yes | ||
| tileId | Yes | Tile id to fill with (0 = clear) |