Aseprite - Varollo/aseprite-importer GitHub Wiki

This section will go in detail about how to export a sprite sheet on Aseprite, and what settings you can use to configure it to integrate it with the library.
To export a sprite sheet in Aseprite, you can use the shortcut Ctrl+E
, or find it under:
File > Export > Export Sprite Sheet
Exporting the Sprite Sheet on Aseprite.
For Aseprite to include a .json
file together with the output sprite sheet image, you must check the box JSON Data
, as seen below:
Enabling the JSON Data.
You can also specify a custom path to the resulting .json
file.
In the case you have multiple animations on the same sprite sheet, you can use the Item Filename
field.
Enabling the JSON Data.
For more information on the filename
format, check the documentation on the official Aseprite website.
ⓘ QUICK INFO The animations will be grouped by frames with the same
Item Filename
. This means using some special values that indexes each frame separately, such as{frame}
, will have the behaviour of each frame being treated as it's own animation.
Here are some useful formats I use for specific scenarios:
Format | Example Outputs | Description | Use Case |
---|---|---|---|
{title} |
"player_char" | Groups all frames as a single animation, using the actual File name. | If you only have a single animation on the sheet, an easy way to group every frame together is to use {title} as the format, which is set to the Aseprite File name (without the extension). |
{tag} |
"idle"; "walk"; "jump"; | Groups frames under the same Tag. | When using Tags to separate the frames of each animation, using {tag} on the format will automatically group the frames by Tag name. |
{tag}.{layer} |
"body.idle", "head.idle", "body.walk", "head.walk" | Groups frames under the same Tag, separated by Layer. | Sometimes it's needed to separate the Layers of each animation (for instance, when you need to "build" your sprite programmatically, such as a character creator), in those cases, you can add {layer} to the format to separate the frames by Layer, then, appending it to {tag} will also separate the animations by Tag name. Just be sure to check the box "Split Layers", under the Layout tab. More info on the official Aseprite documentation. |
When exporting the sprite sheet, you can choose to include some extra metadata information about the Aseprite file. Specifically, it's quite common to separate each animation through the use of Tags.
To toggle on Tag metadata, check the box Meta: Tags
.
Including Tag metadata.
If your JSON data file includes Tag metadata, it will be used to build the animations, instead of only separating the frames using the Filename format. As such, you can specify a Tagname to use when grouping the frames per Tag, but be warned that some special values (like {layer}
, or {frame}
) will be ignored.
ⓘ QUICK INFO As a rule of thumb, anything on the scope of the Tags or above, such as the Title, will work just fine.
By using Tag metadata, Tag properties like Animation Direction and Repeat will also be taken into account. Allowing greater control by the artist over the final product and less work for the developers to implement, lowering chances of misinterpretation by any party.
By Varollo.