Author Topic: Final Fantasy IV Heroes of Light & Dark Help  (Read 2518 times)

Spindaboy

  • Guard Leader
  • *
  • Posts: 52
  • Gender: Male
  • I need more sleep.
    • View Profile
    • SyndROMe Hacking
Final Fantasy IV Heroes of Light & Dark Help
« on: September 11, 2016, 06:42:03 PM »
I'm working on modifying the title screen to read "Heroes of Light and Dark", but I don't know how the tiles are arranged.
« Last Edit: September 12, 2016, 11:34:53 AM by linkncb16 »

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Hacking the Title Screen
« Reply #1 on: September 11, 2016, 10:35:07 PM »
I'll try to put together some tutorial stuff tomorrow after I wake up. It's not difficult, but it is a process.

Spindaboy

  • Guard Leader
  • *
  • Posts: 52
  • Gender: Male
  • I need more sleep.
    • View Profile
    • SyndROMe Hacking
Re: Hacking the Title Screen
« Reply #2 on: September 12, 2016, 09:57:15 AM »
I'll try to put together some tutorial stuff tomorrow after I wake up. It's not difficult, but it is a process.
Hey another quick question, is there anyway to edit the scripted Rydia fight where she summons Titan?

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Hacking the Title Screen
« Reply #3 on: September 12, 2016, 10:15:25 AM »
Yeah, except it's not - strictly speaking - a scripted fight. All of the stuff that happens in that battle is in Rydia's (and Titan's) AI. If you happened to spend time leveling up to 99 before the fight, you could probably actually defeat Rydia, but the earthquake and subsequent events would still occur afterwards.

Spindaboy

  • Guard Leader
  • *
  • Posts: 52
  • Gender: Male
  • I need more sleep.
    • View Profile
    • SyndROMe Hacking
Re: Hacking the Title Screen
« Reply #4 on: September 12, 2016, 11:34:29 AM »
Okay so I'm working on an event right now, but I have a few problems/ thing that need to be changed.
Here is the video of the current version: https://youtu.be/9XOYErINGHE
1.I want the Rydia battle to instead feature Rubicante summoning in a Bomb.
2.When the ship map loads I need it to look normal right away.
3.For whatever reason D.K. Cecil is not being removed from the party and Pal. Cecil as well as Porom are not having their stats loaded from the shadow slots.
« Last Edit: September 12, 2016, 04:19:54 PM by linkncb16 »

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Final Fantasy IV Heroes of Light & Dark Help
« Reply #5 on: September 12, 2016, 03:54:35 PM »
1) What happens if you change the monsters in the Rydia encounter to Rubicant and a Bomb, then just copy Rydia's AI into Rubi's? Something along those lines should work, I would think...
2) by "normal," do you mean "not red?" If so, it's just another screen tint instruction. Make sure you do the screen tint during the Black Screen, before you load the ship map. I think, once you have tinted the screen one color, the next screen tint instruction will always un-tint, no matter the parameter. If that ends up being untrue, go with "15." If I'm off base about what "normal" means, well, story of my life. Just kidding. If 'm off base about what normal means, then please clarify.

Spindaboy

  • Guard Leader
  • *
  • Posts: 52
  • Gender: Male
  • I need more sleep.
    • View Profile
    • SyndROMe Hacking
Re: Final Fantasy IV Heroes of Light & Dark Help
« Reply #6 on: September 12, 2016, 04:29:31 PM »
I tried replacing the sprites for Rydia and Titan with Rubicante and Bomb. This is the result:
https://youtu.be/PIHgK-N7-Qw
Also, for some reason when I do change character graphic to 1 or 11 to try to change to D.K. Cecil or Pal. Cecil the sprite ends up as something different entirely (mini, toad, etc.) Why does this happen?

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Final Fantasy IV Heroes of Light & Dark Help
« Reply #7 on: September 12, 2016, 04:48:37 PM »
Seems to me like the bomb is trying to appear in the same space where rubi is. I guess you could try another arrangement number, where the second monster (bomb) is further forward.
Rubi's position, as a "special size" monster, ignores the position dictated by the arrangement, but bomb is a regular monster. Maybe try whatever formation is used by the trap door battles (just thinking of one where a second monster appears in front of the first), or maybe one of those "conjurers" or whatever (the little round summoners that I think show up in the feymarch cave). Oh, or the searchers from the giant of bab-il. One of those arrangement numbers should probably do the trick.
Also, if you go to edit rubi's "size," but don't actually cha he it, a new menu will pop up allowing yoiu to edit some of the special Size's details, including x-position. Change that to 0 to move him as far back as possible.

