This is a direct quote from my topic on serenesforest.net
First off, no I'm not going to make an FE8 version. Now then
For those who don't know, an arms scroll is an item from Path of Radiance that increases the weapon level of the currently equipped weapon by one full letter eg: C raises to B, E raises to D etc. I think it's been a pipedream of some hackers for a while to have a functioning arms scroll for the fegba games (FE7 especially)
Well here it is guys :D
A word of warning, to get this to work properly you're going to have to be familiar with at least hex editing and nightmare. If you aren't comfortable with either of those I suggest reading Blazer's Ultimate Tutorial, it should help teach you what you need to know. Now on to the steps:
Step 1: Repoint your tables
In the vanilla FE7 ROM, there are multiple tables for items but the ones you need to focus on are the item conditions, effects and stat boosting text tables.
Blazer's topic here has a lot of the info you need about the table locations and how to repoint them and about making new items in general.
I highly recommend using his patch that repoints all the tables for you but I'll leave that to your discretion
Step 2: Inserting the hack
The Arms Scroll hack has three parts: the condition, which makes the item usable or unusable based on certain conditions; the effect, which is the actual code that makes things happen; and finally the text code which loads the "Weapon Level increased" popup when the item is used(basically the exact same prompt used get from using a stat boosting item) Here I'll paste the raw hex to each part, your job is to put them in free space and make a note of where you put each one.
[spoiler="Condition"]
1E B4 01 20 0F 4C 10 4B D9 7A 48 22 4A 43 0F 4B 9B 18 1E 21 5A 18 12 78 D1 00 8A 18 92 00 0C 49 09 68 51 18 07 31 09 78 07 29 07 DC 28 22 51 18 59 18 09 78 00 29 01 D0 FB 29 00 DB 02 3C A6 46 1E BC 70 47 47 6F 02 08 F0 A3 03 02 08 BD 02 02 60 60 01 08
[/spoiler]
[spoiler="Effect"]
07 B4 15 48 48 21 41 5C CA 00 8A 18 92 00 13 49 09 68 51 18 07 31 09 78 28 22 89 18 C0 7A 48 22 42 43 0F 48 80 18 40 18 01 78 1F 29 07 DB 47 29 07 DB 79 29 07 DB B5 29 07 DB FB 21 06 E0 1F 21 04 E0 47 21 02 E0 79 21 00 E0 B5 21 01 70 05 4A 96 46 07 BC 70 47 00 00 F0 A3 03 02 60 60 01 08 08 BD 02 02 0F D2 02 08
[/spoiler]
[spoiler]
01 4D 02 48 00 47 00 00 50 07 00 00 55 CE 02 08
[/spoiler]
Step 3: Assigning Pointers to the Hacks
Now that the hacks are all inserted, they have to be pointed to in the tables. The formula for the offset to change is (ItemID * 4) + baseOffset = desired offset
eg; if the table is at 0xD00000 and I want to edit Vulnerary's(0x6B) entry, we get; (0x6B * 4) + 0xD00000= 0x1AC + 0xD00000= 0xD001AC. Again, Blazer's topic has more info if you need more help. From here you put in pointers to the pasted piecemeal hacks in the slot for the item you want in the corresponding tables so a pointer to the condition in the condition table etc. Pointers are little endian meaning they're bit reversed with the 0x8000000 bit set
Step 4: Finishing touches
If you've reached this step then the arms scroll should be technically functional but it's not done yet. In your item editor module you need to edit 2 things; the stat boost pointer and the item/staff use. The stat boost pointer can't be left as 0x00 of else you'll experience bad glitches with random stat increases so you instead need to make it point to an actual array of 0's. You need at least 9 consecutive zeroes for it to not break but I'd have more just to be save. Lastly, you need to set the item use to a stat boosting item, any will do fine so long as it is a stat boosting effect.
Step 5: Profit
The arms scroll has been successfully inserted! The only things left to do are change the item name, description etc and insert an icon if you want. Otherwise you're finished. Congratulations on your new Arms Scroll.
A few brief points before you all rush off to do your thing:
1: The scroll works on all weapons and staves but not dance rings or dragonstones
2: The scroll determines what weapon level to change based on the item IN THE FIRST SLOT. Unfortunately, I couldn't make it read the "equipped weapon" so you'll have to live with it affecting the first item. It shouldn't be that big a deal I just wanted to make sure you understood first
3: The conditions for using the item are as follows: the item will only work if the weapon level of the type of the item in slot one is between E and A and if the first item is a weapon or staff; if it's S or null it won't be usable and if there's an item or no item in the inventory
4: Currently there is no check to prevent multiple S ranks. If there's demand for that to be changed, I can add it in later.
Thank you for your time and enjoy
3 Likes
Would this be helpful?
Just thought I'd share this since it's a common thing we need to do so this is handy.
FE7: branch to 0x16764
FE8: branch to 0x16B28
Parameters: r0 = &Unit in RAM Output: r0 = Item Type and Uses of equipped item for r0 (0x0000 for none)
Also for the S-rank check, just edit the usability routine to check for an S rank and return false if there is one.
I literally just said it wouldn’t work; the equipped weapon changes to what’s highlighted when you’re in the item screen
I know how to check for multiple S ranks I just didn’t think of it until i already assembled the code
I take it to mean you mean it wouldn’t work for staves? Just check the first slot for staff type, then go by equips. Or do it true FE9-style and don’t allow for staves.
I don’t think you’re understanding me
the “equipped weapon” byte changes as you go through items
so if I have an iron sword then an iron axe then the scroll the scroll will boost axe level because you highlighted the iron axe to get to the scroll
get it?
trust me I’ve been over this >_<
Have a video demonstration
Ah, I got it from that second explanation. The original explanation was unclear. Are you sure you’re using that routine though? What byte is the equipped item byte? That routine simply starts at slot 1 on the inventory and loops down until it finds the first weapon you can equip.
+0x48 into the “current character struct” is the equipped weapon byte
I told you I’ve been over it; using the first slot was my only choice to get it to actually work
Venno
November 8, 2014, 2:02am
8
Is there a particular reason there won’t be an FE8 version (aside from the bother of going through and finding all the equivalent routines in FE8 etc)? I might try porting this to 8 if you’re cool with that
Basically it’s too much of a bother for me
Take a crack at it if you want
This is wrong; the correct thing to do is to call the function like Crazycolorz suggests (a function which I have shown you on multiple occasions, and I’ve even linked to various examples of it being used in my doc).
Crazy was probably asking something else, like what the return value of the function was for you. He was not asking which byte in the struct is the equipped weapon byte because he knows that there is no specific location for the “equipped weapon” - it varies. That is why there is a function for finding it.
Not how I would have done it, but that’s IS for you.
1 Like
Brendor
November 26, 2014, 7:14pm
11
yeah I know
we resolved our confusion over skype
I was going to change the source but you know…stuff…and things
+0x48 is the weapon that’s being highlighted (which is fucking weird but again IS)
nope
+0x48 is just the item in the first slot
that is all that can be deduced
Brendor
November 28, 2014, 8:36am
13
No my little droogie. +0x1E is the slot 1item ID
+0x48 is what’s “going to be” first ie it changes as you scroll through equipable weapons
Well actually I thought you were talking about the unit structs but now that I think about it you can’t be because those are only +0x48 to begin with
I’m not your fkn droogie
Brendor
November 28, 2014, 7:42pm
15
No not the plain ol unit struct the attacker and defender structs that are like double the size
And yes you are c:
yeah I figured you meant the big ones after I realized it wasn’t the 0x48 byte ones