poohcom1 / Asepritely

Helpful Aseprite Scripts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Asepritely ๐ŸŽจ

Asepritely is a library of helpful Lua scripts and extensions I've written for use in the pixel art editor, Aseprite.

UPDATE: I've also started including some palettes that I use myself!

Beginning in Aseprite 1.2.10, users were able to begin using Lua to write their own code extensions to assist in their spritely endeavors. I've written many myself, but, they were originally just for my own use. I've seen that maybe one or two were worthy of sharing, so, as I clean up their code, I will add them to this repository for you, the artist to consume at their leisure. The Scripts ๐Ÿ“


As time goes on, I will add entries to this section to synopsize any new scripts, and their functionality.

Foreground RGB Toolbar ๐ŸŒˆ

Usage

This script creates a little toolbar that enables you to quickly view the RGB values of your current foreground color. Very helpful when getting color values for use in other software!


Export PNG on Save

I made this as a request from someone on the forums!

When run, this script simply saves your current sprite and saves a .png copy at the same time! The file is output in the same directory you are working in. If you don't like the popup it gives when complete, open the script up in a text editor and set the value POPUP to false.


Save Selection to Layer

Aseprite already has a feature called "Save selection to new sprite". I often find that, while working on something, I need to copy or cut just a portion of a layer into a new one so I can divide things up more easily.

This little beauty has been cleaned right up, and functions much better than it did. You can now select whether you want the selected content to be:

  • Cut from the target layer.
  • Copied from the target layer.
  • Placed above the target layer.
  • Placed below the target layer.
  • And whether to close the window on execution.

Here's a little clip of it in action.

Selection to Layer

Palettes ๐ŸŽ

I've added two palette files into an extension for anyone wanting to add to their palette collection!

They are the Secret Pico-8 palette, and the Flat UI palette!

Three Ways to get the palettes:

  • โ–ถ๏ธ Click here to download!

  • โ–ถ๏ธ Clone this repo and then go into the extensions folder, where you'll find it.

  • โ–ถ๏ธ Click on theextensions folder up above, then click iivii-palettes.aseprite-extension, and click the button that says Download.


Here's a little gif showing how to import it into Aseprite!

Load Palettes

Usage ๐Ÿ“™

To make use of these scripts, first clone the repo or download the zip.

Alternatively, you can click here to download the aseprite-extension format of the scripts and palettes.

๐Ÿ““ aseprite-extension's are actually just a zip file with a fancier name. ๐Ÿ˜ƒ

Then, open Aseprite, and peform the following:

Option 1 (zip): File -> Scripts -> Open Scripts Folder. Another explorer window should open up, and this is where you can copy any of the scripts you want from the repo into the Aseprite scripts folder!

Option 2 (extension): Edit -> Preferences -> Extensions and click Add Extension. Then, locate the aseprite-extension file you downloaded and hit okay.

Now that they're in the right place, in order to use them, you can either:

  • File -> Scripts -> Rescan Scripts Folder (Faster, better option!), or...
  • Restart Aseprite

The scripts will now be accesible by going back to the File -> Scripts dropdown!

TIP: You can even assign them to a keyboard shortcut through Aseprite's built-in keymap definition tool!

Setting Scripts to Keyboard Shortcuts

This is useful for some scripts, like Export PNG on Save.lua, and less useful for others. If you've never bound your scripts to keyboard shortcuts before, here's a quick how to. Open Aseprite and then:

  • Clicking Edit -> Keyboard Shortcuts
  • In the window that opens, you'll be in the Menu section, and just toward the bottom, you'll see any and all scripts you have in your scripts folder listed.
  • Choose the one you want to assign a keyboard shortcut, and set it as you see fit!

EXAMPLE: For Export PNG on Save.lua, I recommend: Ctrl + Alt + Shift + S

Other Useful Resources ๐Ÿ™ˆ

  • Aseprite Scripting API
    • This is where you should start to begin writing your own Aseprite specific scripts! It has a lot of the information you need to start!
  • Aseprite Script Examples
    • A few scripts built by the devs themselves to give you a feel for what can be done with this API.
  • Programming in Lua
    • The essential handbook for understanding the Lua language.
  • The Lua Tutorial
    • Well designed, in-browser introduction to using Lua. Run code and learn all from within Firefox or Chrome!

Thanks! ๐Ÿ†

Feel free to follow me on Twitter, check out my website, or see what else I've made! Hope this serves to help you in some of your future endeavors!

- iivii ๐ŸŽฎ

About

Helpful Aseprite Scripts


Languages

Language:Lua 100.0%