News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Changing the FF7 hand cursor?  (Read 2811 times)

NERV Agent

  • Restricted Access
  • Sr. Member
  • *
  • Posts: 497
  • Eva Unit 01
    • View Profile
    • Watch my anime shitposts on YouTube! Smell them, too!
Changing the FF7 hand cursor?
« on: December 01, 2016, 03:16:33 am »
Like the topic says, how do I change the hand cursor that appears in menus? I want to see if I can change it into a sword, or a candy cane, or an entry plug, or something.

Is it as simple as changing a ".TIM" file somewhere on the CD? Or is it more complex than that?

I thought it might be in "/INIT/KERNEL.BIN" because of this:

http://wiki.qhimm.com/view/FF7/Command_data

Then I take this into account:

http://finalfantasy.wikia.com/wiki/File:FF7Cursor.png

The cursor is 48 x 24.

To accommodate for a 256 color palette, with each color consisting of 3 components (RGB) means the palette size is 256*3 =768 bytes.

Now, I guess the size is (48*24)+768 = 1920 bytes

Then I use FF7Tools and get this:

>python unbingz -l KERNEL.BIN
0/0: 256 bytes
1/0: 3584 bytes
2/0: 3988 bytes
3/0: 2876 bytes
4/0: 3584 bytes
5/0: 5632 bytes
6/0: 1152 bytes
7/0: 512 bytes
8/0: 1920 bytes
9/0: 684 bytes
9/1: 4580 bytes
9/2: 2404 bytes
9/3: 706 bytes
9/4: 274 bytes
9/5: 784 bytes
9/6: 1742 bytes
9/7: 1412 bytes
9/8: 236 bytes
9/9: 2566 bytes
9/10: 1392 bytes
9/11: 1794 bytes
9/12: 488 bytes
9/13: 420 bytes
9/14: 940 bytes
9/15: 744 bytes
9/16: 1620 bytes
9/17: 244 bytes

I notice the line "8/0: 1920 bytes".

Ugh, so I decompressed it with unbingz and got "KERNEL_8_0.data". I scanned it with PSicture and got nothing. If this is it, how do I view it? If this isn't it, where else could it be?

Gemini

  • Hero Member
  • *****
  • Posts: 2017
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: Changing the FF7 hand cursor?
« Reply #1 on: December 01, 2016, 07:30:46 am »
KERNEL.BIN contains only database data and strings. WINDOW.BIN is where the cursor graphics is stored, along with other UI elements and two subfiles containing the whole font and width tables.
I am the lord, you all know my name, now. I got it all: cash, money, and fame.

NERV Agent

  • Restricted Access
  • Sr. Member
  • *
  • Posts: 497
  • Eva Unit 01
    • View Profile
    • Watch my anime shitposts on YouTube! Smell them, too!
Re: Changing the FF7 hand cursor?
« Reply #2 on: December 04, 2016, 07:00:29 am »
Ugh.

So it is inside WINDOW_0_0.data, and uses CLUT [02/16]. I tried to save it as a ".PNG" with Tim2View, but it doesn't save the palette (it saves it in 16 million colors, IIRC).

I'm trying to use "tim2png" included in FF7Tools and I get this shit:

python tim2png WINDOW_0_0.data WINDOW_0_0.png
Error reading TIM image 'WINDOW_0_0.data': fromstring() has been removed. Please
 call frombytes() instead.

How do I convert this into a ".PNG" file while preserving all 16 palettes?

December 04, 2016, 07:15:30 am - (Auto Merged - "Help me Asuka. Help me....")
Okay, I used Tim2View to extract a ".TIM" file.

I can somewhat view that ".TIM" file in Tile Molester with these settings:

View -> Codec -> 4 bpp linear, reverse order
View -> Mode -> 2-Dimensional
Image -> Canvas size… -> Columns: 32 Rows: 32

The problem now is it is all discolored.

How do I get Tile Molester to load palettes inside the ".TIM" file? Also, how do I change the colors of the palettes in the CLUT?
« Last Edit: December 04, 2016, 07:16:24 am by NERV Agent »

Mugi

  • Sr. Member
  • ****
  • Posts: 297
  • Personal text
    • View Profile
    • Blacklabel-translations
Re: Changing the FF7 hand cursor?
« Reply #3 on: December 04, 2016, 02:57:03 pm »
tile molester has a function to import palettes but to my knowledge, it doesnt work very well,
i've ghotten it to work some times but more times than not, it simply doesnt load the palette anyway.

in any case, here's how it works:



then just set up the palette address and mode:

In PSP we trust.

NERV Agent

  • Restricted Access
  • Sr. Member
  • *
  • Posts: 497
  • Eva Unit 01
    • View Profile
    • Watch my anime shitposts on YouTube! Smell them, too!
