The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.3.33 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Users browsing this thread: 2 Guest(s)
Stamina in HP Growth Calculation

#1
Posts: 3,969
Threads: 279
Thanks Received: 236
Thanks Given: 57
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
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
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
  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • Kugawattan (05-05-2016)



Messages In This Thread
Stamina in HP Growth Calculation - by madsiur - 05-05-2016, 09:04 PM
RE: Stamina in HP Growth Calculation - by madsiur - 05-05-2016, 09:16 PM
RE: Stamina in HP Growth Calculation - by seibaby - 05-06-2016, 08:33 PM
RE: Stamina in HP Growth Calculation - by madsiur - 05-06-2016, 09:06 PM
RE: Stamina in HP Growth Calculation - by madsiur - 05-06-2016, 10:37 PM
RE: Stamina in HP Growth Calculation - by seibaby - 05-08-2016, 12:26 AM
RE: Stamina in HP Growth Calculation - by seibaby - 05-08-2016, 12:19 PM
RE: Stamina in HP Growth Calculation - by madsiur - 05-08-2016, 07:40 PM
RE: Stamina in HP Growth Calculation - by madsiur - 05-30-2016, 07:20 PM
RE: Stamina in HP Growth Calculation - by madsiur - 05-30-2016, 08:16 PM

Forum Jump:

Users browsing this thread: 2 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite