Changes staves to heal off res

Sorry if this isn’t the right place to post this but would it be possible for someone to edit or tell me how to edit Venno’s DSFE style healing to use the res stat instead of magic?
This is fe8 btw.

Edit:
To further my problems, EA is now giving me these errors on all files containing these definitions
(No code named jumpToHack found. No code named callHack_r1 found.)
I am using the latest version of EA.

If you’re just looking to replace mag with res in the formula, it should be simple to go into the code and replace the stat. I haven’t tried something like that, but it should be sinple to notice where the mag stat comes in, and then it’s just figuring out what to put for Res.

Yeah I’ve found the magic getter in the following asm but i have no clue how to find out what value to change it to

Heres the asm file:
@r0 = Unit battle data
@r1 = IID/durability of item or staff being used
@Paste the resulting .dmp to $16FB8
@Makes staves heal (Magic/2)+Staff power
.thumb
push {r4,r14}
mov r3,r0
mov r2,r1
mov r4,#0x24
mov r1,#0xFF
and r1,r2
mul r1,r4
mov r4,#0x0
ldr r0,ItemTable
add r0,r0,r1
ldrb r4,[r0,#0x15] @Staff/Item ‘Might’
ldr r1,[r0,#0x8] @Item Ability
mov r2,#0x4 @Is item a staff?
and r2,r1
cmp r2,#0x0
bne Staff
b HealingCap
Staff:
mov r0,r3
add r0,#0x2C @Checking for S-rank staves
ldrb r0,[r0]
cmp r0,#0xFB
blo ACheck
add r4,#0x8
b AddMagic
ACheck:
cmp r0,#0xB5
blo BCheck
add r4,#0x4
b AddMagic
BCheck:
cmp r0,#0x79
blo CCheck
add r4,#0x2
b AddMagic
CCheck:
cmp r0,#0x47
blo AddMagic
add r4,#0x1
AddMagic:
mov r0,r3
ldr r1,GetPower @Finds effective Magic
bl Longcall
asr r0,r0,#0x1
add r4,r4,r0
HealingCap:
cmp r4,#0x50
ble End
mov r4,#0x50
End:
mov r0,r4
pop {r4}
pop {r1}
Longcall: @This instruction doubles as our longcall and the end to the overall function. Handy!
bx r1

.align 2
GetPower:
.long 0x080191B1
ItemTable:
.long 0x08809B10

It looks like the GetPower sub-hack might have the answer. Or maybe the AddMagic. Check them both.
(Note that I still don’t really get ASM, I’m just using logic. So I could be entirely wrong.)

I’ve spent some time trying to understand how the code works but I still don’t yet understand which register is holding the strength value :cry:

if we’re talking FE8 i already made a thing for that

i originally set it to item might + unit's' mag
but you can just change the pointers in the event file to make it res instead of mag and remove item might entirely if you’re not into that

assuming that you want healing to be based off of only res you can change that part that says

		//stuff that modifies the heal amount
		POIN 0x80175DC //get item stat to add to heal value
		POIN 0x80191B0 //get unit stat (mag) to add to heal value
		WORD 0x0 //for stuff like skills

to

		//stuff that modifies the heal amount
		WORD 0 //get item stat to add to heal value
		POIN 0x8019270 //get unit stat (res) to add to heal value
		WORD 0x0 //for stuff like skills

and then apply the change with EA
this overwrites the old thing for healing so it doesn’t take up any free space

1 Like

Ok cheers this helps a lot

on second thought i recommend keeping the item might part since otherwise Heal, Mend, etc. all heal the same amount
so this is probably what you’d want

		//stuff that modifies the heal amount
		POIN 0x80175DC //get item stat(might) to add to heal value
		POIN 0x8019270 //get unit stat (res) to add to heal value
		WORD 0x0 //for stuff like skills

then you can set the might of Heal, Mend, etc. to match the heal bonus that they normally give

1 Like