Regarding the character graphic, well, DK Cecil is 0, not 1. So when you say "change to 1," the game searches through RAM until it finds a value that matches Kain, thus a non-character graphic shows up. I'm guessing you'd also want to do 10 for P Cecil, not 11. But I haven't actually counted.

 :edit:
BTW, jsyk, these short answer questions are making it take longer for me to get my shit together about title screen edits. Just sayin'.
 :tongue:

Spindaboy

  • Guard Leader
  • *
  • Posts: 52
  • Gender: Male
  • I need more sleep.
    • View Profile
    • SyndROMe Hacking
Re: Final Fantasy IV Heroes of Light & Dark Help
« Reply #8 on: September 12, 2016, 05:15:37 PM »
Seems to me like the bomb is trying to appear in the same space where rubi is. I guess you could try another arrangement number, where the second monster (bomb) is further forward.
Rubi's position, as a "special size" monster, ignores the position dictated by the arrangement, but bomb is a regular monster. Maybe try whatever formation is used by the trap door battles (just thinking of one where a second monster appears in front of the first), or maybe one of those "conjurers" or whatever (the little round summoners that I think show up in the feymarch cave). Oh, or the searchers from the giant of bab-il. One of those arrangement numbers should probably do the trick.
Also, if you go to edit rubi's "size," but don't actually cha he it, a new menu will pop up allowing yoiu to edit some of the special Size's details, including x-position. Change that to 0 to move him as far back as possible.

Regarding the character graphic, well, DK Cecil is 0, not 1. So when you say "change to 1," the game searches through RAM until it finds a value that matches Kain, thus a non-character graphic shows up. I'm guessing you'd also want to do 10 for P Cecil, not 11. But I haven't actually counted.

 :edit:
BTW, jsyk, these short answer questions are making it take longer for me to get my shit together about title screen edits. Just sayin'.
 :tongue:
Sorry! XP Everything should be working fine now though. Thanks for the help!

Swordmaster

  • Octomammoth
  • *
  • Posts: 23
  • Gender: Male
  • Wit and courage have served thee well.
    • View Profile
Re: Final Fantasy IV Heroes of Light & Dark Help
« Reply #9 on: September 12, 2016, 06:11:46 PM »
::throws two pennies at the computer monitor::  Sounds like you figured it out, but I just wanted to add one more formation to the pile that chillyfeez-san created.  Golbez and Shadow Dragon battle.  Wouldn't that work as well?

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Final Fantasy IV Heroes of Light & Dark Help
« Reply #10 on: September 12, 2016, 08:44:03 PM »
::throws two pennies at the computer monitor::  Sounds like you figured it out, but I just wanted to add one more formation to the pile that chillyfeez-san created.  Golbez and Shadow Dragon battle.  Wouldn't that work as well?
Yes. Good example. Possibly the best example, actually, since it's one "special size" and one regular rectangular monster.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Final Fantasy IV Heroes of Light & Dark Help
« Reply #11 on: September 12, 2016, 10:26:28 PM »
OK, here we go...

So you've got your new tiles drawn for your title screen... now to arrange them properly on the title screen.

First thing you'll want to do is open your graphics editor and jump to the title screen graphics (44000 in ROM with no header - for the rest of the tutorial, I will assume no header). You'll want to have the viewer set like this:

Specifically, sixteen tiles across, with the top left serif of the F as the first tile. This is important. I'll explain why in a bit. Keep that graphics editor window open in the background.
Now, open your hex editor. Actually, possibly the best way to do it is to open your ROM in Geiger's SNEX9X Debugger and use the hex viewer, but it's not necessary to do that. it just makes viewing your results quicker.
You're gonna want to jump to 46000 in ROM (if you're using Geiger's, you'll jump to 8E000, the LoROM offset).
You'll see the following:

