Skip to content

How to Add New Options to Aseprite

haloflooder edited this page Sep 16, 2018 · 2 revisions

Introduction

So it turns out that you can have additional options in Aseprite with certain things if you edit the .xml files in the widgets folder. A user was wondering if you can have custom pixel ratios and after digging into Aseprite for a bit. I discovered that Aseprite accepts changes made to the files located in the Widget folder.

WARNING: Aseprite could get unstable and do some unexpected spooky things if you change some settings. MAKE SURE TO MAKE A BACKUP OF THE SETTINGS BEFORE MAKING ANY CHANGES!!!

Table of Contents

The table of contents will be bare since I only experimented with adding custom pixel ratios to Aseprite. I will be adding more items to the table of contents once I experiment more with Aseprite's .xml files

Basic Things You Might Need to Do First

Making Changes to Aseprite

Locating the Aseprite Folder

First, we need to open the folder where Aseprite is installed. To do this, go the the edit menu located at top of the Aseprite program. Then click on Preferences that should be at the bottom of the menu.

A preference window should pop up and you need to go to Extensions located at the left side of the window. You should now see a list of palettes. Click of any one of them and click the Open Folder button.

A new window should pop up but we need to go up a few folder to get to the appropriate location. Go back a folder until you get to "data" folder.

How to Add Custom Pixel Ratios

This will teach you how to add custom pixel ratios to Aseprite. It could be useful for some people if they need a specific ratio other than 1:1, 1:2, and 2:1 for pixels.

Location

The files that are required to add custom ratios are going to be in the "widgets" folder in side of Aseprite's data folder. If you don't know where the data folder is, THIS will show you where it's located.

Editing the Files

We're going to be modifying two files. One file is going to be named "new_sprite.xml" and the other file is named "sprite_properties.xml".

new_sprite.xml is responsible for displaying options in the "New Sprite" window when you create a new document. sprite_properties.xml is responsible for displaying options in the "Sprite Properties" window when you view the sprite's properties.

You will need to get a text editor that's better than Notepad. So Notepad++, Atom, sublime, or whatever you're comfortable with is suitable for this task. MAKE SURE TO MAKE A BACKUP OF THE FILE BEFORE YOU SAVE THE MODIFIED FILE

Editing the new_sprite.xml File

Open the new_sprite.xml file in your preferred text editor and add the line of text below into the document. Replace 5:4 with whatever ratio you want. You can also rename "Custom Ratio Name Here" to something like "Lalala (5:4)".

          <listitem text="Custom Ratio Name Here" value="5:4" />

It should look like this at the end. Make sure there are 10 spaces behind the line of text so the config file is properly formatted. After you save the file, close Aseprite and open it back up. When you create a new sprite, the custom ratio should be in the list of ratios inside the "Advanced Options" section.

Editing the sprite_properties.xml File

Now open the sprite_properties.xml file and add the line of text below into the document. Replace 5:4 with whatever ratio you want. Again, you can rename "Custom Ratio Name Here" to something like "A Thingy (5:4)".

  <listitem text="Custom Ratio Name Here" value="5:4" />

It should look like this at the end. Make sure there are 2 spaces behind the line of text so the config file is properly formatted. After you save the file, close Aseprite and open it back up. If you go into the sprite's properties, the custom ratio should be in the list of ratios.

And there you have it! You now have custom pixel ratios in Aseprite :)