General => Archives => Topic started by: R999 on July 20, 2010, 02:54:54 am
Title: Special Effects Extraction Tutorial for Dummies
Post by: R999 on July 20, 2010, 02:54:54 am
All Credits goes to Zodiac.
Edit: FFT Effects Ripped by Zodiac (http://www.ffhacktics.com/effects.php)
Zodiac is close to having finished ripping all the special effects for FFT! This means steps 1 to 2 are no longer needed!
All we have to do now is, calculate the locations for Palette and Image for the BIN file, convert the BMP back to TIM, then copy the palette and image back into the corresponding BIN file.
This is an extended guide from Zodiac's tutorial (http://www.ffhacktics.com/forum/viewtopic.php?f=13&t=5497) in the spriting forum. This tutorial is pretty much the same thing, but a little bit easier to work through (for myself). I am keeping this for extended tutorial for Zozma, Lijj, and anyone else who maybe interested in special effects of FFT, as well as for self educational purposes incase I forget how to do this in the future.
This tutorial assumes you know how to retrieve the Effect BIN files from the FFT ISO via CDMage.
Overview
FFT Effect files have their custom BIN format, which includes animation scripts and the sound effects. We need to turn the file into another graphic format known as TIM first in order to convert TIM into BMP. In order to do such a conversion, we first need to make a TIM file from the BIN file.
You need the TIM UTILITY and TIM Template files,
[attachment=0:isjkz3uu]TIMUTIL and TIMTemplates.zip[/attachment:isjkz3uu] and a Hex Editor (Winhex preferred).
Step 1 Making TIM from BIN
First thing we need to do is guess the dimension of the EffectImage. This can be pretty much only done by observation as Zodiac can't find that info. There are three common sizes for effect files,
Determining Dimensions (and Size)
Width = Width of EffectImage in pixels Height = Height of "
The size in bytes for EffectImage is Width * Height. The Hex value of this decimal number is our HexImageSize.
Common sizes,
TYPE A) 256x256 BIN filesize usually at least 64KB HexImageSize = 0x10000 bytes
TYPE B) 128x256 BIN filesize 48.4KB HexImageSize = 0x8000 bytes
TYPE C) 128x128 HexImageSize = 0x4000 bytes
Calculating the Locations
1. What is your BIN's HexFilesize? Example, StasisSword E163.BIN is 54,864 --> 0xD650 bytes
3. PaletteStart location = ImageStart - 0x404 (Palette is stored 0x404 bytes before Image) Example, PaletteStart = 0x5650 - 0x404 = 0x524C
4. PaletteEnd location = PaletteStart + 0x200 (This is size of Palette) Example, 0x524C + 0x200 = 0x544C
[s:isjkz3uu]Copy and Pasting from BIN into TIM Template[/s:isjkz3uu]
This horrendous time consuming step is no longer necessary, thanks to Zodiac for ripping all the effects for us!
We have three types of TIM Templates for the 3 most common EffectImage dimensions,
TYPE A) 256x256 Template
TYPE B) 128x256 Template
TYPE C) 128x128 Template
1. In HexEditor, open the corresponding TIM Template File, and open your BIN file.
2. To go to a location in the hex file, press Option+G.
We need to Copy the Palette and Image from the BIN file to our TIM file.
TIMPaletteStart 0x14 TIMImageStart 0x220
PaletteStart, PaletteEnd --> TIMPaletteStart (0x14 of TIM file). ImageStart, ImageEnd --> TIMImageStart (0x220 of TIM file).
To Copy, press Ctrl+C. To Paste, press Ctrl+B
After you are done, Save and close the TIM file.
Step 2 Converting between BMP and TIM
Thanks to Zodiac we no longer need to do the first conversion step.
Open TIM UTILITY and open your TIM file.
Press Preview and you should see the effect, if something looks funny, it means you messed up. Look over the steps and make sure you follow through correctly.
Copy Palette from 0x14--0x213 --> paste into BIN's PaletteStart Copy Image from 0x220 --> paste into BIN's ImageStart
Save the BIN file. Finished!
Title: Re: Special Effects Extraction Tutorial for Dummies
Post by: Lijj on July 21, 2010, 05:55:16 am
Thanks a lot for this and helping me out. I didn't even know what the concept of hexadecimals was. But now... now that I can edit magic I suddenly feel really good!