With the release of my Final Destination color animation hack I’ve decided to make a little guide on how you can make these yourself.
Color animations are found in SCN0 and CLR0 files, mainly in stages/menus. They control everything from the lighting, coloring and brightness of stages and the characters on those stages to the red and yellow “Ready To Fight!” text on the character selection screen.
First off, you’ll need to know how to identify and interpret color animations. In a hex editor they usually look something like this:
Seems pretty simple doesn’t it?
Basically the colors are stored in either 32-bit RGBX, RGBA or XXXA format depending on the situation. This means that if you have the color value 9ba19600 you’ve simply got a hex rbg value of 9ba196. Entering this value into a program like photoshop gives you this color:
We might want to turn this into something easily readable, so we’re going to convert this color animation into a .bmp file type. It just so happens that a 32-bit .bmp also stores its values in RGBX format making it easy to convert between the two.
Next you need to find where it ends for some in the crl0 files this is the end of the file, some clr0 files and scn0 files have multiple animations in one file so you need to separate them, you can usually tell where one ends by the sudden change in colors. Also the last color is usually the same as the first:
Now that you know where the animation starts and ends you can find its length:
This one happens to be 0xA8C4 bytes long which translates to 43204 in decimal. Divided that by four and you get 10801 color values, each representing a frame of the animation which in this case is 10801 frames/60 frames per second = 180 seconds or exactly 3 minutes
Now you want to open your favorite photo editing software and make a new file with a height of 1 and a width of the number of frames you animation takes up which in this case is 10801, color it all white and save it as a 32-bit bitmap with the row order flipped. It is important that you save it with exactly these settings.
But wait, what about that extra zero? Well the bitmaps are stored in XBGR format instead of RGBX. You can’t tell here but in this picture I’ve saved a file that was completely the color 123456 in hex:
As you can see we need to flip each set of four bytes, To do this I will use Hex Workshop. Select the color data and go Tools > Operations > Byte Flip. Then under “treat data as” select “32 bit unsigned long” and hit ok
The color values will now be in their proper order.
So to import your own color animation you need to:
- Find the location of the animation you want to edit
- Determine the number of frames the animation is
- Create a bmp file with a height of one and a width of the number of frames in the animation
- Make your animation (1 pixel = one frame; 60 frames = 1 second)
- Save the picture as a 32 bit .bmp with the row order flipped
- Open the .bmp in a hex editor and delete all the header and footer information; Save
- Flip the byte order of every dword using a hex editor such as hex workshop; Save
- Copy/Paste the new animation into the .pac file
- Compress the new .pac and insert it into the stage .pac
- Congratulate yourself for being able to decipher this ‘guide’