[FE8] HP bar routines?

I’ve been messing around with some ASM in the battle routines, mostly with weapon effects. Things are going pretty smoothly aside from weird behavior with the HP bar when using weapons with the “HP steal” effect.

Not wanting to reinvent the wheel, I looked into the GitHub for skill systems thinking that I’d be able to reference some code from Sol/Live to Serve/Counter/etc in order to get the HP bars to change correctly, and thankfully it looks like this folder has the source code I was looking for - however, I’m a bit lost as to where to put it in manually. I tried assembling the HPHealing.event file, it threw an error that jumpToHack wasn’t defined, so I included Hack Installation.txt at the top of it. It assembled… and overwrote the header on my (clean) ROM so it can’t even be opened. I’m guessing I’m missing some pointers somewhere that aren’t covered by just those two event files.

Could someone give me a bit of guidance as to what I’m missing to get this to assemble? I’m not planning on adding the whole skill system, just these few engine tweaks. Thanks in advance!

seems like you’re missing an ORG? EA automatically writes to 0x00 if there’s no origin set.

Yeah, that’s probably what’s happening. I was trying to assemble this file since that’s all I need out of it. It’s included by this file in the master installer, but I don’t see any additional ORG tags in that one that it would be dependent on, at least none that aren’t for parts of the system I’m not using.

I haven’t worked with EA much yet, just with writing ASM directly and pasting .dmps where I need them. The .event file at least has ORGs for the component .dmps so if all else fails I’ll just try doing it that way. :grimacing:

ETA: Ah, figured it out. I was using the version of the skills patch that comes with FEBuilder and not the one built by the makefile in the repo. The offsets are totally different. It’s working now!

EDIT 2: For future reference, there wasn’t a freespace definition in the event file I was using - had to throw in this baby to get it to compile. Now it works with EA perfectly fine.

#ifndef FreeSpace
    #define FreeSpace 0xb2a610
    ORG FreeSpace