Expanding & Relocating Data Arrays

[quote]This is very simple, and I’m surprised no one has typed up about this yet. Keep in mind that this tutorial is biased for FE7, but it can be done with any GBA FE:

Follow my steps as closely as you can, and you can have a max of 255 items and 255 classes.

Imagine the possiblities.

Now for the steps:

  1. Grab HxD. I hate this Hex Editor with my heart and soul, but its Search and Replace function is godly. If your personal Hex Editor has Search and Replace, it is godly too, and you will not need HxD.

  2. The Item Array lies precisely at the offset 0xBE222c. To calculate the size of your old, decrepit Item Array, you head to your nice standard Calculator. 159 x 36 = 5724, which in Hex means 165C. My own array was slightly expanded already, so don’t mind those numbers now.

For the precise calculation, open your Item Editor.nmm. The first two numbers under 0xBE222c? You have to multiply them, and turn them into Hex. There’s no special tool needed, just open Calculator, do the math, then click on the Hex circle and voila. That’s the size of your Items Array.

  1. Starting from 0xBE222c, make a selection box the exact size of your Items array. HxD has a nice indicator at the bottom tray of the window called [Length:] when you highlight Hex. When [Lenght:] matches the correct size, Copy/Ctrl+V

  2. Open a new project in that same Hex editor, and paste your old Item array there. There’s actually no need to save it, but you may want to keep it as back up just in case.

  3. If you haven’t expanded your ROM, now’s a good time to do it. Choose some empty space at the bottom of your ROM, and write down the offset. This is very important.

  4. Copy and Paste your old Item Array into the ROM again, at the new empty offset.

HxD has the peculiarity of writing new data instead of over it, so you may want to make a selection of the same size as the array to ensure that the data is overwritten and save you some trouble. It costed me a day’s worth of updates, it can cost you your whole work if unlucky.

If you’re not using HxD then I’m pretty sure you wont have much trouble.

  1. The moment of truth. Open the Search and Replace function and write in the REVERSED offset of your old Item array and the REVERSED offset of your relocated Item array. Set it to Hex-Value if you’re using HxD. It should be set to search for 2c22be08 and be replaced with the new offset.

  2. Once you’re sure the numbers are right, replace them. You should get 62 results. Open your game on any chapter and open the status window to view your items. It should all be there as normal. If it’s not then I hope you have a backup of the ROM, or at least, of the Item array. STILL, for you to mess up like this, it’s unlikely. Moving on.

  3. Open your Item Editor.nmm and repoint it to your Item array’s new location. Again, it should all be there. You can even open an old and an updated Item Editor to compare.

  4. Last step is to expand every nmm and every txt list to include your new items. The main Item list ends around 0x9E. Just add 0xA0 Custom, 0xA1 Custom, 0xA2 Custom… and so on. If at the top of the list is a number, increase it so it’ll include all the new entires. And lastly, don’t go mad and fill it immedeatly with 255 stuffs, go slowly.

Once I’m done testing the Class array expansion I’ll get back to you, but the Item array expansion works perfectly.[/quote]

An old tutorial from the original FEU by FurryYunSeong; yet, still incredibly useful. If you’ve got any questions, post a topic in the questions forum!


Would like some pretty pictures to spice this up a bit, but I was just messaging Camtech about this recently so this saves me some effort. Thanks!

I’m pretty sure Ctrl+V is “Paste”. It should be “Ctrl+C” here…