I just remembered that I never bothered to find the equivalent FE7 address (it's 0x28E7E), so that's in the readme too now.
I also cleaned up the code quite a bit; it's now much shorter and understandable than it used to be.
just fyi I completely rewrote this hack
Neat; what improvements did you make? Before I did the latest rewrite this was my oldest and jankiest hack, so it'd be no surprise if you did better than me on that.
i cut the length of it down to about 0x120 bytes in length and made the boosts softcoded via pointers to boosts like with the stat boosts from equipped weapons
I'm making a small edit to this (making bonuses might/hit only, like in FE13/14), and more importantly, writing an installer for it (the modified version) in EA.
It should drop later today; check back. Should simplify editing the tables and installation a lot.
Here y'all are.
dump fileEA installersource code
This also fixes a bug where a unit with an exact C rank would not get bonuses.
I think you should leave what types of bonuses people want to give up to them instead of forcing them to use Might and Hit only, especially if previous versions had that degree of flexibility.
If someone out there thinks that Sword A should give +10 Crit (despite probably being a terrible idea), they should be allowed to do so if that's their vision for their project. Mods like this should be about flexibility and giving the person options, after all.
The link of the src is the same as the one of the dmp.
Let me rephrase: I had to code this for a hack I'm doing in FE8 and I figured there's no harm in releasing it with installer. Crit is fairly trivial to add back in; though I believe Venno said before some of the other boosts were a bit odd and required more intensive hacks? I might release a ver with crit in the future.
Mainly I did it this way since FE11-14 had Mt and Hit boosts.
I'm attempting to apply the patch manually (since the camtech assembly patcher link is broken), and it's not working. I insert the rank.dmp file into free space (0xfd8790) using windhex (using the insert binary data option), and I changed the bytes at 0x28e8c to be the location+800001 then inverted. I then changed the nightmare module pointer, made the changes, but the bonus are not applying.
Necro post but it might be of interest to the creator or other users:
The "Weapon Rank Bonus - Advance" seems to have a bugby not applying the bonus of the first bonus type in each set of bonus ranks.
Each Weapon Rank has a set of 3 types of bonuses, and the first bonus of each set doesn't activate in any weapon type or with any bonus type.
In the Red boarders the bonus isn't applied, in the Green borders it works as intended.Also no problem with the auto-bonus %Hit on enemy units. It also works.
Yep, you're right,there was one little mistake in the code: the first type of bonus was being stored to the wrong address. It's fixed now - nice catch.
Could you update the download link with fix please?
Is it easy to make an ADV. ver. where the patch gives the bonuses even when the unit has a weapon triangle disadvantage?
Done and done. It's called "Rank - Advanced - No WTA" in the .zip file.
Thank you for your hard work and fast response.Haven't tested the normal version but the "Rank - Advanced - No WTA" has issues:
Firstly, the .NMM modules for "Enemy HIT Bonus" and "ADV" need specific updating concerning the offset written in them:
The 0x66 in "Enemy HIT .nmm" needs to be 0x6CThe 0x78 in "ADV.nmm" needs to be either 0x6E or 0x70
Secondly, the patch doesn't seem to work:
The bonuses don't get applied in any case.
Ah man, sorry about that, I took a second look and realized what I was doing wrong. Updated the download for hopefully the final time - the Advanced+No WTA version should be functional and use the same .nmm offsets as the normal version now.
Sorry for the late reply. I was checking for errors from my part.Unfortunately, the patch is still not working.
I'll pm you a rom copy (just a fresh rom with your patch only).
Is there a for-dummies explanation on how to use the Nightmare modules for this? Whether I open a rom with the hack applied or the .dmp itself, the module gives me fields with "Default value for x" instead of their actual default values. Do I need to edit the modules to point to where I pasted the hack in the rom? I'm using it in FE7 if that matters.
edit: oops, just found it hiding at the bottom of the readme. Thanks for the nifty hack!edit2: Still confused. The Nightmare module still isn't working correctly even after I made the proper adjustments.
@Seal, something seems to have gone wrong in your ROM with linking to the hack from the vanilla routine at 0x2AD68. The byte sequence should be 1847 for 'bx r3', but instead it's 1848 which does nothing helpful, preventing the new code from being jumped to. I tested the patch with Cam's assembly patcher and the linking worked fine...did you apply the patch manually and perhaps make a typo? If not, I'm not sure what's going on because the new code itself is functional.
@Alusq When you say not working, do you mean that it's not possible to even change the 'bonus type' fields? The bonus type is an index to the unit's battle RAM data and 0xFF isn't defined for a bonus type. If you can get at the dropdown field you can just change it to a real value.
I re-installed the hack to a fresh backup to make sure I could reproduce the errors that I was getting (VBA was telling me "an invalid BIOS function was called" and crashing), but as it turns out I forgot to add 1 to the pointer at $28e8c. Works like a charm now; thanks! Somehow it seems like I only figure things out after asking for help.