Jump to content

Custom Staves [FE8]


lushen124
 Share

Recommended Posts

Hi all, I've got another question for anybody who can help.

I'd like to get a custom heal staff that's basically the same as a regular heal staff but with different EXP gain (among different name and description and whatnot). The easy way would be to figure out where the EXP routine is for FE8 and modify it there for all staves (which was my initial intent), but I haven't been able to find documentation on that. So if that's something that's already known, I don't have to create this weapon. But since I assume it's not yet known, I was just going to create this custom staff instead that had more cost per use to increase EXP gain in a very roundabout way.

I've read Blazer's guide on the topic already and using the offsets listed below for FE8, I was able to find the tables there. I didn't particularly want to repoint just for a single item, so I just jacked an unused item's spot (Mine, ID 0x7A) and put my item there. I then copied and pasted the item usability entry and item effect entry for the Heal staff and pasted them where Mine's entry used to be. This mostly works. But now I'm running into three mildly entertaining issues.

First is that while the usability condition works properly (i.e. only shows up when there's an adjacent unit that needs healing), the targeting system is borked. It still thinks it's dropping a mine somewhere (the scrolling text below also reflects this), so it targets all the empty spaces around the healer. If you actually go to confirm, it actually heals like normal. Maybe there's another pointer table for targeting routines?

This leads to the second issue: the music that plays is the attacking BGM, instead of the staff BGM. I figure that's also located elsewhere. I would have thought making the item a Staff would be sufficient, but I guess not. (I sincerely hope IntSys didn't make another table to map items to BGM, but judging by what I've seen thus far, they probably did).

Finally, it doesn't heal the correct amount. The target was missing 5 HP and the staff healed 4. Are there some other hard coded shenanigans going on in the game that's looking explicitly for a specific item ID to figure out how it works? I noticed the item effect table had the same routine pointer for all of the healing staves, so I assume that's just telling it to heal, but how much to heal is not specified here (yet another table?).

Just to give an idea of what I have right now: http://imgur.com/a/HYdkF

I know FE8 is not as well documented as FE7 is, but if anybody has any documentation or thoughts on this, that would be greatly appreciated.

Link to comment
Share on other sites

I know that Hextator made an autopatch that allows staff exp gains to be edited directly for FE7 but I don't know if there's one for FE8. Maybe try looking through the FE8 asm folder in feditor

1. Sounds like something that might be hardcoded. Try a different item that doesn't target empty adjacent spaces and see if the problem still persists

2. I know that there is a table for music played during healing (that you'll probably have to repoint) but I don't know where it is you can try debugging or might be amongst Blazer's documentation

3.The amount might also be hardcoded because afaik the only amounts are 10, 20, and max HP so it wouldn't make much sense to make a table

So basically you're almost definitely going to have to do some debugging. The Ultimate tutorial has a section on it

Link to comment
Share on other sites

Ok, I found the staff experience calculation routine using the debugger. I looked for either add rX #0xA or mov rX #0xA and found it pretty quickly.

If anybody is looking into the EXP stuff for FE8, 0x2C676 holds the instruction that adds 10 to the experience gained. The actual instruction is add r2, #0xA and in hex, that's 0A 32. I didn't have time to track down the back trace of that to find what called it, but maybe somebody with more time on there hands can take a look at how it got there.

In the meantime, if anybody wants to universally increase all staff experience gains in FE8, you can change the value there. The first byte of the instruction in little endian is the immediate value that's being added to the staff experience. By default, it's 10 (0x0A). I changed mine to 20 (0x14) so in my case, I replaced the value at 0x2C676 to be 14 32.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...