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?
Title: Re: Hacking the Title Screen
Post by: chillyfeez 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.
Title: Re: Hacking the Title Screen
Post by: Spindaboy 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.
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: chillyfeez 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.
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: Spindaboy 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?
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: chillyfeez 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:
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: Spindaboy 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!
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: Swordmaster 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?
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: chillyfeez 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.
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: chillyfeez 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: (http://memberfiles.freewebs.com/22/01/115500122/photos/Title-Screen-Edits/TSwoGrid.png) 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: (http://memberfiles.freewebs.com/22/01/115500122/photos/Title-Screen-Edits/TShex.jpg) 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:
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
v h o ppp cc cccccccc 0 0 0 001 00 10110011v=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... (http://memberfiles.freewebs.com/22/01/115500122/photos/Title-Screen-Edits/TSwGrid.png) 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: (http://memberfiles.freewebs.com/22/01/115500122/photos/Title-Screen-Edits/TShexFirstTile.jpg) that's 84 08 or, 0884 or, 00001000 10000100
v h o ppp cc cccccccc 0 0 0 010 00 10000100v=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.
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: Spindaboy 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?
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: Spindaboy 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.
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: chillyfeez 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.
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: Spindaboy on September 12, 2016, 11:27:26 PM
Do I even need to touch the palettes of the text if I want to keep the text white?
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: Spindaboy on September 12, 2016, 11:29:12 PM
And so it's basically just trial and error when looking for the position in which to place the title?
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: Spindaboy on September 13, 2016, 12:05:02 AM
:)
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: chillyfeez on September 13, 2016, 12:24:31 AM
Trial and error works, but you could also figure it out. If you wanted to start right below the F in FINAL, you could find the tile that his the lowest part if the letter, figure out what tile number it is, find that in the tile map, then move down exactly four lines (or, one row of tiles) from that point.
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: Squall on September 13, 2016, 02:59:04 AM
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?
Imagine the picture of the title screen. Now slice it horizontally every 8 pixels. Do the same vertically. You will end up with a bunch of 8x8 pieces - thats the tiles. Then imagine you line up those tiles in a separate place and give each a numbers from 0 to N.
How you gonna recover the picture from these tiles? You need a map that tells you where to put each piece. Since SNES resolution is 256x224, imagine a table with 32 columns and 28 rows (32x28). In each cell there is a number - that number is a tile number (0 to N).
Thats essentially what Tile Map is - a 2d table with tile numbers in the cells (and some extra info as chillyfeez explained). Technically speaking Tile Map is 2d table represented linearly (1d), because memory is always 1d. That simply mean that you line-up first row, then second row,... That way of constructing is usually simplified as "left to right, top to bottom"
Example: Lets take 99 08 from memory $46160 $46160-$46000 = $160 = 352 (decimal) 352 / 2 = 176 (we divide by 2 because each cell is 2 bytes) 176 / 32 = 5 (32 because 1 row is 32 tiles) 176 mod 32 = 16 Then the tile with number $99 (153 decimal) is on 5th row, 16th column.
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: Spindaboy on September 13, 2016, 07:26:28 AM
Did you all not see this...?
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: chillyfeez on September 13, 2016, 11:44:37 AM
And so it's basically just trial and error when looking for the position in which to place the title?
I thought maybe in addition to getting the title screen made, you'd want to fully understand the process, in the event that you might ever want to undertake a project like this again (or make changes down the road).
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: Bahamut ZERO on September 13, 2016, 03:46:35 PM
That was a damn fine tutorial, Chillyfeez! Very informative, and sparks some ideas in my head for the next time I play around with the title screen graphics. :banonsmash:
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: Spindaboy on September 15, 2016, 06:15:28 PM
Hey does anyone know what flag triggers Tellah to join you in the Underground Waterway? I've tried several, but can't figure it out.
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: chillyfeez on September 15, 2016, 09:49:08 PM
Yeah, it's the one that's set when you see Rosa in Kaipo.
What you could do to find it (if I hadn't just told you) would be to view the NPCs in Watery Pass 1F, look at Tellah, and see what flag would be necessary to trigger the "meeting tellah" event when you talk to him.
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: Spindaboy on September 15, 2016, 10:18:01 PM
Well what's weird is that I've tried the "Rosa's Sick" flag but it doesn't work. And in the messages for Tellah I didn't see anything there.
Title: Re: Final Fantasy IV Heroes of Light & Dark Help
Post by: chillyfeez on September 15, 2016, 11:28:30 PM
So it has to be both Rydia Joins and Rosa's Sick, but you can change it to whatever you want in FF4kster, or take the flags out altogether (just move the finger to a flag and hit delete).