Users browsing this thread: 1 Guest(s)
Reverse actors HP MP progression

#11
Posts: 175
Threads: 11
Thanks Received: 10
Thanks Given: 8
Joined: May 2013
Reputation: 13
Status
Well-Fed
Wait, wait, I'm one of the professionals? When did that happen?

Decreasing HP/MP at level up should actually be a fairly simple change -- you're looking at this section of code:

Code:
C2/60F6: C2 21        REP #$21       (set 16-bit A, clear carry)C2/60F8: BD 0B 16     LDA $160B,X    (maximum HP)
C2/60FB: 48           PHA
C2/60FC: 29 00 C0     AND #$C000     (isolate top bits, which indicate (bit 7, then bit 6):
                                      00 = no equipment % bonus, 11 = 12.5% bonus,
                                      01 = 25% bonus, 10 = 50% bonus)
C2/60FF: 85 EE        STA $EE        (save equipment bonus bits)
C2/6101: 68           PLA            (get max HP again)
C2/6102: 29 FF 3F     AND #$3FFF     (isolate bottom 14 bits.. just the max HP w/o bonus)
C2/6105: 65 FC        ADC $FC        (add to HP gain for level)
C2/6107: C9 10 27     CMP #$2710  
C2/610A: 90 03        BCC $610F      (branch if less than 10000)
C2/610C: A9 0F 27     LDA #$270F     (replace with 9999)
C2/610F: 05 EE        ORA $EE        (combine with bonus bits)
C2/6111: 9D 0B 16     STA $160B,X    (save updated max HP) C2/6114: 18           CLC            (clear carry)

Assuming a minimum HP of, say, 10, you can change it this way:

Code:
C2/6105: SBC $FC        ; subtract HP 'gain' at level
C2/6107: CMP #$000A
C2/610A: BCS $610F             ; branch if more than 10
C2/610C: LDA #$000A           ; otherwise, set new HP to 10

This is untested and it's been a while since I've dealt with this section of the code at all, but assuming I'm not making an egregious mistake somewhere, this'll work. It also accounts for esper bonuses boosting the decrement, taking more HP at level, as that's calculated elsewhere. You could also code for the opposite (esper bonus lessens the decrease), but it would involve some changes to the code at C2/6170.

The same principle applies to MP, which is the next section of C2, starting at C2/6115. (The relevant ADC is at C2/6122.)


Current Project: FF6: Tensei | Discord ID: TristanGrayse
  Find
Quote  
[-] The following 1 user says Thank You to GrayShadows for this post:
  • Tenkarider (06-13-2014)



Messages In This Thread
Reverse actors HP MP progression - by Tenkarider - 06-12-2014, 07:43 AM
RE: Reverse actors HP MP progression - by Cyprus - 06-12-2014, 07:54 AM
RE: Reverse actors HP MP progression - by Cyprus - 06-12-2014, 09:16 AM
RE: Reverse actors HP MP progression - by Cyprus - 06-12-2014, 03:28 PM
RE: Reverse actors HP MP progression - by GrayShadows - 06-12-2014, 11:39 PM
RE: Reverse actors HP MP progression - by B-Run - 06-13-2014, 07:20 AM
RE: Reverse actors HP MP progression - by Cyprus - 06-13-2014, 10:41 AM
RE: Reverse actors HP MP progression - by Cyprus - 06-13-2014, 04:43 PM
RE: Reverse actors HP MP progression - by madsiur - 06-14-2014, 06:42 PM
RE: Reverse actors HP MP progression - by madsiur - 06-14-2014, 07:47 PM
RE: Reverse actors HP MP progression - by B-Run - 06-16-2014, 07:19 AM
RE: Reverse actors HP MP progression - by B-Run - 06-17-2014, 03:16 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite