Users browsing this thread: 3 Guest(s)
Reverse actors HP MP progression
06-12-2014, 11:39 PM
(This post was last modified: 06-12-2014, 11:39 PM by GrayShadows.)
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:
Assuming a minimum HP of, say, 10, you can change it this way:
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.)
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.)
« Next Oldest | Next Newest »
Users browsing this thread: 3 Guest(s)