SRB2 Sprite Namer - Lua script for SLADE

[Open Assets] SRB2 Sprite Namer - Lua script for SLADE v2

What permissions do you give others to modify and/or maintain your submission?
Modify: YES - Maintain: YES - I give permission for my entire submission to be modified by others or used in their own work. I give permission for my entire submission to be maintained by others as well.
SRB2 SPRITE NAMER

A custom Lua script for SLADE to help you name multiple SRB2 sprites at once! This script has multiple different settings to help you name whatever sprites you want. No longer will you have to rely on manually naming everything yourself.



HOW TO INSTALL

First, open File Explorer and paste %APPDATA%\SLADE3\scripts\archive into the directory field:

Capture.PNG


Hit enter, and you will be brought to your SLADE's Archive scripts folder. Simply move the downloaded SRB2_Sprite_Namer.lua into this folder and restart SLADE, and it should now appear under Archive -> Run Scripts.

HOW TO USE

First, select all the sprite you want to name. You can do this by holding either CTRL or SHIFT and clicking the entries. CTRL selects only one at a time, while SHIFT selects everything between your last selection.

Capture.PNG


With your sprites selected, navigate to the Archive tab, click on it, then navigate to Run Script -> SRB2_Sprite_Namer, then click on it.

Capture.PNG


The script will run, and a series of pop-ups will show to determine the naming settings. The first is deciding the four letter sprite name. This is simply the first four letters of your sprite, and can be almost anything.

Capture.PNG


Next, you'll determine the letter offset. This decides what frame character the sprite namer will start at. All of the valid letters can be seen here. This is primarily useful for renaming separate sets of animations under one sprite name, which means you can usually leave this as the default for most sprites.

Capture1.PNG


After that, you'll set the rotation type. SRB2 supports many different rotation formats, and all of them are represented here. Depending on what you choose here, you may skip the rest of the steps. But most of these are for more advanced sprites, so if you're unsure which to pick, the default is generally your best bet.

Capture2.PNG


If the rotation type you selected supports walking mode, the next option will be to select if you'd like to use it, and which type. Walking mode essentially recreates how SRB2 WALK sprites are named, which gives sprites a pseudo-asymmetrical naming scheme. What this means is that, instead of sprites being named WALKA2A8 or WALKE2E8, they will be named WALKA2E8 and WALKE2A8 instead. For the front and back rotations, which are 1 and 5 respectively, you can set them to be symmetrical or not. This means whether or not WALKA1 will be named WALKA1E1 instead. For a good chunk of the cast, only their back is symmetrical during their walk, thanks to the side mouth on the front angle. So if you're following Sonic's walk cycle format here, choose 3.

Capture3.png


If you selected a rotation type at all, regardless of if it supported walk mode or not, you'll now be prompted for what naming style you want. If you say yes, the rotations will be named first, but if you say no, the frames letters will be named first instead. If you're unsure which to choose, scroll through your animation in SLADE. If the sprites rotate first instead of animating, select yes. Otherwise select no.

Capture4.PNG


Finally, depending on all the other settings, you may get prompted on how many frames your animation has. This does not mean the total amount of sprites, rather, how many frames there are minus rotations. For WAIT this tends to be 2. WALK tends to be 8. And RUN tends to be 4. The script will attempt to automatically populate the amount of frames your animation has depending on how many sprites you're renaming but it's not always accurate.

Capture5.PNG


Now the script will automatically rename all the sprites you have selected.
If you aren't happy with how the script has named your sprites, don't worry, you can always run the script again with different settings.

Capture1.PNG
Author
SMS Alfredo
Downloads
1,020
Views
5,996
First release
Last update

More resources from SMS Alfredo

Share this resource

Latest updates

  1. SLADE 3.2.X Support

    Finally figured out what was wrong with the script in SLADE versions 3.2 and onwards. Now the...
Back
Top