This is a map of all of the tiles in the title screen, Left to Right, Top to Bottom. Each tile is represented by two bytes.
Each "B3 04" represents one black (blank) tile.
"But what does it mean?" you may ask.
Good question.
These two bytes represent a (I'm told) pretty standard format of graphical representation. The bytes are reversed, so B3 04 actually means 04B3. Several pieces of information are encoded into these two bytes. In order to properly interpret the information, you have to know what the bits of those bytes represent. The sixteen bits of these two bytes represent the following:
Code: [Select]
vhopppcc cccccccc
v: vertical orientation - 0 = right side up, 1 = upside down
h: horizontal orientation - 0 = forwards, 1 = backwards
o: priority - this has to do with layering. it's not important here because there is only one layer, but if there were two layers of graphics, this bit would determine whether the tile was the one on top or the one behind
ppp: palette - SNES loads eight palettes at any given time, and the one being used by the tile in question is determined by these three bits: 000 = palette 0, 001 = palette 1, 010 = palette 2, 011 = palette 3... 111 = palette 7
cc cccccccc: Character - these ten bits determine which tile is being used out of the (predetermined) array. Technically, this enumeration allows for the use of up to 1024 different tiles, but FFIV only loads 324 into VRAM at a time, so this value will never be higher than 0101111111 (or 17F in hex)
So, using the first blank tile as an example, let's look at a tile and see what's going on.
B3 04
means: 04B3
in bits: 00000100 10110011
Code: [Select]
v h o ppp cc cccccccc
0 0 0 001 00 10110011
v=0: The tile is right side up
h=0: The tile is forward-facing
o=0: the tile is in the back layer
ppp=001: the tile uses palette 1
cccccccccc=0010110011: the tile uses tile #B3

OK, great tile B3. So what the heck is tile B3?
Well, this is where the particular arrangement in your graphics editor comes into play. If we label the axes of the array...

Row B, Column 3 is the empty tile between "1991" and "SQUARE."

Each horizontal row of tiles on the title screen is represented by four lines of data, meaning each row is 32 tiles, represented by 64 bytes in this fashion.

Let's look at a second example - the first tile that is not B3 04. That would be this one:

that's 84 08
or, 0884
or, 00001000 10000100
Code: [Select]
v h o ppp cc cccccccc
0 0 0 010 00 10000100
v=0: The tile is right side up
h=0: The tile is forward-facing
o=0: the tile is in the back layer
ppp=010: The tile uses palette 2
cccccccccc=0010000100: the tile uses tile #84
Referencing the grid above, row 8 column 4 is the top left of the orb on the hilt of the sword. But you probably could have guessed that.

So that's how all this works. The rest is just determining where your newly drawn tiles are going to be placed and changing the data from (presumably) B3 04 to whatever properly represents your tiles.
As far as which palette to choose... Assuming you eventually want to have the letters "fade in" like I had them do in TfW, then your letters should be simple in color: for now use palette 1 (001), which is the palette used by the copyright date, etc.. When I come in and do my thing, I'll be making changes, but keeping them plain white will assure visibility in the mean time.

Helpful hint: in case you didn't know, the Windows calculator can be used to easily convert numbers between hex, decimal and binary. In the menu at the top, change the view from "Standard" to "Scientific." you can then click the radio button of the format you're starting with, type in your value, then click the radio button of the format you want it converted to.

Hopefully that all made sense, but feel free to ask if you need anything explained in more detail.

Spindaboy

  • Guard Leader
  • *
  • Posts: 52
  • Gender: Male
  • I need more sleep.
    • View Profile
    • SyndROMe Hacking
Re: Final Fantasy IV Heroes of Light & Dark Help
« Reply #12 on: September 12, 2016, 11:00:05 PM »
I swear to God I've read the entire post 5 times and I still am beyond confused. There is just one thing I don't understand. How do the 2 bytes that represent each tile correlate to where the tile is positioned and how do you know which two bytes represent which tile in the editor?

Spindaboy

  • Guard Leader
  • *
  • Posts: 52
  • Gender: Male
  • I need more sleep.
    • View Profile
    • SyndROMe Hacking
Re: Final Fantasy IV Heroes of Light & Dark Help
« Reply #13 on: September 12, 2016, 11:13:44 PM »
Okay, I think I may have a better understanding of how this works, so correct me if I'm wrong. The second byte of each tile in the hex editor points to which tile to use for that space from the graphics editor. So the question I have is how do you know out of all the B3 04's which ones go where on the screen. I have no idea how to go about figuring that out.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Final Fantasy IV Heroes of Light & Dark Help
« Reply #14 on: September 12, 2016, 11:24:38 PM »
As I said, all of the data beginning at 46000 represent every tile in the title screen, left to right, top to bottom, so the first B3 04 represents the tile in the top left corner. The second B3 04 represents the second tile in the top row. The third B3 04 represents the third tile in the top row. And so on. The first four lines of data are the top row of tiles. The next four lines are the second row of tiles (which is where the actual graphics begin, with the top of the sword's orb).
And it's the B3 that tells the game which tile to use, not the 04. You're pretty much only going to use the second byte for palettes. The first byte chooses the tile.