øAslickproductions.org/forum/index.php?PHPSESSID=so1iojs5ocdn0o2vf0tti7fbu6&topic=2046.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index80be.htmlslickproductions.org/forum/index.php?PHPSESSID=so1iojs5ocdn0o2vf0tti7fbu6&board=8.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index80be.html.zxÄôg^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿȰU04OKtext/htmlISO-8859-1gzip8:Ö04ÿÿÿÿÿÿÿÿTue, 10 Mar 2020 20:29:15 GMT0ó°° ®0®P®€§²ð®Ãôg^ÿÿÿÿÿÿÿÿ+-04 New patch: Zombie/Rippler Bug fix

Poll

Which fix did you apply?

Fix A: Heals HP taken from other entity.
1 (16.7%)
Fix B: Heals 1/8 of max HP.
1 (16.7%)
Fix C: Heals 1 HP.
4 (66.7%)

Total Members Voted: 6

Author Topic: New patch: Zombie/Rippler Bug fix  (Read 3633 times)

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
New patch: Zombie/Rippler Bug fix
« on: May 10, 2015, 11:02:44 PM »
Hi! So, even though I downloaded Terii Senshi's Rippler fix patch, assassin pointed out a bug concerning the Zombie status that wasn't fixed by the patch like I thought. Terii Senshi's patch prevents Rippler from exchanging statuses such as Morph and Dog Block, but I assumed it also prevented the Zombie status from being exchanged. It turns out that Zombie being exchanged is intended; the problem is that Rippler does nothing to handle the former Zombie, now alive, but still having 0 HP.

The included patches remedy this by adding a call to a new healing function that only heals an entity if the entity is either the caster or the target of Rippler AND the entity has 0 HP AND the other entity involved in Rippler does not have 0 HP. There are two different healing algorithms used, with a separate patch for each; the first algorithm transfers all HP from the former non-Zombie to the former Zombie, and the second restores 1/8 of the former Zombie's HP. The included reverse patch is applicable to either fix patch.

Personally, I'm not sure if either algorithm is the "correct" algorithm to apply for correcting the 0 HP problem in this case. On the one hand, algorithm A seems more realistic because, viewing the Zombie status as a state of "lifelessness", it makes sense that the same exchange of "lifelessness" would also exchange "life" by extension. On the other hand, algorithm B is more rational because it's the same algorithm as the Revivify item, the only other method of curing Zombie status.

Both patches also apply the same improved Rippler algorithm seen in Terii Senshi's patch (with appropriate modifications to accommodate the healing algorithm). In other words, I only recommend downloading Terii Senshi's patch if you're one of the rare few who care about Rippler mishandling Morph and Dog Block but not Zombie. All patches use free space bytes C2/65BE-C2/65CE, but patch B also uses bytes C2/65CF-C2/65D5.

UPDATE: I've now attached a third fix algorithm, which sets the former Zombie's HP to 1. It can be reversed using the same reverse patch.

UPDATE 2 (August 2, 2015): I've just found and fixed a potential logical issue with fix B, whereby if someone with the wrong number of max HP gets healed, it might possibly screw up the Rippler function. I don't know if it's really a problem, but this fixed version now ensures that it isn't. It also cuts down on the free space used.

UPDATE 3: I've now included a patch for a Japanese ROM.

UPDATE 4: Found a bug! The status exchange algorithm only worked halfway in the previous versions! This is now fixed. Also, I've done some shrinking of the B and C patches. Now in order to apply your desired fix algorithm, you'll have to apply the A patch and then the appropriate patch. Finally, added patches for GBA!
« Last Edit: March 03, 2018, 12:24:35 AM 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

assassin

  • Bane of Retards
  • *
  • Posts: 1,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: New patch: Zombie/Rippler Bug fix
