lushen124 Posted November 29, 2014 Share Posted November 29, 2014 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. Quote Link to comment Share on other sites More sharing options...
Brendor Posted November 30, 2014 Share Posted November 30, 2014 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 Quote Link to comment Share on other sites More sharing options...
lushen124 Posted November 30, 2014 Author Share Posted November 30, 2014 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. Quote Link to comment Share on other sites More sharing options...
fengaridotdll Posted November 30, 2014 Share Posted November 30, 2014 I read that as "custom slaves" and I started to lol Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.