Aseprite file chunk links

Hi.
I’ve been working on a program that imports aseprite files, but have run into a bit of a challenge.
I can’t find out how aseprite manages to associate tileset chunks with either cel- or layer chunks…
I have found the link between cel- and layer chunks, but not the tileset chunks.

Does anyone here know how aseprite links layers and cels with the corresponding tileset?

Hi @DenTroge :wave: You can see in the Layer Chunk the Tileset index for tilemap layers (If layer type = 2). This index is equal to the Tileset ID in the Tileset Chunk.

I think it’s a little confusing because in the spec Tileset index = Tileset ID.

Thanks! :slight_smile:
Turns out i messed up the length of the Layer name string, so the following read of the tileset index was bogus and threw me off track.

1 Like