Please login or register.

Login with username, password and session length
Pages: [1]
French Maid
Xifanie (Webmistress) [Posts: 4259]
  • View Profile
  • Final Fantasy Hacktics
  • http://steamcommunity.com/id/Xifanie
  • share
  • [May 06, 2016, 05:38:41 PM]
Editing Effects' Palette and Graphic
« on: May 06, 2016, 05:38:41 PM »
Why this tutorial?
To show people how change the graphics and palettes of Effect files (ability graphic animations)

Requirements

For every user:
  • An image editing program such as GraphicsGale or Photoshop (or even MSPaint if you are that masochist)
  • CDMage or cdprog
  • HxD (or any Hex Editor of your choice)

For 32bit Windows users:

For 64bit Windows users:

Tutorial

Getting started
Visit http://ffhacktics.com/wiki/Effects. This page contains very important information used through this tutorial. Also, make sure you grab the .BMP version of the Effect file you want to edit.


Editing the file
Just change the colors and graphics as you want... unless you know what you're doing, do not change the dimensions, and if the wiki page states that the Effect file is "4bpp Multi-CLUT", do not use any color other than the first 16. Feel free to edit the colors; but don't use them in the graphical area.

For the sake of this tutorial, we will be using this "Bloody Sword" edit I made:



Reducing colors while maximizing quality (optional)
* This is a lot more for 8bpp effect files than 4bpp; since you only have 16 colors per palette, chances are, using this method won't change a damn thing, in fact, it could become a hindrance

What it comes down to, is the TIM files that will be generated for 8bpp effects are in fact 15bpp + 1 byte for the transparency channel, but indexed. 15bpp means 5 bits per color. So instead of the usual 0 to 255 Red, you'll have 0 to 31 Red. Or, if you prefer, 0-8-16-24-32-and so on... i.e. in increments of ~8. Unfortunately, the best way, by far, to achieve this, is using Photoshop. So, if you don't have Photoshop, sorry because I don't know how any other way to do this.

Assuming you were working with a .psd (and you should), save your file as a BMP, but select 16bit (which is really the 15bpp I mentioned earlier).


Next, open that BMP in Photoshop. Then, we want to reduce it to 8bpp, so head over to "Image"/"Mode"/"Indexed Color"


Make sure "Preserve Exact Colors" is checked! Otherwise, new colors will be generated, and there WILL be conflict, making similar colors becoming the same when creating a TIM out of it, and you WILL lose quality. Otherwise, just adjust the Dither and its % as you wish.


Just save as a 8 bit BMP and you're good to go!


Creating a 4bpp BMP (optional)
* This section is only necessary for Effect files that have a "4bpp Multi-CLUT" color depth, and only if the Graphic was altered.


Creating a TIM file
WARNING: If your Effect file's color depth is "4bpp Multi-CLUT", and you want to import a new graphic, you will need to create a 4bpp TIM file. However, if you edited the colors beyond the first 16 (i.e. the other palettes) and want to import those changes, you will need to create a 8bpp TIM file. Obviously if you want both new palettes and new graphics, you will need to create the two; a 4bpp and a 8bpp TIM.

Simply use TIM Utility with the right settings as displayed below. You can preview your file using the "Preview..." button; if it doesn't display properly, something's wrong. If everything looks good, close the Preview window and click "Convert...".
4bpp: For 4bpp files (Graphic)
8bpp: For 8bpp files and 4bpp files (Palette)
Translucent except black
Transparent for black
Write Type: TIM



Importing the new Palette (optional)
* If your Effect file's color depth is "4bpp Multi-CLUT", use the 8bpp TIM file that you created for these steps. If you only edited the first 16 colors, you can instead use the 4bpp TIM file with the range 0x 14 to 0x 33.
  • Open your TIM file and the E???.BIN file in HxD
  • In the TIM file, select 0x 14 to 0x 213 (Use "Select Block..." [ctrl+e] to help)
  • Copy (ctrl+c)
  • In the BIN file, Goto (ctrl+g) to the "Palette Offset" specific on the wiki page for that Effect
  • Paste Write (ctrl+b)



Importing the new Graphic (optional)
* If your Effect file's color depth is "4bpp Multi-CLUT", use the 4bpp TIM file that you created for these steps
  • Open your TIM file and the E???.BIN file in HxD
    • 8bpp: In the TIM file, select from 0x 220 all the way to the end of the file (Use "Select Block..." [ctrl+e] to help)
    • 4bpp: In the TIM file, select from 0x 40 all the way to the end of the file (Use "Select Block..." [ctrl+e] to help)
  • Copy (ctrl+c)
  • In the BIN file, Goto (ctrl+g) to the "Graphic Offset" specific on the wiki page for that Effect
  • Paste Write (ctrl+b)



Finishing steps
  • Save your edited BIN file
  • Import it using CDMage/cdprog
  • You is done!



Advanced hacking notes
Let's say your file changed filesize... Normally you'd use the wiki, where I was nice enough to compile a list of all the offsets for you guys, but here is how it is actually calculated:

