øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=2113.msg24374e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index1c35.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;area=showposts;u=20e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index1c35.html.zxÿhh^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ0Pd°OKtext/htmlISO-8859-1gzip@øÕ°ÿÿÿÿÿÿÿÿWed, 11 Mar 2020 04:45:11 GMT0ó°° ®0®P®€§²ð®þhh^ÿÿÿÿÿÿÿÿe'° Graphics bug fixes - help!

Author Topic: Graphics bug fixes - help!  (Read 3186 times)

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Graphics bug fixes - help!
« on: September 03, 2015, 11:40:13 PM »
There are two bugs in the game that I've been trying to fix for a while now, but I just can't dissect the code. I'm hoping someone will help me; I do feel as though anyone else who could have figured out what I'm trying to find would have posted a patch a long time ago, but here goes.

The first bug I'm trying to fix involves casting spells onto an enemy with Reflect status. If certain spells are bounced onto your character in this manner, they will sometimes get turned around before it happens. Using Mnrogar's document on spell animation data, I've managed to narrow this down to the spells with graphic 2 index #$003B or #$003C: the ones that apply are Haste, Regen, Antdot, Slow, Doom and Bserk. What's special about these spells is that their animations tamper with the sprites they are hitting. After testing, I found out that the specific direction your party member will face is the same direction as the enemy off whom the spell bounced. The problem seems to be that even though the sprite to be affected is updated as a result of Reflect, the direction the sprite faces somehow isn't. I've located the code that deals with spell graphics at C1/9CB3, but I've spent days trying to figure out what needs to be changed to fix this problem and have found nothing. I know this was fixed in the GBA release, so maybe someone who understands the GBA code can help.

The second bug is the infamous "look the other way" glitch that happens when you're hit by spells like Blow Fish, Tek Laser and Fire Ball. Those spells are special because they use your party members' "ouch" sprites during the animation; however, the sprite used is always the left-facing one, even if they should be facing right. The fix probably isn't quite as straightforward as the fix for the other bug, but I believe the faulty code is either located in the same area or called from the same place.

I feel a bit lame for not being able to fix these myself, considering what I've done recently, but honestly the C1 bank really isn't laid out very well; I just can't understand what's going on there. :isuck: In fact, I wouldn't have even been able to solve the Backwards Jump Glitch if it wasn't for Assassin's "Lead-Footed Esper" patch. So if anyone knows anything and can suggest something, please help! I've got a lot of other stuff on my plate and can't afford to waste too much time trying to reverse hack in order to figure out what everything does.
« Last Edit: September 04, 2015, 06:15:37 PM by 13375K31C43R »
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Graphics bug fixes - help!
« Reply #1 on: September 06, 2015, 01:52:03 PM »
I've solved the first problem, now I need to solve the second problem. It turns out I was mistaken when I said Tek Laser is subject to this problem, but Blow Fish and Fire Ball definitely are. But also, looking closer at the party member's sprite when it is hit by Blow Fish, I've noticed times when the character is facing left even when they're not getting hit by needles and times when the character is facing right while getting hit. So for some reason it seems like the game is trying to make the character face left at certain times but the timing is somehow off. I contend that the game shouldn't be making the character face left unless they're supposed to be facing left.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Graphics bug fixes - help!
« Reply #2 on: October 08, 2015, 01:18:18 PM »
And now I've fixed both bugs. However, now I'd like some help trying to fix some other graphical bugs that concern the Magitek status. The first is that when Doom is cast on a Magitek-riding party member, only their top half is shown being carried away. The second is that if an invisible party member is riding Magitek armor, their legs will be visible outside the armor. I won't be able to work on these for a while and would really appreciate some assistance.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

koala_knight

  • Tunnel Armor
  • *
  • Posts: 166
  • Gender: Male
    • View Profile
Re: Graphics bug fixes - help!
« Reply #3 on: October 08, 2015, 01:35:34 PM »
I can't help much but my thoughts are that the Doom issue is probably part of the actual spell animation and you might want to have a look at that.
As for the invisibility thing it might have to do with how it applies it's graphical effect or something to do with layer priority.

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Graphics bug fixes - help!
« Reply #4 on: October 10, 2015, 02:54:02 PM »
Unfortunately, I don't currently understand how the animations work in terms of the actual data. I'm thinking there has to be a code-side way to fix the problem. I remember when I was working on "Reflections", there was a specific place in the code I kept coming back to because it has a specific check for certain types of animations, namely the ones that ended up turning your character around. So there's probably something in the code that says "don't draw the legs" that I can leverage to fix these issues.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Graphics bug fixes - help!
« Reply #5 on: November 09, 2015, 10:33:16 AM »
One thing I recently discovered is that when a party member Vanishes while wearing Magitek armor, the armor remains visible. I believe this to be a problem because the whole point of Vanish is to make you invisible, thus making it impossible for the enemy to hit you with physical attacks because they don't know where you are, but if Magitek armor doesn't disappear with its wearer, then the enemy would realistically be able to find you in the Magitek armor with no apparent pilot.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