Re: Changing the FF7 hand cursor?
« Reply #4 on: December 04, 2016, 05:37:14 pm »
Yup. I've known about that, too.

The question is knowing where the CLUT is located in the ".TIM" file, and what Format and Byte Order to set it to.

But this ".TIM" is really a ".data" file, so where stuff might be located in might not be standard to ".TIM" files.
« Last Edit: December 04, 2016, 05:42:28 pm by NERV Agent »

Mugi

  • Sr. Member
  • ****
  • Posts: 297
  • Personal text
    • View Profile
    • Blacklabel-translations
Re: Changing the FF7 hand cursor?
« Reply #5 on: December 04, 2016, 05:46:33 pm »
Yup. I've known about that, too.

The question is knowing where the CLUT is located in the ".TIM" file, and what Format and Byte Order to set it to.

But this ".TIM" is really a ".data" file, so where stuff might be located in might not be standard to ".TIM" files.

looking at the tim's i have at hand the palette starts from 0x14 (20dec for tilemolester) and for a 256 color image it's 0x200 in size.
In PSP we trust.

NERV Agent

  • Restricted Access
  • Sr. Member
  • *
  • Posts: 497
  • Eva Unit 01
    • View Profile
    • Watch my anime shitposts on YouTube! Smell them, too!
Re: Changing the FF7 hand cursor?
« Reply #6 on: December 04, 2016, 06:16:26 pm »
So I used the settings

Offset: 14
Size: 200
Format: 15BPP BGR (555)
Byte Order: Intel

Maybe it's my imagination, but the colors seem reversed?

Mugi

  • Sr. Member
  • ****
  • Posts: 297
  • Personal text
    • View Profile
    • Blacklabel-translations
Re: Changing the FF7 hand cursor?
« Reply #7 on: December 04, 2016, 06:22:05 pm »
So I used the settings

Offset: 14
Size: 200
Format: 15BPP BGR (555)
Byte Order: Intel

Maybe it's my imagination, but the colors seem reversed?

as far as i know, you have to input addresses to tilemolester as dec instead of hex, so 20 for start address and 512 as size. (or 32 if it's a 16color image)

what comes to the colors being reversed, im not too familiar with the format as i solely have to deal with it, but if they appear as reversed, try finding a RGB palette mode instead of BGR, or just flip the endianess from intel to motorola.

tilemolester really doesnt have that many options for the palette anyway, so testing them through should be matter of 2 minutes anyway.
In PSP we trust.

NERV Agent

  • Restricted Access
  • Sr. Member
  • *
  • Posts: 497
  • Eva Unit 01
    • View Profile
    • Watch my anime shitposts on YouTube! Smell them, too!
Re: Changing the FF7 hand cursor?
« Reply #8 on: December 04, 2016, 06:36:56 pm »
YES!

It worked! Thanks!

Can I use Tile Molester to change the palette colors directly? Or should I just use Tim2View for that instead?

Mugi

  • Sr. Member
  • ****
  • Posts: 297
  • Personal text
    • View Profile
    • Blacklabel-translations
Re: Changing the FF7 hand cursor?
« Reply #9 on: December 04, 2016, 06:53:44 pm »
YES!

It worked! Thanks!

Can I use Tile Molester to change the palette colors directly? Or should I just use Tim2View for that instead?

nice!

and no idea for that, i always use optpix imagestudio for dealing with the format as it has a full support for it, so i've never attempted to edit graphics with programs like tile molester, it's more usefull for finding graphics modes than actually editing them.

for that matter, there is a tim/tim2 plugin around for photoshop/paintshop pro, you might want to look into that.
In PSP we trust.

NERV Agent

  • Restricted Access
  • Sr. Member
  • *
  • Posts: 497
  • Eva Unit 01
    • View Profile
    • Watch my anime shitposts on YouTube! Smell them, too!
Re: Changing the FF7 hand cursor?
« Reply #10 on: January 27, 2017, 12:48:10 am »
Hello again.

I want to know the exact dimensions of the hand cursor sprites. I think the menu sprites are 24 x 16, but I'm not sure about the field cursor sprite.

Has anyone out there properly ripped these sprites already? I already checked Spriters Resource, and I already Googled it, but I have not found what I am looking for.

January 29, 2017, 09:10:04 pm - (Auto Merged - Waifu chops off your penis.)
Ugh, I just ran into a problem.

These graphics are compressed with the GZIP algorithm. To my knowledge, FF7 tools only has a tool that can compress something to the LZSS format.

How do I put this modified ".TIM" file back into the game?
« Last Edit: January 29, 2017, 09:10:57 pm by NERV Agent »