• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
March 28, 2024, 02:32:46 pm

News:

Don't be hasty to start your own mod; all our FFT modding projects are greatly understaffed! Find out how you can help in the Recruitment section or our Discord!


Adding graphics to up to 6 statuses

Started by RetroTypes, April 09, 2020, 06:10:40 pm

RetroTypes

April 09, 2020, 06:10:40 pm Last Edit: November 27, 2021, 11:20:45 pm by RetroTypes
[EDIT] Elric has made a spreadsheet using this data that lets you do all of this and more, in a more user-friendly format. While this thread still has great info in it, if all you want to do is edit frame.bin text and/or locations, use the Frame.bin Editor Spreadsheet!


tldr: I made a hack that lets you assign pre/post attack graphics to up to 6 statuses that didn't already have some, and modified the frame.bin to make room for you to create them.

So I am adding a new status to my mod that uses the blank status in the patcher, and I wanted it to say the name of it when casting, not just when you check a unit's current status. Adding the word "Empowered" to the cluttered Frame.bin seemed daunting at first, but I also wanted to rename a lot of the statuses to their WotL versions anyway, and doing do freed up a lot of space. But changing and moving around the few words I did meant I had to reassign their locations and sizes, and it wasn't particularly neat, so I went all out and reorganized all the status names in frame.bin and wrote a hack to assign all of their new locations and sizes. But while I was adding in the part to assign the blank status, I saw there were 5 more unused slots that could be used and figured I'd make as many as possible available using the most-likely-to-be-altered statuses (probably useful to those who've reworked a few statuses).

I consulted *this thread* a lot, and played with it until I got it right. Then I had Glain take a look at this xml and even he needed reminding about what all this data was, so I knew I had to share it since probably no one's shared a hack like this lol. So, here's what we're looking at:



