FF6 Hacking
More Frequent Desperation Attacks - Printable Version

+- FF6 Hacking (https://www.ff6hacking.com/forums)
+-- Forum: Hacks, Resources and Tutorials (https://www.ff6hacking.com/forums/forum-1.html)
+--- Forum: Jidoor Auction House (https://www.ff6hacking.com/forums/forum-4.html)
+---- Forum: Patches, Bugfixes, Tweaks (https://www.ff6hacking.com/forums/forum-15.html)
+---- Thread: More Frequent Desperation Attacks (/thread-3600.html)



More Frequent Desperation Attacks - DrakeyC - 01-31-2018

I didn't see a thread dedicated to this, so since I taught myself I thought I'd share how to make it happen.

Code:
C2/15C8: C0 08        CPY #$08
C2/15CA: B0 44        BCS $1610   (No DA if monster)
C2/15CC: AD 3F 3A     LDA $3A3F
C2/15CF: C9 03        CMP #$03    
C2/15D1: 90 3D        BCC $1610   (No DA if time counter is 767 or less)
C2/15D3: B9 E5 3E     LDA $3EE5,Y
C2/15D6: 89 02        BIT #$02
C2/15D8: F0 36        BEQ $1610   (No DA If not Near Fatal)
C2/15DA: 89 24        BIT #$24
C2/15DC: D0 32        BNE $1610   (No DA If Muddled or Image)
C2/15DE: B9 E4 3E     LDA $3EE4,Y
C2/15E1: 89 12        BIT #$12    
C2/15E3: D0 2B        BNE $1610   (No DA If Clear or Zombie)
C2/15E5: A5 B9        LDA $B9
C2/15E7: F0 27        BEQ $1610   (No DA if $B9 = 0)
C2/15E9: 20 5A 4B     JSR $4B5A   (Random number 0 to 255)
C2/15EC: 29 0F        AND #$0F    (0 to 15)
C2/15EE: D0 20        BNE $1610   (1 in 16 chance for DA)
C2/15F0: B9 18 30     LDA $3018,Y
C2/15F3: 0C 2F 3F     TSB $3F2F
C2/15F6: D0 18        BNE $1610   (No DA if this character already used it this combat)

NOPing out C2/15D1 with EA will remove the timer check so DAs can happen any time. Doing it to C2/15D8 will let DAs happen regardless of Near Fatal. NOPing out the other checks for Muddle/Image and Clear/Zombie did NOT work for me, but then I wouldn't want to remove those checks anyway.

But I'll wager the main interest most have is C2/15EC, which is what creates that 1/16 chance of a DA triggering. Changing the 0F to a lower value will lower the RNG's range and thus increase the likelihood of DAs. I've tested with 01 (1/2), 02 (1/3), 03 (1/4) and 07 (1/8) and all seem to work appropriately. It's hard to judge since it's random, duh, but with 01 and 02, almost every attack became a DA, whereas with 03 it was more uncommon and 07, it took several rounds but they did trigger.

Related to this since it is also of interest to DAs- the Near Fatal coding.

Code:
C2/4536: B9 1C 3C     LDA $3C1C,Y  (Max HP)
C2/4539: 4A           LSR
C2/453A: 4A           LSR
C2/453B: 4A           LSR          (Divide by 8)
C2/453C: D9 F4 3B     CMP $3BF4,Y  (Current HP)

Those 4As are the divisions, EA out one to make Near Fatal kick in at 1/4 HP, or two to make it happen at 1/2. This will also affect the True Knight coding, if you care about that, but iirc only DAs and True Knight care about Near Fatal.

EDIT - Now in patch form! The downloadable Zip contains two patches - "More Frequent DAs" just increases the odds of them happening from 1/16 to 1/8. "Less Restrictive DAs" does that, removes the timer check, changes Near Fatal to kick in at 1/4 HP rather than 1/8, and also removes the check if a character has already used a DA, letting the same character use their DA multiple times each battle.

https://www.mediafire.com/file/8qsfmqhxvt67fpz/More_Frequent_DAs.zip/file


RE: More Frequent Desperation Attacks - PowerPanda - 01-31-2018

In my own hack, I NOPed out C2/4539 and C2/453A to make everything trigger at 1/2 HP. Gameplay-wise, it has been quite satisfying. I had no idea that there was also a timer though. Great post!


RE: More Frequent Desperation Attacks - DrakeyC - 05-17-2020

Now you can have this as a patch.


RE: More Frequent Desperation Attacks - hacktix - 05-15-2021

this seems to only work with 1.1 for me. any chance of patches for 1.0 so i can use it with dancing mad and woolsey or rose?


RE: More Frequent Desperation Attacks - Joshua H. - 06-04-2021

I would second that. I’d love to include this patch in a blend but most other FF3 patches are dependent on v1.0 of the base rom. Good stuff...I’m also curious about increasing the range of near fatal from 1/8 of max HP to 1/3 of max HP. Does the value only increase/decrease via. multiples of two?


RE: More Frequent Desperation Attacks - PowerPanda - 06-04-2021

(06-04-2021, 12:53 AM)JHelmeke Wrote: I would second that.  I’d love to include this patch in a blend but most other FF3 patches are dependent on v1.0 of the base rom.  Good stuff...I’m also curious about increasing the range of near fatal from 1/8 of max HP to 1/3 of max HP.  Does the value only increase/decrease via. multiples of two?

Correct. You can only divide by 2 using the shorthand code that is used here. The code listed in the original post is 1.0 code. If you enter it via a hex editor, rather than using an IPS patch, it will work. If you want near fatal status to be set at 1/4 HP, like in Divergent Paths, edit C2/453B from 4A to EA. (The code "EA" is called a NOP, short for No Operation.) In your rom, this is rom address 2453B on an unheadered rom, or 2473B on a headered rom.