Users browsing this thread: 1 Guest(s)
Active nATB

#1
Posts: 383
Threads: 34
Thanks Received: 10
Thanks Given: 13
Joined: Dec 2018
Reputation: 18
Status
Moog
What is nATB?  It is a modification to the FF6 Active Time Battle mechanic that forces the ATB meters to pause while an animation is playing.  nATB makes differences in the speed stat more significant and can increase the game's difficulty by giving monsters more opportunity to attack.

RotDS was packaged with an optional basic nATB patch by Think0028.  While this patch is nice and effective, it has an unfortunate flaw: it clobbers Active mode in battle and forces the game into permanent Wait mode.

RoSoDude on the FF6hacking Discord asked if the feature could be decoupled from the config setting, and working together he and I came up with this adjustment to Think0028's code.
[Assembly for xKas 0.6]
Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Think0028's simple nATB for FF6 SNES
; (for assembly with xKas 0.6)
; Code to pause the ATB meter while an animation is playing
;
;
; (Now compatible with Active mode)
; Uses ram address $ECF1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; The original simple nATB patch was coded by Think0028 to pause the filling of the ATB meter during animations
; That version was not compatible with the Active battle mode, however, and would force the game into Wait mode
; Through use of a free RAM value and a little freespace, the patch has been made compatible with Active battle mode.


hirom   ; don't change this
;header  ; comment out if your rom has no header

!freespace = $C4B4D9        ; Needs 42 (0x2A) bytes of freespace
!freeram = $ECF1            ; $ECF1 to $ECFB seem to be safe to use, as far as I have seen

org $C21121
    JSL ATB_Logic
    NOP #2

org $C2247A
    JSL waitCheck:
    NOP #3

org $C1953B
    JSL animationStart
    BEQ $12
    JSR $9569                ; Execute Battle Script
    JSL animationStop

org !freespace
ATB_Logic:
    LDA $2F41                ; Is a menu open?
    AND !freeram            ; AND is the battle mode set to wait?
    ORA $3A8F                ; Or is an animation playing?
    RTL                        ; Do not advance ATB if so
    
waitCheck:
    STZ $3A8F            ; Mark that an animation is no longer playing
    STZ !freeram        ; The freeram I used, $ECF1, does not get initialized and must be zeroed first.
    BIT #$08
    BEQ $03
    INC !freeram        ; If the Wait mode config is set, $ECF1 becomes one.
    RTL

animationStart:
    LDA ($76)
    CMP #$FF
    BEQ $03
    INC $3A8F            ; Mark that an animation is playing
    RTL
    
animationStop:
    DEC $3A8F            ; Animation is no longer playing
    REP #$20
    LDA $76
    RTL
By using an additional RAM value and some freespace, the code can now distinguish between waits initiated by Wait mode and waits initiated by an animation.  As such, while on Active mode the ATB will still pause during animations but not while a menu is open, as would be expected for that config setting.

Unlike the simple nATB patch packaged with RotDS, though, it is no longer in-line, so picking an appropriate freespace and an appropriate RAM value is on you as the modder.  Still, for those looking to make the Speed stat's impact more significant, this should prove very helpful without creating the need to modify the Config menu.
  Find
Quote  
[-] The following 2 users say Thank You to C-Dude for this post:
  • Gi Nattak (02-21-2024), RoSoDude (03-27-2024)



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite