---
name: tileset
title: tileset
description: Design seamless tiles and autotile sets, or deduplicate a hand-painted mockup into a reusable tileset, then export for Tiled or Godot. Use for level art, terrain and anything that repeats.
canonical_url: https://skilld.dev/gh/with-pebbly/aseprite-ai-artist/tileset
last_updated: 2026-10-09T18:45:45.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install with-pebbly/aseprite-ai-artist/tileset`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/tileset`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/with-pebbly/aseprite-ai-artist/tileset) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/tileset`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/tileset --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/tileset --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Build a tileset

Requires an extension advertising the `tileset` feature — check `preflight`
first. Older builds answer `unsupported_command` loudly rather than doing
nothing.

## Decide the grid before anything else

The tile size is the one decision everything else depends on, and it belongs to
the game, not to the art. Ask if you do not know it. 16×16 and 32×32 are the
common answers.

## Seamless tiles

A tile is seamless when its right edge continues into its own left edge, and its
bottom into its own top.

Method that works:

1. Draw the tile's interior first, ignoring edges.
2. Draw the edge pattern on one side.
3. `look op="ascii"` the first and last columns and make them continue into each
   other. This is exact work; do it in the text grid, not by eye.
4. Same for top and bottom rows.
5. Stamp the tile in a 3×3 block and `look op="preview"`. Seams show up
   immediately when tiled; they are invisible in isolation.

**Avoid a repeating feature.** A distinctive rock in the middle of a grass tile
becomes a visible grid the moment it repeats. Keep repeating tiles low-contrast
and put the distinctive elements in occasional variant tiles.

## Autotiling

A blob-47 set covers every combination of neighbours for a 4-connected terrain.
It is 47 tiles, and hand-authoring them in the right order is where this goes
wrong — build the terrain body first, then the edge and corner cases, then
export with `layout="blob47"` so the exporter writes the wangset.

## From a painted mockup

Painting a level by hand and extracting tiles from it produces better-looking
tilesets than authoring tiles in isolation, because you see the whole picture
while drawing.

1. Paint the mockup on a normal layer, on a canvas that is a whole number of
   tiles in each direction. `pack` refuses otherwise rather than silently
   losing a partial edge tile.
2. Pack it:
   ```
   tileset op="pack" layer="mockup" name="terrain" tileWidth=16 tileHeight=16
   ```
   You get a tileset plus a tilemap layer that reconstructs the mockup exactly.
   The mockup is **hidden, not deleted** — unhide it to compare if a tile looks
   wrong.
3. Read the result. `cellCount` against `tileCount` tells you how much the
   mockup actually reused. A 400-cell mockup that yields 300 tiles was painted
   without regard to the grid; the tool says so, and the fix is to redraw with
   the grid visible, not to accept it.
4. `tolerance` merges near-identical cells (per-channel difference, 0–255). It
   is off by default because a merge changes the art: the tilemap becomes an
   approximation of the mockup rather than a copy, and the result says how many
   cells that affected.

## Export

```
tileset op="export" layer="terrain" format="tiled" path="…/terrain.tsj"
```

Writes three files: the packed PNG, the `.tsj` tileset, and a `.tmj` map that
uses it — so the export opens in Tiled as a level, not just an image.

- `format="godot"` writes a Godot 4 `TileSet` resource (`.tres`).
- `format="json"` writes the tile grid plus the tilemap layout, for a custom
  engine. It states its own index convention in the file.
- LDtk needs no exporter — it reads `.aseprite` directly, so just save the
  document.

Aseprite reserves tile index 0 for the empty tile. The exporter drops it from
the atlas so engine indices line up, and index 0 becomes "no tile", which is
what every engine expects.

## Autotiling

```
tileset op="export" format="tiled" layout="blob47" path="…/terrain.tsj"
```

Adds a Tiled wangset for 4-connected autotiling. It assumes the 47 tiles are
authored in **canonical blob47 order** — the 47 distinct neighbour masks in
ascending order, after Aseprite's empty tile — and refuses if the set is
incomplete rather than writing a wangset that autotiles wrongly. If you are not
sure of the ordering, export `format="json"` first: it reports the
index-to-mask mapping so you can check a few tiles by eye.

## Related

`rules://04-outlines-and-edges` for edge consistency, `rules://66-tiles-and-autotiling`
for layouts and transitions, `rules://65-ground-rocks-grass` and
`rules://67-architecture-and-interiors` for the tiles themselves,
`rules://71-isometric` for iso sets.
