Users browsing this thread: 1 Guest(s)
Possible solution to the sap death bug

#22
Posts: 383
Threads: 34
Thanks Received: 10
Thanks Given: 13
Joined: Dec 2018
Reputation: 18
Status
Moog
(01-23-2021, 05:46 PM)assassin Wrote: ah, re: Imzogelmo code, i'm assuming because your long jump to C0 takes 4 bytes?  one workaround would be to JSR to a 5-byte helper function in C2 that does the long call.
Yeah, that's what I did.  I inserted an "Extra1" label with its freespace in C2, which was a subroutine that consisted of "JSL Extra, RTS".  I then made sure to replace the RTSs in the original Extra with RTLs as necessary.  In one of them (the one I think you want me to try removing; I'll have to double-check) I also had to add a separate "DoneDone" label and turn one segment into a subroutine, because it was optimized in a way that was not conducive to moving into another bank.

(01-23-2021, 05:46 PM)assassin Wrote: i'm baffled as to why the Item/Magic counter patch's removal would affect things, as they edit different functions, and i don't read the variables that he nulls.  but there could be some complex or delayed interaction sailing over my head.  to the extent that absence of Leet Sketcher's patch lets more counters run, that could throw off the counterattack sequencing, and thus what gets loaded into a given batch, etc.
When I was first play-testing my hack I found a lot of monster scripts were not executing the way they should (and do) as compared against Vanilla.  As such, I had to do a lot of counter shuffling and code adjustment to get them to do what I needed.  I suspect my changes to the monster scripts were a necessity for the presence of Leetsketcher's patch, and without it they aren't playing out in the right way.

You're probably on the money about it allowing more counters to run.

(01-23-2021, 05:46 PM)assassin Wrote: truthfully, i don't even follow how a non-fatal Seizure would ever trigger that FC 06 in vanilla, ignoring my and Bropedio's patches entirely.  it should be disqualified on THREE counts:
1) not a conventional turn/attack
2) originating from self
3) the monster is not dead, so no $3A56 to override #1 and #2.

has your Vargas died at all in the test battles and gotten revived somehow?  that could cause a lingering $3A56 flag, in the absence of Terii Senshi's Psycho Cyan bugfix.
I do have the Psycho Cyan bugfix applied; perhaps the interaction is there. Vargas has not died and revived in any of the tests, though; with your patch applied he always correctly activates his on-death script and ends the battle, even from seize damage (and even if he skips triggering the second phase of the fight).

(01-23-2021, 05:46 PM)assassin Wrote: really, what i suspect is happening is that your special status monster is triggering the FC 06.  is its spell being cast from its conventional script as opposed to counterattack?  without that monster there, i have a hunch that Vargas will never run his FC 06 counter, unless/until the party outright attacks him conventionally (i.e. not via Seizure or counters).

in your EDIT text, are you saying that this one strike will allow *multiple* subsequent Seizure ticks to trigger the script, or just the first one after the strike?  if the former, that's reminding me of behavior with FC 05 (or 01/02/03, but to a lesser extent, as Variable $327C [used solely by FC 05] is handled differently than the others) on vanilla.  that is, failure to clear variables used by the script commands lets things get "stuck" as long as certain, non-qualifying turns/attacks (e.g. a Seizure tick, or monster's own spell being reflected) are what inflict the damage.  however, FC 06 uses no such variable, so i dunno why it'd be affected in this way.
The invisible monster casts a spell that does nothing (no damage, no statuses) but cannot be dodged.  This is so that an animation will play on screen to inform the player of certain statuses the monster may possess, such as haste or slow.  When the spell to indicate 'slow' was cast by the invisible monster against Vargas, the next seizure tick triggered his HP reaction, blowing away the party and bringing in Sabin.  Vargas then behaved as if his HP was sufficiently low for the remainder of the battle, until the seizure damage triggered his death script and he ran away.  During that time there were several more casts of the 'indicate slow' spell by the invisible monster, though not for every seizure tick.

The invisible monster's script is nothing BUT FC commands: it checks its own monster variable which counts up each turn (until it hits 8 and resets), and then attempts FC 08 counters against all monster targets.  I can share that script too if it will help.

Based on what you said, though, it seems like the spell is being counted as a 'hit' even though it did no damage, allowing the counter script to react as if it is a fresh counterattack. ...If only there was a way to guarantee that would happen, even without an animation. Perhaps a secondary spell that literally does nothing, cast against all monsters before any actual status check occurs. I'll try that after I try it without the middle file and I'll let you know what happens.

EDIT: I tried it without the $C24BFD part (the .asm file you asked me to exclude) and it seems to work the same way.
You were correct that the status monster was triggering the HP trigger; when it makes a spell cast, the FC 06 script THEN makes a check against the monster's HP, which allows that to trigger exclusively as a result of Seizure damage [it basically refreshes the counterattack].
  Find
Quote  
[-] The following 1 user says Thank You to C-Dude for this post:
  • assassin (01-23-2021)



Messages In This Thread
RE: Possible solution to the sap death bug - by C-Dude - 01-23-2021, 06:25 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite