Tilesets
tilesetManage Aseprite tilemap layers, create tile collections from painted layers, stamp tiles by grid coordinates, and export to Tiled, Godot, or JSON.
Instructions
Work with Aseprite tilemap layers. Ops:
• 'list' — tilesets in the sprite.
• 'create_layer' — a new empty tilemap layer on a given grid.
• 'get' — tile count and, with a path, the tiles as one packed PNG.
• 'stamp' — place tiles by grid coordinate. x/y are grid cells, not pixels.
• 'pack' — turn a hand-painted mockup layer into a tileset plus a tilemap that reconstructs it exactly. Deduplicates identical cells; tolerance also merges near-identical ones. The canvas must be a whole number of tiles, and the source layer is hidden rather than deleted so you can compare.
• 'export' — writes the packed PNG plus the file the engine reads: 'tiled' (.tsj tileset and a .tmj map that uses it), 'godot' (Godot 4 .tres TileSet), or 'json' (tile grid plus the tilemap layout).
Painting a level by hand and packing it produces better tilesets than authoring tiles in isolation, because you see the whole picture while drawing. layout: 'blob47' adds a Tiled wangset for autotiling, and assumes the tileset is authored in canonical blob47 order after the empty tile — it refuses rather than writing a wangset that would autotile wrongly. Requires an extension build advertising the 'tileset' feature — check preflight first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| name | No | ||
| path | No | Output path for 'export' and 'get'. | |
| frame | No | 1-based frame number. Omit to use the active frame. | |
| layer | No | Layer name. Omit to use the active layer. | |
| tiles | No | For 'stamp'. x/y are tile-grid cells, not pixels. | |
| format | No | tiled | |
| layout | No | Autotile layout for 'export'. | grid |
| sprite | No | Which sprite: its id as '#7' (what every result reports back, and the only unambiguous form — two unsaved documents are both called 'Sprite'), its filename, or its display name. Omit to use the sprite Aseprite has focused. | |
| tileWidth | No | ||
| tolerance | No | For 'pack': maximum per-channel difference at which two cells count as the same tile. 0 means exact, which is also much faster — anything above 0 compares every cell against every tile found so far. | |
| tileHeight | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| rows | No | ||
| files | No | ||
| layer | No | ||
| format | No | ||
| layout | No | ||
| sprite | Yes | ||
| columns | No | ||
| skipped | No | For 'stamp': placements outside the grid or naming a tile that does not exist. | |
| tilesets | No | ||
| cellCount | No | For 'pack': grid cells examined. | |
| tileCount | No | ||
| tileWidth | No | ||
| tileHeight | No | ||
| reusedExact | No | For 'pack': cells that matched an existing tile exactly. | |
| reusedFuzzy | No | For 'pack': cells merged by `tolerance`. A high number here with a low tolerance means the mockup has near-duplicate tiles worth cleaning up. | |
| sourceLayer | No | For 'pack': the mockup layer, now hidden. |