Author Topic: New patch: Bird Bars Glitch fix  (Read 235 times)

13375K31C43R

  • Magus Sisters
  • *
  • Posts: 604
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
New patch: Bird Bars Glitch fix
« on: April 10, 2017, 11:30:01 PM »
Hey! Here's one for all of you: this patch fixes both of the "Setzer Hates Birds" bugs as found in Master ZED's Bug FAQ. One of those bugs makes Setzer take an extra step forward when Summoning Phoenix via the three-BAR Slot combo (and, tangentially, makes living party members not put up their shields). The other bug makes Setzer land in the wrong place after Summoning Palidor from Slot, so he ends up too far back. The way I fixed this is by replacing the random Summon with a Magicite usage, which does the same thing with correct animations. I also created a new flag to ensure the Esper Summon still gets displayed properly at the top of the screen instead of the word "Magicite". And don't worry, just because Setzer's using Magicite doesn't mean your stock is getting depleted! :wink:

With this fix, the glitch is actually still feasible, but only if you hack the Slot commands to explicitly Summon either Palidor or Phoenix. The "correct" fix would probably have been to actually fix the Slot animation code, but I went the Magicite route because it was easier. If I wanted to fix the animation code, I'd have to spend weeks debugging and analyzing what's going on. That said, I might change the fix in a future update, but that would be for another time.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,677
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: New patch: Bird Bars Glitch fix
« Reply #1 on: April 10, 2017, 11:43:47 PM »
Yeah, the animation disaster is going to take a serious rewrite just to fix most errors. Imp...not an Imp? comes to mind on several levels. Great work, even if it's not a complete fix.  :childish:

119 bugs fixed and counting.

assassin

  • Bane of Retards
  • *
  • Posts: 1,007
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: New patch: Bird Bars Glitch fix
« Reply #2 on: August 08, 2017, 08:17:25 PM »
my first reaction to swapping in Item was to hold my nose when reading this months back.  you already acknowledged how that's fudgy, so i won't harass you on it.

i was holding comments until testing.  my main concerns were getting different results on monster command counters.  Palidor mostly dodges this, with the actual attack done via a separate Jump command.  it took testing vanilla to refresh me on this; i guess that examining Slot ==> Item ==> second item strike for summon ==> extra turn was enough to make my brain overheat.  now, other summons (when Muddled if they target the party, so that includes the initial part of Palidor) could cause an issue in theory, but turns out no enemies counter Slot or general Item commands.  and Muddle+Palidor is a giant can of bugs and worms anyway -- straight out of a bait shop from Hell -- so worrying about "proper" counter behavior there is overshadowed some.

still, a disclaimer about command counters might be worthwhile.

or it'd be nice if there was a way to add a little code to only Item-ize the two summons that actually have the graphical bugs, but that'd involve a semi-persistent free RAM variable, at the least.

now for actually looking at the code.

Code: [Select]
C2E715: ASL A
C2E716: TRB $11A9  ; remove Magicite's special effect

why not "STZ $11A9"?  it's not like that variable is a bitfield with multiple special effects at once.  sure, it's just one extra byte, but also weird to follow.

Code: [Select]
C2E727: CMP #$01  ; Item?
C2E729: BNE exit  ; if not, exit

can change to "DEC / BNE" for another 1-byte gain, but without coherency improvement of above idea.

a more involved change i have in mind is: rely on the Magicite Item's second "strike" to do what's needed in C2/3666.  the first "strike" would have you skip the function call (or exit after restoring Bit 0 of $B2) when your Slot+Magicite is detected.  no urgency to it; just smaller code, and less alteration from vanilla.  more than anything, i'm curious whether it'd work.

assassin

  • Bane of Retards
  • *
  • Posts: 1,007
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: New patch: Bird Bars Glitch fix
« Reply #3 on: August 15, 2017, 09:49:07 PM »
i got bored and implemented the last paragraph:
http://assassin17.brinkster.net/forum-posts/bird-bars-my-alt.asm

it reduces freed-up space needed from 31 to 13 bytes, so maybe you could use that in some other patch.  unless it puts you in a tricky position of having to list Bird Bars as a prerequisite for that.

haven't tested, other than to see that Shiva's Gem Dust Summon seems to work alright.

it's possible that redirecting C2/3666 as opposed to editing it is undesirable, but i couldn't find a way to do the latter without wasting space with annoying stuff (e.g. by making the called extra code set or clear Carry so the caller knows where in C2/3666 to branch).
« Last Edit: August 15, 2017, 10:09:41 PM by assassin »

13375K31C43R

  • Magus Sisters
  • *
  • Posts: 604
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: New patch: Bird Bars Glitch fix
« Reply #4 on: August 18, 2017, 11:12:29 PM »
I see what you're going for. I thought of that too, but I believe what ends up happening is that the character does not step forward after the spell name is displayed. This contrasts the usual behaviour of Slot, which I wanted to preserve.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

assassin

  • Bane of Retards
  • *
  • Posts: 1,007
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: New patch: Bird Bars Glitch fix
« Reply #5 on: August 19, 2017, 03:58:58 PM »
*checks* yep, they'll step forward beforehand.  a subtle difference from normal, but probably not worth it to save some space.