• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
May 31, 2020, 01:55:20 am

News:

Please use .png instead of .bmp when uploading unfinished sprites to the forum!


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: April 09, 2020, 07:20:04 pm by RetroTypes
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>

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.

----------------------------
      <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, 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.

----------------------------
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

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.
  • Modding version: PSX

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

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