Is there a way to export layers into the same spritesheet on top of eachother?

I’m making a small game and decided I wanted to use aseprite as a level editor (RGB(255, 125, 0) == Wood block, RGB(100, 200, 65) == Stone block, etc.). I don’t want to have to spend a lot of time creating my own editor, but the problem is, it takes a few seconds to export the level because I have a layer above the main blocks for special blocks, e.g. if it’s blue, it means the block on the layer below it is slippery. The only way I could export it into one png would be to create a new frame and get rid of the main layer on that frame, and get rid of the top layer on the first frame, and then export them on top of each other. I’ll show a gif of it to help explain:

Of course it’s a bit faster because I can just hit LCtrl + Shift + X to repeat last export, but it still takes a few seconds longer to export, and when making so small tweaks to a level it becomes a pain. Is there a way around this?

It looks like you want to save each layer in a different file, you can use the CLI for that:

aseprite -b map.ase --save-as map-{layer}.png

This works since v1.2-beta1. More details in the docs and –save-as. (Or en v1.1.13 you can use –split-layers.)

I’m not trying to save each layer in a different file, I’m trying to create a vertical spritesheet with the image on top being the bottom layer and the image at the bottom being the top layer

I’m assuming that you also need CLI to do that, but I’m a bit confused. How do I open it?

Oh ok :sweat_smile: you do some part of this with the CLI, can use the CLI for that too (the UI is not ready to do that). Use the –split-layers and –sheet argument. Something like this:

aseprite -b --split-layers map.ase --sheet sheet.png

But the layer in the first row will be the bottom one, and the foreground one will be in the bottom.

Please check the details about your platform about how to launch the CLI interface in this section, and ask me if something is missing or you don’t understand.

It works! I also created a .bat file for it, which also works.

It might be a bit of a long shot, but is there a way I could create a key binding for it, or is the best scenario a .bat file?

Nevermind, I got the key binding to work. Thanks for your help!

1 Like