----------------------------
      <Location file="BATTLE_BIN" offset="2CD18"><!-- Adds Blank to list of statuses that use graphics post-attack-->
        1E
      </Location>

      <Location file="BATTLE_BIN" offset="2CD1D"><!-- Adds Jump to list of statuses that use graphics post-attack-->
        1F
      </Location>

      <Location file="BATTLE_BIN" offset="2CD1E"><!-- Adds Defending to list of statuses that use graphics post-attack-->
        20
      </Location>

      <Location file="BATTLE_BIN" offset="2CD1F"><!-- Adds Performing to list of statuses that use graphics post-attack-->
        21
      </Location>

      <Location file="BATTLE_BIN" offset="2CD26"><!-- Adds Cursed to list of statuses that use graphics post-attack-->
        22
      </Location>

      <Location file="BATTLE_BIN" offset="2CD37"><!-- Adds Wall to list of statuses that use graphics post-attack-->
        23
      </Location>

      <Location file="BATTLE_BIN" offset="2CD2E"><!-- Adds Toad to list of statuses that use graphics post-attack (as it didn't before)-->
        30
      </Location>

Part 1 assigns these 7 statuses a slot to have a graphic displayed above a character when they're inflicted with said status (Toad already had a graphic in frame.bin but only used it to show the name before the status was inflicted, not after; adding it here makes it show the word when they turn into a frog as well). So once you draw up the graphic in frame.bin, inflicting the blank status on someone will now show the word of your creation above their head right afterwards. Keep in mind all of these besides Toad need to be drawn by you first into the Frame.bin image. For more info on that, my Editing Weapon Graphics thread details how to export, edit, and import the Frame.bin bmp.

----------------------------
      <Location file="BATTLE_BIN" offset="E5F68" mode="DATA"><!-- Assigns existing statuses their new graphics locations and sizes-->
        7F211208                                <!-- Dead-->
        A3551A08                                <!-- Undead-->
        146D1C0A                                <!-- Petrify-->
        40F01508                                <!-- Invite-->
        33551208                                <!-- Blind-->
        45552608                                <!-- Confusion-->
        89551A08                                <!-- Silence-->
        466D1E0A                                <!-- Vampire-->
        125D0A08                                <!-- Oil-->
        2F5D2108                                <!-- Float-->
        735D1C08                                <!-- Reraise-->
        2E651F08                                <!-- Invisible-->
        6B551E08                                <!-- Berserk-->
        00551A08                                <!-- Poison-->
        306D160A                                <!-- Regen-->
        4D651F08                                <!-- Protect-->
        005D1208                                <!-- Shell-->
        DB481608                                <!-- Haste-->
        1C5D1308                                <!-- Slow-->
        646D130A                                <!-- Stop-->
        605D1308                                <!-- Faith-->
        445D1C08                                <!-- Athiest-->
        00651808                                <!-- Charm-->
        006D140A                                <!-- Sleep-->
        8F5D2808                                <!-- Immobilize-->
        24D21B08                                <!-- Disable-->
        9CCC1C08                                <!-- Reflect-->
        18651608                                <!-- Doom-->
        1A551908                                <!-- Stolen-->
        B8CC1B08                                <!-- Broken-->
      </Location>

      <Location file="BATTLE_BIN" offset="E6028">
        B5701408                                <!-- Toad-->
      </Location>

      <Location file="EVENT_EQUIP_OUT" offset="109EC" mode="DATA">

        77006D002B000A00                                 <!-- Blank-->
        0000000000000000                                 <!-- Crystal-->
        7F00210012000800                                 <!-- Dead-->
        A30055001A000800                                 <!-- Undead-->
        0000000000000000                                 <!-- Charging-->
        0000000000000000                                 <!-- Jump-->
        0000000000000000                                 <!-- Defending-->
        0000000000000000                                 <!-- Performing-->
        14006D001C000A00                                 <!-- Petrify-->
        4000F00015000800                                 <!-- Invite-->
        3300550012000800                                 <!-- Blind-->
        4500550026000800                                 <!-- Confusion-->
        890055001A000800                                 <!-- Silence-->
        46006D001E000A00                                 <!-- Vampire-->
        0000000000000000                                 <!-- Cursed-->
        0000000000000000                                 <!-- Treasure-->
        12005D000A000800                                 <!-- Oil-->
        2F005D0015000800                                 <!-- Float-->
        73005D001C000800                                 <!-- Reraise-->
        2E0065001F000800                                 <!-- Invisible-->
        6B0055001E000800                                 <!-- Berserk-->
        0000000000000000                                 <!-- Chicken-->
        B500700014000800                                 <!-- Toad-->
        0000000000000000                                 <!-- Critical-->
        000055001A000800                                 <!-- Poison-->
        30006D0016000A00                                 <!-- Regen-->
        4D0065001F000800                                 <!-- Protect-->
        00005D0012000800                                 <!-- Shell-->
        DB00480016000800                                 <!-- Haste-->
        1C005D0013000800                                 <!-- Slow-->
        64006D0013000A00                                 <!-- Stop-->
        0000000000000000                                 <!-- Wall-->
        60005D0013000800                                 <!-- Faith-->
        44005D001C000800                                 <!-- Atheist-->
        0000650018000800                                 <!-- Charm-->
        00006D0014000A00                                 <!-- Sleep-->
        8F005D0028000800                                 <!-- Immobilize-->
        2400D2001B000800                                 <!-- Disable-->
        9C00CC001C000800                                 <!-- Reflect-->
        1800650016000800                                 <!-- Doom-->

      </Location>

      <Location file="WORLD_WORLD_BIN" offset="ACF68" mode="DATA">

        77006D002B000A00                                 <!-- Blank-->
        0000000000000000                                 <!-- Crystal-->
        7F00210012000800                                 <!-- Dead-->
        A30055001A000800                                 <!-- Undead-->
        0000000000000000                                 <!-- Charging-->
        0000000000000000                                 <!-- Jump-->
        0000000000000000                                 <!-- Defending-->
        0000000000000000                                 <!-- Performing-->
        14006D001C000A00                                 <!-- Petrify-->
        4000F00015000800                                 <!-- Invite-->
        3300550012000800                                 <!-- Blind-->
        4500550026000800                                 <!-- Confusion-->
        890055001A000800                                 <!-- Silence-->
        46006D001E000A00                                 <!-- Vampire-->
        0000000000000000                                 <!-- Cursed-->
        0000000000000000                                 <!-- Treasure-->
        12005D000A000800                                 <!-- Oil-->
        2F005D0015000800                                 <!-- Float-->
        73005D001C000800                                 <!-- Reraise-->
        2E0065001F000800                                 <!-- Invisible-->
        6B0055001E000800                                 <!-- Berserk-->
        0000000000000000                                 <!-- Chicken-->
        B500700014000800                                 <!-- Toad-->
        0000000000000000                                 <!-- Critical-->
        000055001A000800                                 <!-- Poison-->
        30006D0016000A00                                 <!-- Regen-->
        4D0065001F000800                                 <!-- Protect-->
        00005D0012000800                                 <!-- Shell-->
        DB00480016000800                                 <!-- Haste-->
        1C005D0013000800                                 <!-- Slow-->
        64006D0013000A00                                 <!-- Stop-->
        0000000000000000                                 <!-- Wall-->
        60005D0013000800                                 <!-- Faith-->
        44005D001C000800                                 <!-- Atheist-->
        0000650018000800                                 <!-- Charm-->
        00006D0014000A00                                 <!-- Sleep-->
        8F005D0028000800                                 <!-- Immobilize-->
        2400D2001B000800                                 <!-- Disable-->
        9C00CC001C000800                                 <!-- Reflect-->
        1800650016000800                                 <!-- Doom-->

      </Location>

This is the meat and potatoes of this hack, as it tells the game where the hell I moved all of the vanilla status graphics to when I rearranged them all lol. Elric found the parts to update the locations for the statuses in the item inventory list, both in the formation screen and in battle. (World.bin for formation, and Equip.out for in battle, for those who care)

----------------------------
      <Location file="BATTLE_BIN" offset="E5FE0"><!-- Blank status-->
        XXYYXLYL
      </Location>
      <Location file="BATTLE_BIN" offset="E5FE4"><!-- Jump-->
        XXYYXLYL
      </Location>
      <Location file="BATTLE_BIN" offset="E5FE8"><!-- Defending-->
        XXYYXLYL
      </Location>
      <Location file="BATTLE_BIN" offset="E5FEC"><!-- Performing-->
        XXYYXLYL
      </Location>
      <Location file="BATTLE_BIN" offset="E5FF0"><!-- Cursed-->
        XXYYXLYL
      </Location>
      <Location file="BATTLE_BIN" offset="E5FF4"><!-- Wall-->
        XXYYXLYL
      </Location>

Here's where you'll put the data of the graphics you draw into the hack. For reference, XX is the X coordinate of the top left pixel in hex, YY is the Y coordinate of the top left pixel in hex - 20 (also in hex), XL is the width of the graphic in hex, and YL is the height of the graphic in hex. They're named their default names but obviously if you plan to rework any of them make the graphic say whatever you want it to.

----------------------------
      <Location file="BATTLE_BIN" offset="100920"><!-- Adds Blank Status graphic to pre-attack screen graphics list-->
        1E
      </Location>

      <Location file="BATTLE_BIN" offset="100925"><!-- Adds Jump Status graphic to pre-attack screen graphics list-->
        1F
      </Location>

      <Location file="BATTLE_BIN" offset="100926"><!-- Adds Defending Status graphic to pre-attack screen graphics list-->
        20
      </Location>

      <Location file="BATTLE_BIN" offset="100927"><!-- Adds Performing Status graphic to pre-attack screen graphics list-->
        21
      </Location>

      <Location file="BATTLE_BIN" offset="10092E"><!-- Adds Cursed Status graphic to pre-attack screen graphics list-->
        22
      </Location>

      <Location file="BATTLE_BIN" offset="10093F"><!-- Adds Wall Status graphic to pre-attack screen graphics list-->
        23
      </Location>

And finally, we add those graphics to the pre-attack screen, so you'll be able to see what status you're inflicting before taking the action, along with it's chance to hit, etc.

----------------------------

Glain's Now Loading Routine Rewrite is also now included in every version of this hack, since moving everything around broke the loading screen text. All credit for that goes to him, I just modified the numbers to fit the new Frame.bin. Thank you Glain!

Elric has also fixed this hack, as he was able to reverse engineer FFT:C to figure out the code to fix the inventory list graphics. Thank you Elric!

----------------------------

Now obviously you wont be able to use all 6 in one hack unless they have decently short names, even though I cleared up a good bit of space in the Frame.bin you can't fit more than maybe 4 in there if they're normal-sized words. So any you don't make graphics for, just delete the code for those ones. I just included 6 so it'd be more likely I'd have written the code for the one(s) you might edit.

Attached I have the ready-to-edit Frame.bin with tons of empty space, and the hack written as above (all combined and with comments, of course), so that you can create your own status graphics at will for your own projects. But for those who want to plug-and-play, see the next post below. I tested this hack a few times but I'm sure it's far from perfect, so if you find anything wrong let me know. Feel free to ask questions below as well, but my coding knowledge is still very limited so keep in mind I might not have all the answers right away lol.
  • Modding version: PSX
  • Discord username: RetroTypes

RetroTypes

April 09, 2020, 06:10:56 pm #1 Last Edit: July 06, 2020, 12:43:43 am by RetroTypes
I'm also including a copy of each where I've added graphics to 5 of the vanilla statuses; now Jumping, Defending, Wall, Cursed, and Acting (couldn't fit Performing, sorry lol) will all show their names before and after they're cast on a target. Keep in mind you'll still have to flag abilities to actually inflict these statuses in the Patcher, but once you do, this will take care of the rest. In limited testing, I found that doing skills in the Bard's Sing skillset don't inflict "Performing" in a way that it shows above your character at all, but if you flag an ability to manually inflict it via the Patcher it does say it. I'm assuming the same with Jumping when you do normal Jump abilities, but I didn't test those.

Again, these are ready to be used with no editing to them required.

Now includes a modified version of Glain's Now Loading Routine Rewrite in the hack, so the loading screen text will appear as expected. I added the word "Now" to a spot in the Frame.bin that I'm 99% sure is unused (blank white space) but if it causes any problems let me know. Doing this let me save even more space in the loading screen code (on top of the word "Defending" also being a big help) so you save even more SCUS space with this version.

Also now includes Elric's Fixes for the inventory list menus.
  • Modding version: PSX
  • Discord username: RetroTypes

RetroTypes

May 20, 2020, 07:53:49 pm #2 Last Edit: May 20, 2020, 08:27:32 pm by RetroTypes
Something I've finally been able to track down and identify is that the loading screens when using this Frame.bin will say "Now dead,ng" instead of the usual "Now loading" because Square couldn't just put the word Loading into the Frame.bin for some reason, so they frankenstein'd it from the rest of the words, which I obviously moved around. (For those interested, it's a combination of the words Float, Guarded, and Confusion) I'm going to look for a way to fix this, and will update this if I find a way, but for now, it is a known bug.
  • Modding version: PSX
  • Discord username: RetroTypes

Heisho

Quote from: RetroTypes on May 20, 2020, 07:53:49 pmSquare couldn't just put the word Loading into the Frame.bin for some reason
Dammit Square!

On the other hand what about those XXXXXXXX in the bottom? Are they useful for something, maybe the Now Loading could be placed there, and even with a nicer looking.
  • Modding version: PSX
Grrr, arwg, hiss, and some other zombie noises...
  • Discord username: Heisho

RetroTypes

Quote from: Heisho on May 23, 2020, 09:04:18 pmDammit Square!

On the other hand what about those XXXXXXXX in the bottom? Are they useful for something, maybe the Now Loading could be placed there, and even with a nicer looking.

That will likely be what I do, once we find the code that assigns the word "loading" it's location. It's not in the battle.bin, since it's only on loading screens, so I'm looking into it. Seeing as my ASM skills are still very limited though, it may be a while lol. As it stands, the XX's in my hack are for the statuses you assign them to, that's it.
  • Modding version: PSX
  • Discord username: RetroTypes

RetroTypes

Quote from: Heisho on May 23, 2020, 09:04:18 pmwhat about those XXXXXXXX in the bottom? Are they useful for something, maybe the Now Loading could be placed there, and even with a nicer looking.

Just reread your post and realized that you were talking about the X's in the image, not in my hack. The X spaces are unavailable, not sure about the reason but I know they're not accessible like the rest of the space.

On the bright side, Glain has found the code for the loading screen text positions in SCUS, and I can fix this now! I'll update the existing hacks to work as posted, and I'll also post another version which will have the words "Now loading" in the Frame.bin, which will save a LOT of valuable SCUS space. For more info, see the wiki: https://ffhacktics.com/wiki/Build_Image_Data_for_Now_Loading_message
  • Modding version: PSX
  • Discord username: RetroTypes

RetroTypes

June 19, 2020, 03:57:57 pm #6 Last Edit: July 06, 2020, 12:44:54 am by RetroTypes
Alright, v2 of both hacks are now out, with modified versions of Glain's Now Loading Routine Rewrite hack included in both to fix the loading screen text! Thanks again Glain! And, as an added bonus, I'm including another version of the Frame.bin and graphics hack, which will save a LOT of SCUS space, between Glain's *very* efficient rewrite and the added bonus of only having to load a single image with this version. I removed the outlines around the letters too, so it actually results in a cleaner looking loading screen than vanilla! For those needing every bit of SCUS space you can get your hands on, it doesn't get any better than this. It's literally free real estate.  xD

(If you do DL this for the SCUS space and you're not gonna be adding any new statuses, you'll have to delete a few lines in the xml, but if you're writing new code in SCUS space I'm sure you can already figure that out lol)

EDIT: updated the frame.bin in this post, I left something in the original one that wasn't supposed to be there lol sorry folks
  • Modding version: PSX
  • Discord username: RetroTypes

RetroTypes

July 03, 2020, 05:08:58 am #7 Last Edit: July 04, 2020, 07:16:49 am by RetroTypes
New bug found, the inventory list will show funky stuff when looking at items that grant statuses to the wearer. This is separate code in Equip.out that needs to be updated with the new status graphic locations. I've never used this menu before today, thus why I didn't catch it till now, but if I can find the code I'll update all of these again with that fix. For now, avoid that menu if using this hack lol

EDIT: Elric has located the fix for this, but there's a few unknowns about the newly discovered data that I want to figure out before I post everything here. Looking promising though!
  • Modding version: PSX
  • Discord username: RetroTypes

RetroTypes

New update, fixed the inventory list menus! Thanks to Elric, who found all of this. Had to figure out what each section did individually before I was comfortable posting it here, but we've solved everything now. Hopefully this will be the final update lol, though I think soon there will be an even better way to do all this..  ;)
  • Modding version: PSX
  • Discord username: RetroTypes