Aseprite Scripts Collection

welcome Tenome!
it seems to me there are two options:

  1. use export layers as png and then drag’n’drop all files to aseprite. aseprite will ask you if you want to import files as sequence. check the option “do the same for other files” and you’ll get all your sequences as separated sprites, which you can export as gif.

  2. in export layers as png script at the line 59:
    sprite:saveCopyAs(pathPrefix .. layerName .. pathSufix .. ".png")
    change png to gif. note that you’ll have to create the subfolder manually - if the name of your sprite is file the subfolder has to have a same name, otherwise you’ll get an error Error saving file: Cannot save file file in the given location. i don’t know why.
    all exported files with multiple frames will have a suffix _. if you don’t want that change at the line 102: multipleFrames = "_" to multipleFrames = "" or remove whole

    if (#sprite.frames > 1) then multipleFrames = "_" end
    section.

I’ll try that, thanks. In the future, would it be better to have each animation as its own Aseprite file? I thought that would be cluttered hence me putting them all in one file. Lesson learned.

i guess it depends on your workflow, i have everything related to one sprite or asset crammed in one source file too. not sure if it’s a good habit or not. :]]

Made a script to display the total number of non-empty cels from visible layers. Or, in naive terms, the total frame count.
It’s ugly but it works.

-- Made 2021/01/17 00:32-02:14 by Unknow0059. For version of commit 9f88508 and higher.
tally = 0
for index, layer in ipairs(app.activeSprite.layers) do
    if layer.isVisible then
        for index, cel in ipairs(layer.cels) do
            if not cel.image:isEmpty() then
                tally = tally + 1
            end
        end
    end
end
app.alert(tostring(tally))

Hi, I created script for perlin noise generation, that can be used for water/clouds textures. Scritp for generation of normal maps is in repository as well. GitHub - Ondra09/AseWave: Water/Clouds generation plugin for Aseprite editor

1 Like

I’ve been toying with some scripts, just some simple bits and pieces that I put together for my own amusement.

  • Ghost Images : Animation effect similar to onion skinning. The script will generate a new layer containing a number of ‘Ghosts’ of previous frames.
  • Layer Transition : Generates a new layer with a simple transition effect between two existing layers.
  • Load Palette From CSV : Load a palette from a CSV file with red, green, blue, alpha columns.
  • Save Palette To CSV : Save current palette To CSV file with red, green, blue, alpha columns.
  • Selected Pixel Count : Counts the number of pixels in an arbitrary shaped selection.

They’re up on github https://github.com/davebarkeruk/Aseprite_LUA_Scripts

Hopefully they maybe of use to someone.

6 Likes

A new extension for Aseprite: MSX image file import.

https://community.aseprite.org/t/extension-msx-image-file-import/8655/2

7 Likes

Hi everyone, thanks for all these scripts. :slightly_smiling_face: I’m having trouble finding one that does the exact thing I need, or knowing the terminology for it…

Is there a script that can scan an indexed color image and tell me if I’ve used more than X palette colours in a single pixel height horizontal line? I’m working on Amiga copper backdrops and have a 3 colours (+ transparent/black) per line limitation to work around and it’s surprisingly difficult to do it by eye. Even better if it could highlight the lines somehow?

Here try this script: eg_palrowmax.lua - Google Drive :slight_smile:
You may edit value of MAX_COLORS_IN_ROW at 5th row inside script if you want some other max count.

2 Likes

Thank you so much! :smiley:

… I don’t quite understand how it works, sorry! haha,. When I run it in file/scripts it pops up “All OK!” but i don’t know if it did anything… It says All OK! whatever picture I try it on? I’m maybe doing it wrong. I’m on Aseprite 1.2.27

Oh, I forgot to mention. You should prefix your layers with + sign or # sign for it to be checked. It checks all frames of all layers prefixed that way.

2 Likes

Ahh that works perfectly :smiley: That’s going to speed me up quite a bit, thankyou!

1 Like

非常感谢,我在为自己的游戏项目写一个lua脚本用于导出图片和数据的时候遇到了问题,在参考了“Export sprite’s layers as individual images”中的lua脚本后,我解决了我的问题。我向此作者表达了感谢,也感谢你的整理的列表。
Thank you very much. I had a problem writing a Lua script for exporting images and data for my game project. I solved my problem by referring to the Lua script in “Export Sprite’s Layers as Individual Images”. I express my thanks to the author and thank you for compiling this list.

1 Like

Simple Color Range Multi-Select Noodle – SCRMSN

I just made a helpful color range selection script. It lets you select colors continuously instead of one-by-one like you had to do with the built-in tool: select-> color range.

I’m calling this one SCMRSN (pronounced “Scrimson”) and plan to release a CRMSN version later.

It’s available on itch: Simple Color Range Multi-Select Noodle by J19

4 Likes

are there any extensions that can modify the duration of a specific cel or layer? I’ve been trying to change the frame rate per layer but it turns out, it also change the cels that’s within that Frame.

I think you can only have frame rates on cels, not on layers or anything else. I could be wrong though

So, when I first came across this thread several months ago, I tried to download among other things this script. Unfortunately, the link to GitHub was and still is dead. I went to author’s twitter, ask them for a working one and got it!
Since then the author privated their twitter. So the script became inaccessible again.
Which is why I uploaded the file to my GDrive in case anyone needs it.

2 Likes

Hey guys, I created a simple “noise” script. GIMP has something similar, and I was missing it in Aseprite.

By default, it will create a new layer and scatter it with single pixel dots in your current foreground color. You can control the density with the first script option (higher numbers = LOWER density).

Even better, if you want to create noise using a brush, all you have to do is choose the “Use current brush” checkbox and the script will apply the brush anywhere it would have created a speck of noise.

Download and further explanation here:

3 Likes

One more for finding orphan pixels! (as suggested by @Hector_Bometon):

2 Likes

Hey everyone! :smiley:

I apologize for not updating this list recently, as I’ve been quite busy lately. However, I wanted to share a small Aseprite script I just finished working on. It allows you to import images from a folder into new layers.

You can find the script here: https://bitbucket.org/jjhaggar/aseprite-scripts/src/master/import_images_as_layers/

Feel free to give it a try and let me know if you have any feedback or suggestions. Enjoy! ^^/

1 Like