4bpp:
  • Graphic Start: File Size - ( Image Width × Image Height ÷ 2 )
  • Palette Start: Graphic Start - 0x204
8bpp:
  • Graphic Start: File Size - ( Image Width × Image Height )
  • Palette Start: Graphic Start - 0x404
« Last Edit: May 09, 2016, 12:33:39 PM by Xifanie »
    • Modding version: PSX
  • <R999> My target market is not FFT mod players
    <Raijinili> remember that? it was awful
    The Puppet ---Master---
    Elric (Overseer) [Posts: 3826]
    • View Profile
    • Youtube Channel
    • http://steamcommunity.com/id/Bones42
    • share
    • [May 06, 2016, 07:43:46 PM]
    Re: Editing Effects' Palette and Graphic
    « Reply #1 on: May 06, 2016, 07:43:46 PM »
    Thank you VERY much for this. The new Wiki documentation as well as the tutorial to go along with it will save so much time!

    Adding this to the Tutorial Link Index

    • Modding version: PSX
  • <@Angel> Teach a man to fish and he'll open up a fishery to compete against yours.
    Journey of the Five Youtube ChannelThe Lion War Current Status
       
    Jot5 Leader :: Eventer :: OtherTLW Leader :: Eventer :: Other
    Event Kid, Mr. Peanut
    Jumza [Posts: 1515]
    • View Profile
    • share
    • [May 07, 2016, 01:01:52 AM]
    Re: Editing Effects' Palette and Graphic
    « Reply #2 on: May 07, 2016, 01:01:52 AM »
    Awesome! We sorely needed a new tutorial on recolouring effects :)

    • Modding version: PSX
  • Check out my project ~ FFT: A Stone's Ripple : http://ffhacktics.com/smf/index.php?topic=10857.0
    The demo was just released! Come check it out!
    Nyzer: Alma teleports out of her own possessed body.
    French Maid
    Xifanie (Webmistress) [Posts: 4259]
    • View Profile
    • Final Fantasy Hacktics
    • http://steamcommunity.com/id/Xifanie
    • share
    • [May 07, 2016, 06:13:23 AM]
    Re: Editing Effects' Palette and Graphic
    « Reply #3 on: May 07, 2016, 06:13:23 AM »
    Alright, added the section on how to make 4bpp BMPs with Photoshop and GraphicsGale... and I just found out yesterday that Photoshop easily beats GraphicsGale at that. Well, the only way it could cause real issues in GraphicsGale AFAIK is when you have 2 colors with the same RBG values being used. Because GraphicsGale reconstructs the graphical/palette data in the process, it would set both colors as the first one... meaning this could cause trouble for alternate palettes. We're still talking about a very rare case scenario, but it's worth mentioning.

    I can't believe I neglected to add that section... oops. >>;

    • Modding version: PSX
  • <R999> My target market is not FFT mod players
    <Raijinili> remember that? it was awful
    The Kindly Shopkeeper
    Lijj [Posts: 2039]
    • View Profile
    • share
    • [May 07, 2016, 09:11:59 AM]
    Re: Editing Effects' Palette and Graphic
    « Reply #4 on: May 07, 2016, 09:11:59 AM »
    Xifanie, this is a great tutorial. Also good to know I can still use TIM utility via dosbox.
    French Maid
    Xifanie (Webmistress) [Posts: 4259]
    • View Profile
    • Final Fantasy Hacktics
    • http://steamcommunity.com/id/Xifanie
    • share
    • [May 07, 2016, 09:26:52 AM]
    Re: Editing Effects' Palette and Graphic
    « Reply #5 on: May 07, 2016, 09:26:52 AM »
    Added the section: Reducing colors while maximizing quality (optional) which I feel is very important for any artist dealing with TIM files to know.

    • Modding version: PSX
  • <R999> My target market is not FFT mod players
    <Raijinili> remember that? it was awful
    Guru [Posts: 182]
    • View Profile
    • share
    • [May 07, 2016, 04:28:44 PM]
    Re: Editing Effects' Palette and Graphic
    « Reply #6 on: May 07, 2016, 04:28:44 PM »
    Wow this is awesome! I had looked into changing the ability effects but this goes way beyond how far I got when researching. That's a pretty sweet looking effect you came up with for this. Thanks for your continued awesomeness xif!
    Choto [Posts: 818]
    • View Profile
    • share
    • [May 20, 2016, 10:33:19 PM]
    Re: Editing Effects' Palette and Graphic
    « Reply #7 on: May 20, 2016, 10:33:19 PM »
    For whoever wants it, I wrote a bootloader program that will enter all the text in DOSBox to start Windows 3.1. Just put it in the same directory as DOSBox!

    Thanks Xif for making our dreams of using timutil again come true!


    Edit: Elric had trouble with the program, anybody else try it? Let me know if it worked or not!
    « Last Edit: May 20, 2016, 10:56:30 PM by Choto »
    Pages: [1]