« Reply #1 on: May 11, 2015, 12:48:23 AM »
Quote
C4/736B:   03 -> 02   (Not sure what this byte means, but the same change exists in Terii Senshi's patch.)

that's spell data, done to fix "Rippler missed... but it worked?" , as seen in Master ZED's Glitches & Bugs guide.

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: New patch: Zombie/Rippler Bug fix
« Reply #2 on: May 11, 2015, 01:01:49 AM »
Quote
that's spell data, done to fix "Rippler missed... but it worked?" , as seen in Master ZED's Glitches & Bugs guide.

Yeah, I knew it had to have something to do with Rippler. I figured it was different than the event code I was editing. I could probably have looked it up easily, but I was just too lazy. The bottom line was just, if it's required to fix what Terii Senshi fixed, I'm keeping it.
"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,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: New patch: Zombie/Rippler Bug fix
« Reply #3 on: May 11, 2015, 04:39:14 AM »
algorithm A has a clever basis that i wouldn't have thought of.  a more involved variant might scale between entities by not transferring absolute HP, but percentage of total HP.  that would stop full-life, low max HP entities from necessarily being a lesser source than depleted-life, high max HP ones.  a departure from Drain, to be sure.  but possibly within the spirit of a spell that normally works on statuses, as opposed to numbers like HP or MP.

probably not worth the space/effort, but just putting it out there.

another approach altogether would be to do the absolute minimum to remove the buggy condition: heal a mere 1 HP.  this would show some deference to Revivify, leaving it as the top dog for healing Zombies.
« Last Edit: May 11, 2015, 04:53:07 AM by assassin »

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: New patch: Zombie/Rippler Bug fix
« Reply #4 on: May 11, 2015, 11:24:29 AM »
I had thought about healing 1 HP, but I decided not to because I figured there wouldn't be enough difference between 1 HP and 0 HP other than "legality". Also, I feel like it would look a little bit unnecessary to actually show the number 1 in the healing process, so I would have actually made the algorithm increment the HP value itself by 1 instead. I actually stopped when I realized I'd have to check for Near Fatal status, which I wasn't sure I could do without breaking the game; the easiest way would be to jump to the place in code that handles it, but in my ROM that's been moved from its usual spot, so I'd have to make an extra patch for that. Although maybe it would have been sufficient to just set Near Fatal status anyway, under the assumption that the entity's max HP is at least 8.

A proportional HP transfer is also a neat idea. For that I'd have to look into how the game handles multiplication and division. It's also plausible that this algorithm would use even more free space than algorithm B, so that's also something to be wary of. The free space used by algorithm B perfectly fits a gap between Imzogelmo's "MP Digits" patch and another patch at C2/65D8.
"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,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: New patch: Zombie/Rippler Bug fix
« Reply #5 on: May 11, 2015, 12:29:20 PM »
don't think you'd have to check for Near Fatal nor manually change it, since C2/450D is run later than the function you're editing, and it'll use the entity's new HP to update the status.  there are attacks that manually refill HP, such as Tapir, and iirc, Near Fatal gets removed fine.

speaking of which, are you tackling Zombie/Tapir next? :P  if so, a couple things:
- might as well incorporate my (very simple) Deceptive Tapir fix into it, since i suspect the two patches won't co-exist.
- hopefully, it's possible for you to work around my Some MP changes don't update menus fix.
- one of these years, a "Galileo" character will notify you people that I do not revolve around the Earth, but vice versa.  believe him.
« Last Edit: May 11, 2015, 12:34:58 PM by assassin »

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: New patch: Zombie/Rippler Bug fix
« Reply #6 on: May 11, 2015, 12:58:54 PM »
The reason I worry about Near Fatal status is that, when a character is alive with 0 HP, they don't enter Near Fatal status immediately. Eventually, yes they do, but as far as I recall, not until someone else makes some other move. So, for instance, if the former Zombie is next to make a move, a Fight move, and they are no longer a Zombie but are not in Near Fatal status, it removes any chance they have of performing a DA. But I'll test to make sure.

I actually wasn't planning on Zombie/Tapir, I haven't tried fixing it in my own ROM yet. For that, I'd have to actually look into the Tapir function that gets called. For now, I want to address the bugs that I've already mentioned (this one notwithstanding), and then maybe later I'll try fixing Zombie/Tapir.

The next patch I plan to upload is Doom/Jump. And I am aware that it conflicts with Novalia Spirit's Petrified Rebel patch, which I am addressing.
"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,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: New patch: Zombie/Rippler Bug fix
« Reply #7 on: May 11, 2015, 01:09:13 PM »
ah, that does sound familiar.  but how is that limited to the manually refill HP to 1 method?  wouldn't Algorithms A and B also be susceptible?

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: New patch: Zombie/Rippler Bug fix
« Reply #8 on: May 11, 2015, 01:28:35 PM »
Like I say, I haven't actually tested adding 1 HP to see if Near Fatal status is set, so I don't know. The algorithms I've actually added don't have this problem because they set the healing variable, rather than the HP variable. When a character's HP is modified through healing or damage, the game updates the Near Fatal status; what I don't know is if the same is true for manually setting HP. I'm pretty sure that even "weakening" spells, such as Cyclonic and W Wind, update Near Fatal status because they damage entities to within an inch of their lives. Remember, I said I would want to implement the 1 HP solution without actually showing the number "1" for healing. I figure that, when Rippler is called, it would look a little strange to occasionally just see a "1" healing an entity, whereas with the other algorithms that heal more than 1 HP, it actually makes it look more like the entity is being healed for a reason.
"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: New patch: Zombie/Rippler Bug fix
« Reply #9 on: May 11, 2015, 01:41:04 PM »
Aha! You were right, it did update Near Fatal status! I'll upload a patch as soon as possible.
"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: New patch: Zombie/Rippler Bug fix
« Reply #10 on: May 11, 2015, 02:33:01 PM »
So, now I've uploaded Fix C, I'm looking at the Tapir function (or at least the only Tapir function I can find in bank C2), and it looks like all I need to do is change the Sleep check to a Sleep/Zombie check, if I'm not mistaken. The only other stipulation I see is the branch into that function from Pep Up and Elixir/Megalixir. What I don't understand is why they branch to only curing MP, as opposed to curing both HP and MP. If I could change them to branch to curing both HP and MP, I could easily fix Tapir without using any free space.

Also, is that the only Tapir function I need to worry about? I'm pretty sure there's another Tapir function, but its name is not actually seen. I think it's the function that automatically wakes up a sleeping character after a certain period of time. And in that case, I don't think I need to worry about it because, as I recall, its only purpose is to cure Sleep, not HP or MP or any other status.
"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,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: New patch: Zombie/Rippler Bug fix
« Reply #11 on: May 11, 2015, 02:47:20 PM »
So, now I've uploaded Fix C, I'm looking at the Tapir function (or at least the only Tapir function I can find in bank C2), and it looks like all I need to do is change the Sleep check to a Sleep/Zombie check, if I'm not mistaken.

won't that max out HP and MP?

Quote
The only other stipulation I see is the branch into that function from Pep Up and Elixir/Megalixir. What I don't understand is why they branch to only curing MP, as opposed to curing both HP and MP.

they fill HP using normal attack data (i.e. do 16/16 of HP healing), rather than using a special effect.  they need the effect for MP because normal attacks affect HP or MP, not both.

one distinction versus Tapir's results is you'll see (green) numerals for Pep Up and Elixir/Megalixir.  another is hurting the undead, for Elixir/Megalixir.

Quote
Also, is that the only Tapir function I need to worry about? I'm pretty sure there's another Tapir function, but its name is not actually seen. I think it's the function that automatically wakes up a sleeping character after a certain period of time. And in that case, I don't think I need to worry about it because, as I recall, its only purpose is to cure Sleep, not HP or MP or any other status.

yep, you're correct.

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: New patch: Zombie/Rippler Bug fix
« Reply #12 on: May 11, 2015, 02:57:13 PM »
Quote
won't that max out HP and MP?

True, I was thinking it'd be the easiest way to avoid 0 HP, but I guess curing MP is a little ridiculous.

Quote
they fill HP using normal attack data (i.e. do 16/16 of HP healing), rather than using a special effect.  they need the effect for MP because normal attacks affect HP or MP, not both.

one distinction versus Tapir's results is you'll see (green) numerals for Pep Up and Elixir/Megalixir.  another is hurting the undead, for Elixir/Megalixir.

Ah, gotcha.

Well, then it looks like I can't avoid using up more free space...but hey, I guess that's what it's for.  :sad:
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

Xenovant

  • Tunnel Armor
  • *
  • Posts: 154
  • (ಠ_ಠ)
    • View Profile
Re: New patch: Zombie/Rippler Bug fix
« Reply #13 on: June 12, 2015, 10:59:12 AM »
Thanks a lot for your patches, I have added most of them to my hack already :P

There are two problems left in rippler, though:

-Terii Senshi's algorithm ignores petrify (I have tested his patch, and yours, in a clean rom).

-When you exchange the zombie status with the enemy, the enemy dies (you'll see him disappear), but it will be still here, and will attack... but it's even worse: it may reappear again when another enemy dies. I think the best "fix" would be ignore the zombie status and leave it in the player, because this status, in the enemies, is a mess xD  EDIT: Or directly kill the enemy...
« Last Edit: June 12, 2015, 11:04:45 AM by Xenovant »

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: New patch: Zombie/Rippler Bug fix
« Reply #14 on: June 12, 2015, 11:12:42 AM »
Quote
-Terii Senshi's algorithm ignores petrify (I have tested his patch, and yours, in a clean rom).

According to both Terii Senshi and the Final Fantasy Wikia, Rippler is supposed to ignore Petrify anyway, so I won't concern myself with that.

Quote
-When you exchange the zombie status with the enemy, the enemy dies (you'll see him disappear), but it will be still here, and will attack... but it's even worse: it may reappear again when another enemy dies. I think the best "fix" would be ignore the zombie status and leave it in the player, because this status, in the enemies, is a mess xD  EDIT: Or directly kill the enemy...

That, on the other hand, is interesting. Zombie status is supposed to be swapped, so I won't make the algorithm ignore it, but I'll look into making sure the enemy stays dead. :)
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings