I wrote this for someone for FE8(it’s just a copy paste), so just keep in mind the offsets and class table size are for FE8, but the concept is still the same. This is designed for using the full 255 classes. Just remember if you use Icecube’s patch, old .savs won’t work. Sorry if it isn’t helpful.
To do this you just need to repoint the table which is what
the FE7 tutorial does for items in FE7 as an example I believe. This
might get a bit long… I included an example patch at the bottom. This
patch is part of what I’m using for my class package project/my FE8
hack, so it already has some stuff repointed, added sound effects for
classes, and some new map tiles added in from FE7 and FE6.
This is how I do it:
The first thing to do is find the class table offset. The class
table offset is 0x807110 as mentioned in the class editor nightmare
module. Reversing the bytes, this is 10718008 when you search for it in a
hex editor like HxD and there should be only 4 occurrences of it.
The next thing you need to do is find where you want to place
your new table. For my animation package, the class table is located at
0x1338480.Once you have a new location for the class table decided, you’ll
want to copy the whole length of the original class table. This is most
easily done by using the goto function of HxD to go to 0x807110(though
you don’t need the 0x in front for goto) and then use the select block
function. For select block, make sure that you are selecting it by
length and not end offset, and that you are using it in decimal not
hex(you could do hex but decimal is easier to calculate for most
people). So you’ll want to select a block of 10752.What’s nice about FE8 is that it’s class table is already of length 0x7F/128, so when you copy the class table once, you just have to
paste it twice into your new class table location.
After pasting the
table in the two times, at the end of the table add in 16 bytes of 00
for good measure since I think that’s what lets the game know to stop
looking through the table, though this is something I could be wrong
about hence only doing it for good measure.
The next thing you’ll have to do is repoint the class table. So
using the replace command, replace all occurrences of 10718008 with your
new table’s offeset (for me this would be 80843309). As mentioned
before, you should only have 4 occurrences replaced.
After repointing the table, there are still two more things you
have to do(well, four if you want truly dynamic classes). These things
are repointing the standing map sprite table, the moving map sprite
table, fixing the class numbers in the class table, and adding in Ice
cubes patch.
The fixing the class table numbers and moving map sprite
table are the most important.For repointing the moving map sprite table, you just follow the
same idea as repointing the class table. This table is located at
0x9A2E00. So you’ll want to replace 002E9A08 with whatever new table
location you use for your ROM, just remember to reverse the bytes. The
default moving table for FE8 is only 127 entries in length however, so
pasting it twice would mean you have one extra entry 8 bytes in length
left over by default. For this reason, by default I recommend pasting
the table in once, skipping 8 bytes, and pasting it in again. The moving
sprite table has it’s moving sprite correspond to the class table entry
plus 1. So entry 0x00 in the moving table is Ephraim’s moving sprites,
but his entry in the class table is 0x01. So the 8 bytes you skip would
be for the copied 0x00 entry in the class table. Obviously you can fix
those two entries latter. I wouldn’t touch 0x00 in the class table
though since it would also have no moving map sprite to correspond with.
The copied version which is entry 0x80 is fine. At the end of the
moving map sprite table I’d add in 02 00 00 00 for good measure to
signify the end of the table. Again, I don’t know if you actually have
to do this.The standing map sprite table follows the same kind of idea
however to set a class to use the standing map sprite entry in the array
with the corresponding point in the class table. So Ephraim’s standing
sprite is 0x00 and his class table entry uses 0x00 for his standing map
sprite.
THIS IS IMPORTANT For entries 0x80 and beyond,
if you’ve just copied the class table/in general, you will need to make
sure the class number is the same as the index the class is in the array
or it will cause problems when you try and save. The patch I attached
already does this part for you so you can just copy paste those entries
from 0x80 on. In this patch, this point starts from 0x133AE80, so just
copy the 10752 bytes there like before and add them to the end of your
class table. Failing to do this means that when you save and resume,
characters in these classes and beyond will revert to the class that
their class number says they are.
The last part is where Icecubes patch comes into play and is also
very important. Without this, the player cannot use any of the classes
in entries 0x80 and beyond. To use Icecube’s patch, you just apply his
patch like you would any .ips patch and you’re good to go.