Created: 2024-01-25 Thu 17:24
Watch this devlog on YouTube!
You Are Here: https://russmatney.com/devlogs/devlog_aseprite_bulk_tag_creation.html
- Need to create 10+ animations x # of characters? - Why batch tag creation? - Demo of solution - Github repo available: `russmatney/aseprite-scripting`
- Solution Overview - Symlink a `scripts` folder to Aseprite's config: - `~/.config/aseprite/scripts/<project-name>` - Write a script to add-tags to the current open sprite - Invoke the script!
- Symlinking Walkthrough - Script Overview + Walkthrough
- tags are 1:1 with an animation (one or more frames) - tags have a name, a start frame, and an end frame
- I've built up base controllers for my games - (in dino/addons/beehive) - They expect specific tags (animations) to exist
Latest list from dino below - supports side-scrolling, top-down, and beat-em-up
idle, _jump, falling, _dead, running, air, _knocked_back, _dying, idle_down, idle_up, idle_right, run_down, run_up, run_right, _landed, walk, _punch, _punch_2, _kick, _jump, _jump_kick, _punched, _kicked, _grab, _grabbed, _throw, thrown, _hit_ground, _get_up,
- Let's jump into Aseprite and create some tags!
- github.com/russmatney/aseprite-scripting - russmatney.com/devlogs/devlog_aseprite_bulk_tag_creation.html Links in description!
- Symlink a `scripts` folder to Aseprite's config: - `~/.config/aseprite/scripts/<project-name>` - Write a script to add-tags to the current open sprite - Invoke the script!
scripts
directory from your projectBenefits: - once per project - quick to jump into a script next time!
Aseprite has a user-configuration directory somewhere on your machine
~/.config/aseprite
, but varies by OSFile > Scripts > Open Scripts Folder
We want to symlink scripts in our project into this scripts folder - like: ~/.config/aseprite/scripts/<project-name>
Figure 1: add-fighter-tags in the beatemup-city scripts dir
Creating a symlink (on linux):
ln -s ~/<your-proj>/scripts ~/.config/aseprite/scripts/<your-proj>
You’ll need to File > Scripts > Rescan Scripts Folder
at least once.
Then you can write a script in your project, and invoke it from Aseprite
via File > Scripts > <project-name> > <script-name>
.
- let's create a symlink!
- Hard-code a list of tags - Collect the existing tags - Walk the list of desired tags - Check if each tag already exists - if not: - create a new frame - create a new tag with that frame - set the tag's name
- There's some "colorwheel" logic to make the tags easier to distinguish. - (otherwise they all end up the same color. yuck!)
Time for some code!
Let’s see some aseprite files!
I hope you made it through all that!
If not, check out the repo’s readme (github.com/russmatney/aseprite-scripting
)
or the code itself.
Feel free to open an issue or leave a comment with any questions.
Thanks for watching! Special shoutout to my Patrons: - Ryan Schmukler - Jake Bartlam - Duaa Osman - Cameron Kingsbury - Aspen Smith - Ellie Matney - Alex Chojnacki
github.com/russmatney/aseprite-scripting
patreon.com/russmatney
russmatney.com
DevLog 02: Aseprite Bulk Tag Creation