Users browsing this thread: 2 Guest(s)
Stamina in HP Growth Calculation
author: madsiur
version: 1.0
date: 2016/05/05
Apply to: FF3us 1.0
Download
Files
hpC2.asm: For implementation in bank $C2
hpEE.asm: For implementation in bank $EE or any other bank
Apply with xkas 0.06
Command example: xkas hpEE.asm romname.smc
Space used
hpC2.asm: 36 bytes in bank $C2
hpEE.asm: 46 bytes in bank $EE (or the bank of your choice)
Description
This tweak implement character stamina consideration in HP growth at level up.
As it stands by default it implement the following formula:
HP growth = Character stamina * level HP growth table value / 32
This mean for the following case scenarios, given stamina values of 32, 48, 64 and table values of 10 and 60, HP growth will be:
32 * 10 / 32 = 10 HP
48 * 10 / 32 = 15 HP
64 * 10 / 32 = 20 HP
32 * 60 / 32 = 60 HP
48 * 60 / 32 = 90 HP
64 * 60 / 32 = 120 HP
By adding a LSR in the ASM file (where the 5 LSR are toward the end), you can make the divisor 64 instead of 32. By removing one, you make it 16.
Note that this hack require HP growth table modifications / tweaking in FF3usME to achieve balance.
Bank $EE implementation
version: 1.0
date: 2016/05/05
Apply to: FF3us 1.0
Download
Files
hpC2.asm: For implementation in bank $C2
hpEE.asm: For implementation in bank $EE or any other bank
Apply with xkas 0.06
Command example: xkas hpEE.asm romname.smc
Space used
hpC2.asm: 36 bytes in bank $C2
hpEE.asm: 46 bytes in bank $EE (or the bank of your choice)
Description
This tweak implement character stamina consideration in HP growth at level up.
As it stands by default it implement the following formula:
HP growth = Character stamina * level HP growth table value / 32
This mean for the following case scenarios, given stamina values of 32, 48, 64 and table values of 10 and 60, HP growth will be:
32 * 10 / 32 = 10 HP
48 * 10 / 32 = 15 HP
64 * 10 / 32 = 20 HP
32 * 60 / 32 = 60 HP
48 * 60 / 32 = 90 HP
64 * 60 / 32 = 120 HP
By adding a LSR in the ASM file (where the 5 LSR are toward the end), you can make the divisor 64 instead of 32. By removing one, you make it 16.
Note that this hack require HP growth table modifications / tweaking in FF3usME to achieve balance.
Bank $EE implementation
Code:
hirom ;do not touch this
;header ;uncomment if ROM has a header
;Implement the following HP growth formula:
;stamina * level HP growth table value / 32
org $C260CA
JSL formula
BRA sbr60DD
org $C260DD
sbr60DD:
org $EEAF01 ;Change this accordingly to you empty spot of choice in a bank other than $C2
formula:
PHX ;save stat block index
TDC ;Clear 16-bit A
LDA $1608,X ;get level
TAX
LDA $E6F500,X ;normal MP gain for level
STA $FE
LDA $E6F49E,X ;normal HP gain for level
PLX ;get stat block index
XBA
LDA $161C,X ;get stamina
REP #$20
STA $004202 ;stamina * HP gain
NOP
NOP
NOP
NOP
LDA $004216 ;load multiplication result
LSR
LSR
LSR
LSR
LSR ;divide by 32
SEP #$20 ;8-bit A
STA $FC
RTL
« Next Oldest | Next Newest »
Users browsing this thread: 2 Guest(s)