One more for finding orphan pixels! (as suggested by @Hector_Bometon):
Hey everyone!
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! ^^/
Hi JJ, this script is exactly what I’ve been looking for. Tho I can’t seem to run it, it keeps giving me this error:
“Unexpected symbol near ‘<’”
Thank you for making this btw :))
I suspect that the problem is that you downloaded the file as “html”, and not as “lua”.
Please, try downloading it from here: Bitbucket
Click that link > Click on the 3 points at the top right > right click on “open raw” > save link as “import_images_as_layers.lua”
If it still doesn’t work, please create a .lua file (you can use notepad++ for example) and paste this code inside:
-- Aseprite script: Import images as layers
-- Author: JJHaggar
-- Generated with the assistance of an AI model
-- License: CC0 1.0 Universal
-- https://creativecommons.org/publicdomain/zero/1.0/
-- Prompts the user to select a file
local dlg = Dialog("Select file")
dlg:label{
id = "instructions_label",
label = "Instructions: ",
text = "Select an image in the folder that contains all the images you want to add as layers"
}
dlg:file{
id = "file",
label = "File:",
open = true,
save = false,
onchange = function(file) dlg:modify{id="file", text=file} end
}
dlg:button{ id = "ok", text = "OK" }
dlg:show()
-- Extracts the directory path of the selected file
local file = dlg.data.file
local dir = app.fs.filePath(file)
-- Gets a list of files in the selected directory
if app.fs.isDirectory(dir) then
local files = app.fs.listFiles(dir)
for _,filename in ipairs(files) do
-- Check if the file is an image by its extension
local extension = string.sub(filename, -4)
if extension == ".png" or extension == ".jpg" or extension == ".bmp" or extension == ".gif" then
-- Extract the full path to the file
local filePath = app.fs.joinPath(dir, filename)
-- Check if there is an active sprite
local sprite = app.activeSprite
if not sprite then
return app.alert("There is no active sprite.")
end
-- Creates a new layer with the file name
local newLayer = sprite:newLayer()
newLayer.name = filename
-- Load the image
local image = Image{ fromFile=filePath }
-- If the image could be loaded, add it to the sprite
if image then
-- Get the current frame
local currentFrame = app.activeFrame
-- Adds the image to the layer at the current frame
sprite:newCel(newLayer, currentFrame, image)
else
app.alert("Could not load image: " .. filename)
end
-- Refreshes the sprite view
app.refresh()
end
end
else
print("Error. Select an image in the folder you have all the images.")
end
And please let me know if it works
It works! Thank youuu, have been using aseprite for 3 years now but I didn’t know these scripts are such a game changer
Script for editing XML atlases for Towerfall. I know it is only useful for a few people, but the code could be helpful to look at.
…Okay, this is a script for viewing txt, xml, and json files. Editing not supported.
Cool, maybe I’ll use them in the future!
Hi everyone, I made an extension for exporting spritesheets / frames + layers as seperate images.
Hope you like it! if you have any suggestions please tell me.
You can download it for free over here:
Hi emscape,
thanks so much for this script!
I was dealing with my own exporter and couldn’t get aseprite to only save specific frames with SaveFileCopyAs. Your way works perfectly! Thanks again so much, this is a huge bugbear of mine dealt with !
Happy that it suits your needs!
Edit: forgot to mention exporting tiles also splits frames
I’m new at scripting for aseprite, i wanna something to select some blocks of 32x32 in the canvas, then flip it and move it one pixel for right or left.
i Found this to move
app.command.MoveMask{
target='content',
direction='right',
units='pixel',
quantity=1,
wrap=true
}
and about flip i got this
app.command.Flip{
}
its good, but now i need something to select the location before move it.
Hi all, I’ve been at it again. Made a script to create a Paint Drip animation.
Here you can download it for free.
If there’s animo I can make it support masks and have some layer options as well as optimization
I’ve made s script to emphasise the layer you’re working on so you’re able to see better what you’re doing. There’s a free download for all patreon members (including the free ones) so please sign up for free:slight_smile:
I made a script for isometric “tiled mode”. It clones the selection to see how the texture fits. I hope it Helps! You can download the files at github.
https://github.com/motero2k/aseprite-scripts
Hi @JJHaggar - feel free to add my latest script to the list There’s a post about it here.
Palettize (by @Projectitis) Gives you finer control when applying a fixed palette to an image, including tweaking HSV of separate channels, excluding specific color matches, and a preview before applying.
Hi, again, Aseprite buddies!
I finally updated the first post, with lots of scripts (and since I only added the ones posted on this list, I’m sure I missed several ones XD)
These are the new ones I added to the first post (on 2024-04-18)
- Path Animator (by Gasparoken): A tool for animating an image (multi-layer allowed) according a desired path - Repository here.
- Merge All tags (by jest): It will just combine all your open tabs into 1 spritesheet… Link to repo
- non-empty cels counter (by Unknow0059): It displays the total number of non-empty cels from visible layers. Or, in naive terms, the total frame count.
- Perlin Noise Generation (by Ondrej_Pokorny): It generates perlin noise, that can be used for water/clouds textures. Scritp for generation of normal maps is in repository as well - link to repo
- Aseprite Scripts by David_Barker
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.
Github repo https://github.com/davebarkeruk/Aseprite_LUA_Scripts - MSX image file import v1.0 (by NataliaPC): It imports MSX image files. - Github repo
- PalRowMax(by BraidAcer): It scans an indexed color image and tell you if you’ve used more than X palette colours in a single pixel height horizontal line - link to drive.
- Simple Color Range Multi-Select Noodle – SCRMSN (by J19): It lets you select colors continuously instead of one-by-one like you had to do with the built-in tool: select-> color range. Available (for free) on itch.io.
- UPDATE: GitHub Link’s dead, but script was rescued thanks to V972 here - link to Google Drive here.
- Noise (by shemake): 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. - link to github
- Find Orphan (by shemake): It will find orphan pixels. - link to github
- Import Images from a folder Into New Layers (by JJHaggar, me XD): It imports images from a folder into new layers. Link to repo
- Auto Mirror (by semplar): UIt helps with seamless tiles of any shape, like isometric ones. Link to repo
- Asesprite-TF-Atlas-Editor (by CoolModder): Script for editing XML atlases for Towerfall - Link to repo
- Memo (by CoolModder): Script for viewing txt, xml, and json files. Editing not supported - Link to repo
- Aseprite Export Tooling (by emscape): Extension for exporting spritesheets / frames + layers as seperate images - Link to file (for free) on Patreon.
- Paint Drip (by emscape): script to create a Paint Drip animation - Link to file (for free) on Patreon.
- Emphasise layers (by emscape): script to emphasise your working layer within aseprite. With this you can finally see well what you’re doing when working with complex sprites - Link to file (for free) on Patreon
- Isometric Tiles (by motero2k): a script for isometric “tiled mode”. It clones the selection to see how the texture fits - Link to file
- Palettize: Better control when applying a palette (by Projectitis): It allows you to load a palette and then preview your image with that palette applied. You can adjust HSV sliders until you are happy with the mapping before applying it. - Link to repo
I don’t have much free time, and this post is getting hard to maintain ^_^U Maybe it would be a better idea to create a Github repo for this list? That way, anybody could help updating it! What do you think? ^^
Great idea!
If no-one beats me to it I will create a markdown page of your initial post and submit it to the official aseprite “script examples” repo this weekend.
A markdown library of community scripts that Ives in the official repo would be awesome. If the authors agree
What do you think!
Aseprite is working on an official scripts and extensions database with some amazing functionality.
In the meantime I have copied the scripts to an “unofficial” community scripts collection repo. Like @JJHaggar, I don’t have tons of free time, but it will be easier to manage a list this way. When the official database is ready, the scripts can be moved there instead.
Scripts can be submitted to this list by filling in an issue form: Submit a script.