TheNattak

  • Garula
  • *
  • Posts: 203
  • Gender: Male
  • Mike
    • View Profile
    • Return of the Dark Sorcerer
Re: Graphics bug fixes - help!
« Reply #6 on: November 09, 2015, 03:03:49 PM »
Hmm, in my opinion that seems like quite a stretch in terms of bugs/problems. To me it makes since how it is, I mean you're casting Vanish on the character, not the Magitek Armor and since they are two separate entities... Sure, it might not make the most since for the monster to miss as much if they know they are in the cockpit, but monsters aren't supposed to be that smart I would guess lol. And, Vanish to me implies that they do just that, Vanish... so If they vanished, they couldn't be hit regardless of where they are known to be located, know what I'm sayin'?

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Graphics bug fixes - help!
« Reply #7 on: November 09, 2015, 03:13:48 PM »
Well, sure, I suppose they could duck out of the way of an attack or something...but still, it seems a little negligent on the Empire's part to not make their Magitek armor disappear along with the pilot. And, don't forget that some monsters are human, so they would be that smart.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

koala_knight

  • Tunnel Armor
  • *
  • Posts: 166
  • Gender: Male
    • View Profile
Re: Graphics bug fixes - help!
« Reply #8 on: November 12, 2015, 01:12:50 PM »
I have to agree. If your clothes disappear, so should your ride as long as it isn't larger than the believable scope of the spell. I wouldn't call it a bug, though.

TheNattak

  • Garula
  • *
  • Posts: 203
  • Gender: Male
  • Mike
    • View Profile
    • Return of the Dark Sorcerer
Re: Graphics bug fixes - help!
« Reply #9 on: November 12, 2015, 02:18:49 PM »
I think it would be great as a separate Magitek spell, like 'Cloak' which would seem legit and make more since to me anyway than a vanish spell also making a mechanical entity become vanished as well as yourself, but doing that would of course need a spell replaced since it would be different than Vanish, which wouldn't be very practical, especially since there are just 2 cases normally that I can think of where a character could have Clear status while riding Magitek Armor. That and it would require a similar yet modified code to Vanish, which again isn't practical. To sum this up I think it would be a cool patch, but I agree that it's not a bug at least.
« Last Edit: November 12, 2015, 02:25:07 PM by TheNattak »

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Graphics bug fixes - help!
« Reply #10 on: November 12, 2015, 04:17:11 PM »
No, it's not so much a bug as it is a...logical inconsistency. Like the "Invisible Zombie".

One thing that bugs me, though, is that Vanish seems to be the only status that causes a party member's legs to be drawn outside the armor. Every other status accommodates. Also, after being drawn outside of Magitek armor, the legs never move to match what the upper body is doing. That tells me that perhaps the programmers did in fact intend for the armor to disappear, they just didn't do it correctly.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Graphics bug fixes - help!
« Reply #11 on: November 14, 2015, 09:12:09 AM »
Also, since the legs only change during the Vanish on/off animation, that tells me that if I can find the code for that animation, maybe I can figure out how to make it affect only the upper body and that will also help me with the Doom animation.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Graphics bug fixes - help!
« Reply #12 on: November 16, 2015, 04:55:06 PM »
OK, after a bit of fiddling around, I've managed to determine that the functions that control the Vanish animation are C1/3050, C1/3106 and C1/3157. So far I haven't managed to make any of those methods affect the sprites exactly the way I want, but it's a start.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Graphics bug fixes - help!
« Reply #13 on: December 11, 2015, 12:36:11 PM »
OK! I managed to fix the Vanish issue, and I'll post a patch for it shortly. Now all that's left is the Doom issue. The problem seems to be in the copying of the sprite that's on the screen to a lighter tinted sprite that gets lifted by the reaper, which is probably why the legs aren't there. For the Vanish issue, I found that the vanish animation takes sprite data that was loaded into RAM from the sprite data bank in the ROM - there's a function at C1/3D43 that does this. So if I can retrieve that for the Doom animation, I can add the legs.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Graphics bug fixes - help!
« Reply #14 on: December 13, 2015, 09:29:01 PM »
Here's another glitch I'd like to fix: if Haste or Slow is cast on Tyrannosaur in the Coliseum, he'll be shifted backward slightly for the duration of the spell's animation.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings