Users browsing this thread: 1 Guest(s)
More Frequent Desperation Attacks

#1
Posts: 665
Threads: 19
Thanks Received: 51
Thanks Given: 91
Joined: Jan 2016
Reputation: 6
Status
None
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/8qsfmqhxv...s.zip/file
  Find
Quote  
[-] The following 5 users say Thank You to DrakeyC for this post:
  • hacktix (05-15-2021), madsiur (01-31-2018), PowerPanda (01-31-2018), Robo Jesus (01-31-2018), Warrax (01-31-2018)

#2
Posts: 548
Threads: 49
Thanks Received: 255
Thanks Given: 142
Joined: Feb 2017
Reputation: 23
Status
None
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!


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  

#3
Posts: 665
Threads: 19
Thanks Received: 51
Thanks Given: 91
Joined: Jan 2016
Reputation: 6
Status
None
Now you can have this as a patch.
  Find
Quote  
[-] The following 1 user says Thank You to DrakeyC for this post:
  • SSJ Rick (05-19-2020)

#4
Posts: 2
Threads: 0
Thanks Received: 0
Thanks Given: 2
Joined: May 2021
Reputation: 0
Status
None
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?
  Find
Quote  

#5
Posts: 54
Threads: 7
Thanks Received: 4
Thanks Given: 27
Joined: Jun 2021
Reputation: 0
Status
None
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?
  Find
Quote  

#6
Posts: 548
Threads: 49
Thanks Received: 255
Thanks Given: 142
Joined: Feb 2017
Reputation: 23
Status
None
(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.


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite