Jump to content

FE 8 Class Array Expanding and Patching


Jackoftrades222
 Share

Recommended Posts

Hello, it has been a very long time since I've done anything with the Fire Emblem series but I am back. I finally decided to try out expanding my rom, but it didn't work out very well for me.

-I found the old item array expand tut and followed it as closely as I could. When I finally replaced everything it told me I replaced 6 things. I assume it was suppose to be 84 things as the nmm suggested, but it was only 84 things. I assume I did it correctly, but could there be a more specific tut for just this that I could follow. I did play for a bit and the classes seemed to be fine. Re-pointed the nightmare mod to my new offset and was able to edit classes like normally, but this didn't feel like I was adding classes, just relocating it.

-They don't go into good detail about rewriting the nmm. So I change the pointer, does that mean I know longer have the ability to mess with the original classes?

-Lastly what is patching? I have patching programs and I remember doing it along time ago, but I forgot what it does and why.

Sorry if these questions have been answered a million times, I've done days of searching trying to find more specific answers to help me out, yet nothing.

Anyways thanks for your time.

Alright, thank you to Deltre for walking me through these steps. Here is how you expand your Class Array in Fire Emblem 8. And any other array you wish to expand.

You'll need the Fire Emblem 8 Rom, Nightmare (I use Nightmare 2), and HxD (or your preferred Hex Editor.) and FEditor Adv.

-First you'll open your Class Editor.nmm using notepad as this will have the offset where the Class Array is in the Rom. Also Back Up Your Rom! Get in the habit of backing up your rom. I usually make a copy every day or before I expand a table. This will help if you somehow mess up a few days of work.

"#FE8 Class Editor by SpyroDi
#

1
FE8 Class Editor by SpyroDi
0x807110 <------ Offset
128
84
FE8 Class Editor.txt
NULL"

-Save this number. Next you'll want to copy down 128 and 84. Then multiple them together in the old trust calculator. Then click hex mode, this should change your answer to 2A00, the size of the array. Remember this.

-Open your Rom up in HxD. Use the Go To Command to search for offset 00807110. It should bring you right to it. Now you need to highlight and drag down until you get the size 2A00. In HxD this is shown in the bottom right corner. With HxD if you right click you can use select block and input the size you want and it'll highlight the array for you. Ctrl C to copy.

-Now with the Class Array copied, scroll down your rom until you find some empty space, represented by FF FF FF FF. Select another 2A00 and then use Ctrl B. As this will not only copy the code but write it as well. For mine, my new offset was 00E47900. Remember this number.

-After Copy and Writing, you need to go to Search and Replace. In the search box write the reverse of the first offest. Which was 00807110. Now it will be 10 71 80 and add a 08 onto it so it looks like this 10718008. Now for replace, for mine my offset was 00E47900, the reverse and what I write in the replace box will be 0079E408. Change it to hex string and search direction to All. This last note is one that I wasn't paying attention to. Kept giving me offset wasn't found, but after clicking all, it found and replaced the original offset. It should say 4 instances were changed.

-Save and exit.

Now open your rom and play to see if your classes operate like regular. Which they should if you followed my steps.

-To open in FEditor Adv, you'll have to open your hex editor scroll down to the bottom of your Rom and delete the last four bytes then save. This should allow it to be open in FEditor Adv. Now you'll notice you can't open up the class animation manager, just save the rom, close and open up again, this should fix everything.

-Before you can start adding new classes, you'll need to open up your Class Editor.nmm and change the offset to your new offset. Mine was 00E47900. And tell Nightmare there is a new entry by changing the top number by how many classes you are adding. I've added two so 128 will be 130.

FE8 Class Editor by SpyroDi
0xE47900<------ Offset
130
84
FE8 Class Editor.txt
NULL"

-Also expand the .txt list to include your new class. There are other modules you need to expand the .txt list and maybe the .nmm. Check Map Sprites, Promotions, Chapter Units, and such.

-And that is all. You should be ready to create a new class for Fire Emblem 8 and maybe even other Fire Emblems with this information. Thanks again to Deltre for walking me through the process. http://serenesforest.net/forums/index.php?showtopic=48196 Sentry Down for asking the FEditor Adv question, and Arch http://feuniverse.us/t/expanding-relocating-data-arrays/29 for his tutorial on item expansion in Fire Emblem 7. I've been trying to do this for years and now after such tutelage, I am now able to enjoy my own character classes in Fire Emblem 8.

Edited by Jackoftrades222
Link to comment
Share on other sites

1. I'm a little confused as to whether you were trying to re-point the item table or the class table, but the process would be the same either way. For this response, I'm assuming you did the class table. Don't quote me, but I would assume that the "84" comes from the fact that there are 84 entries in this particular table. The 6 pointers that you replaced are all the instances in the ENTIRE ROM that direct the game to said table. By replacing these pointers, the game will look to the newly specified location for all class related things in place of the default location. This is important, because adding to the table in its default location carries a high risk of overwriting other important data. Once you've copied the original data to the new location (defined by whatever free space you're pointing to), you can add/change classes to your heart's content.

2. No, you should still be able to change all the original classes just fine after repointing the module. However, in order for new classes to be reflected in the module you have to change a few more things. At the top of the file there should be a few more numbers, one that defines the number of entries in the table and another that defines the amount of space that the table occupies. In this case, it should be 84, followed by another number defined by Number of Entries x Amount of Space per Entry. So if I wanted to have say, 100 classes, and I know that each class occupies "8" for space (might not be exact, it varies from table to table) I would change 84/672 into 100/800. This is terrible advice don't do any of this.

3. Not the most in depth answer, but think of a patch like an "update" sort of. Essentially, it replaces existing data within a ROM with new data defined within the patch itself.

Edited by Deltre
Link to comment
Share on other sites

Alright I am glad to hear that I did it correctly. So you are telling me I am able to now expand the .nmm. I'm sorry but I didn't follow that example very well. 84 is the bottom number. The top number right under the offset was 128, which means 128 entries in the mod. I was just following the expanding & relocating tut's example, not understanding what everything meant. How would I figure out how much a class occupies? I also expanded my new ROM, and this time it said it replaced one occurrence. I'm about to type out my whole process if it seems like I'm doing it wrong.

"#FE8 Class Editor by SpyroDi
#

1
FE8 Class Editor by SpyroDi
0x807110
128
84
FE8 Class Editor.txt
NULL"

So when I get things figured out, when I want to add a new class. I'll go into the .nmm and change 128 or to 129. Rework the class, character, and other .txt that needs it, and then it should work properly? I won't have to do anything else as long as the expansion went well?

And thank you. I had a patcher in my old tools folder, and I believe I used it on Shining Armor, which doesn't work by the way, but wasn't sure if I needed it for anything else. I vaguely remember patching things a long time ago.

I really thank you for your help. I do have more questions though. Is there a fast and easy way to change battle palettes? So far nothing seems easy yet. Also I remember trying and failing at making a custom animation. If those are questions for another time than I'm fine, thank you so far for helping.

P.S. How do I make a custom animation for hand axe and such. I can insert custom animations and point spell animations to weapons, I don't know how to make a certain weapon work for a certain class.

I did edit the class array, started it up, everything seemed fine. So went and tried to add a new class. Went into class editor .nmm and made it 129. Afterwards I went in and pretty much copied the soldier class to my new class except the animation. Changed the map sprites and misc sprites. Then I try to play. It isn't the map sprite I picked, it won't move forward but side to side and disappears and does nothing honestly. Though last time I edited this in without expanding the array, I noticed iron sword was replaces with a monster weapon, this time it stuck with the iron sword, so maybe my expansion worked.

Edited by Jackoftrades222
Link to comment
Share on other sites

Okay, so admittedly I haven't messed around with this stuff in a few months, and I completely mis-remembered the process for editing the nightmare module manually. My bad man. So actually, you should be good just by changing the first number to the desired number of classes. DO NOT change the second number, it needs to be 84. Again, my bad, I realized as soon as I opened the nmm file for myself.

I do have to ask, are you expanding the ROM or the table? Those are two totally different things. One will actually increase the overall size of the ROM (you don't want this) where as the other just moves the data to an area with more room. If you do actually expand the ROM you'll probably run into compatibility issues with Nightmare/FEditor and honestly you'd have to add an incredible amount of content on top of the existing content in order to really justify ROM expansion. Even worse, you'll break literally everything that comes after the spot you paste to in the ROM, so make sure you always Ctrl+B, not Ctrl+V.

Now for actually getting the editor to work, I'm 99% sure that your problem is the line that says 0x807110. That looks like the default class table position, whereas it should be pointing to wherever you moved the class table to. That said there's good news and bad news. The good news is that it's really easy to move a table to free space. This is where everything I described in my second bullet point comes into play. Open up your ROM in a hex editor of your choice (I like HxD but it really doesn't matter that much) and search for offset 807110. Then take the default 128 (80 in hex) and multiply by 84 (54 in hex). This will give you a total of 2A00 (again, in hex). Starting from 807110, select 2A00 bytes of space (most editors should have a feature like this, HxD will do this with the 'select block' command) and copy. This is your class table. Ctrl+B (NOT Ctrl+V) this into free space somewhere. I moved mine to B35670, for example, although anywhere with free space (look for long strings of FF) will do. Now in the text file, change the line where it says 0x807110 into wherever you pasted the class table. In my case, it would say 0xB35670. From there you can add classes to your liking, no problem.

The bad news is that if you already added a new class chances are you overwrote something else. In the default position there's not really any room for another class, so the game would be reading a combination of your new parameters as well as whatever data was already there. That's most likely what's causing the glitches you're describing. If your ROM starts acting strange even after you move the class table, it may be time to start on a backup ROM.

The only other thing that could affect this is how you replaced the pointers. This is pretty simple. So we know that the default pointer is 0x807110 based on the nmm. You have to reverse the order of the bytes (not the numbers themselves) so that 80 71 10 becomes 10 71 80. Then, slap an 08 on the end, giving you 10 71 80 08 as the hex string you're replacing. Then take whatever offset you pasted the table to and do the same. In my case, I pasted to B35670, so my new hex-string should be 70 56 B3 08. I would run a find-replace command for 10 71 80 08 and replace all instances with 70 56 B3 08. Assuming I've done everything else correctly, it should work.

I don't really art so I have no idea about the battle palette question. I might be able to help you with the animation issue but I'm having a little trouble understanding what you're asking.

Link to comment
Share on other sites

It is okay, it has been a few years since I've done this stuff and back then I was never able to go as far as I have now. The tuts weren't as easy to understand back then.

I am expanding the table array, sorry didn't realize they were two different things. Yet makes sense now. And I wasn't using Ctrl B as the item array tut suggested ctrl V.

No, it was pointed to the right place, but like said, I didn't use Ctrl B, and I messed up on the reversing. I was having trouble with the Search and Replace function as it wouldn't find the reverse of 807110, so I decided to use a string reverse online program, which gave me the wrong offset. So that is why there probably is glitches.---- so I stopped here and tried to do it myself. I found 807110, I have to use the go to command in HxD. I block selected the table (Thank you for telling me it could do that.) and ctrl C. Then I went to offset 00e47900. That is the random offset I found with nothing but FFs. I Ctrl B after selecting 2A00. Then I go to Search and Replace function, type in 10718008 for search 0079e408 for replace, set to hex values and then it can't find the first offset. This is probably where I've been having the most trouble where I try different things to get it to work. I also remember one of the post on the shrine with Zedlic and Blazer talking to a person, he said he got this far and had the same problem, the HxD wouldn't find 10718008. No one ever answered him.

Now I do have problems with the .nmm expanding as well. Last time I did it I pointed it to the right spot. In the module it is 128 entries, so I just expanded it to 129. Never touched 84. Was that the right thing to do? Because I was just adding one more class. And I always back up my rom before trying something new. I tried adding a class via just using .nmm and that is when I found the iron sword had broke. Back to the .nmm, I can't really say I had a problem just yet, because I expanded the table wrong last time, hence why all the glitches.

And thank you so far, I've been searching far and wide for a Class Array Tut, he only ever made a item array one.

I plan on opening a new topic about animations later, it'll make it easier for others to find who might be having the same problem. This will just be Class Array Expansion in FE8. Which again you are doing a great job helping.

--- Okay it was something stupid simple. In HxD when about to replace, you have three options on the right for search direction, all, forward and backward. It defaults onto forward. So after selecting all, it found 4 occurrences and changed them. I went into my nightmare mods, already had one expanded for the Spearmen class. Loaded the Class Editor, copied pretty much all the info from the soldier, added it to the prologue, and forgot Seth was carrying a sword. It's map sprite has trouble, not really selecting one when moving or active, which I am sure I can fix. But it worked well after I equipped a spear, so thank you. I will add a resolve tag after your next reply. ---e-- fixed the sprite issue, added spearmen to the bottom of the map sprite .txt. So thank you now I can keep making brand new classes. Though I'm running out of index space for new animations in FEAdv.

---e--- new problem. FEAdv editor doesn't open the rom any more. It says error processing one or more file streams.---- Sorry decided to look at this instead. http://serenesforest.net/forums/index.php?showtopic=48196 it fixed my problem, which was open you hex editor and delete the last four bytes. Afterwards open rom in FEAdv and save and reopen and things should work fine and dandy. Sorry I'm just to make everything clear and put it all in one place so if others want to do this, that won't have to wait years in order to get things working.

---e--- So the Spearmen Class 0x80 works perfectly. The next class Hector (F) 0x81 has problems. I promote a Trainee Soldier (3) into it and one the animation of changing doesn't play. And when I go to attack no animation plays at all. I changed the Paladin animation to the Hector (F) one to see if it is the animation, it isn't it plays fine. Yet won't work on my next custom class. I'm curious what I did wrong here, because I did basically the same thing I did with the Spearmen Class.

Edited by Jackoftrades222
Link to comment
Share on other sites

Now I do have problems with the .nmm expanding as well. Last time I did it I pointed it to the right spot. In the module it is 128 entries, so I just expanded it to 129. Never touched 84. Was that the right thing to do? Because I was just adding one more class. And I always back up my rom before trying something new. I tried adding a class via just using .nmm and that is when I found the iron sword had broke. Back to the .nmm, I can't really say I had a problem just yet, because I expanded the table wrong last time, hence why all the glitches.

Yep, sounds like you should be good to go. If you want to name your new entries for convenience you can just add them to the Class List.txt file.

--- Okay it was something stupid simple. In HxD when about to replace, you have three options on the right for search direction, all, forward and backward. It defaults onto forward. So after selecting all, it found 4 occurrences and changed them. I went into my nightmare mods, already had one expanded for the Spearmen class. Loaded the Class Editor, copied pretty much all the info from the soldier, added it to the prologue, and forgot Seth was carrying a sword. It's map sprite has trouble, not really selecting one when moving or active, which I am sure I can fix. But it worked well after I equipped a spear, so thank you. I will add a resolve tag after your next reply. ---e-- fixed the sprite issue, added spearmen to the bottom of the map sprite .txt. So thank you now I can keep making brand new classes. Though I'm running out of index space for new animations in FEAdv.

Glad it's working. And just you know, there's FFFF Indicies version of FEditor floating around somewhere. You'll basically never run out of space with that haha.

---e--- new problem. FEAdv editor doesn't open the rom any more. It says error processing one or more file streams.---- Sorry decided to look at this instead. http://serenesforest.net/forums/index.php?showtopic=48196 it fixed my problem, which was open you hex editor and delete the last four bytes. Afterwards open rom in FEAdv and save and reopen and things should work fine and dandy. Sorry I'm just to make everything clear and put it all in one place so if others want to do this, that won't have to wait years in order to get things working.

FYI, this is due to a slight Nightmare/FEditor compatibility issue where saving the ROM in Nightmare causes it to become unrecognizable in FEditor. As you said, you can fix this simply by saving again in FEditor.

---e--- So the Spearmen Class 0x80 works perfectly. The next class Hector (F) 0x81 has problems. I promote a Trainee Soldier (3) into it and one the animation of changing doesn't play. And when I go to attack no animation plays at all. I changed the Paladin animation to the Hector (F) one to see if it is the animation, it isn't it plays fine. Yet won't work on my next custom class. I'm curious what I did wrong here, because I did basically the same thing I did with the Spearmen Class.

I don't think you did anything wrong, to be honest. The trainee classes are a little bit weird. You can change their promotion options, but if you change the "Trainee" option into something else you just get a black/glitchy screen for a moment and then they're promoted. It's not perfect, but the only way I know of to get around this it to change the trainee class itself into the new class. So if I want Ross to become a Mercenary, for example, I change the Journeyman (2) slot into what is basically a Mercenary. The animation should play correctly if you do that. It probably has a lot to do with the fact that Trainee classes are coded the way that they are, but interestingly enough, adding a third promotion to other units doesn't cause this problem so your guess is as good as mine.

Glad I could help!

Link to comment
Share on other sites

I'll reply more later, though most things seem to be solved. Lunch break. I have a sniper that turns into a hero and vice versa. If the Hero is holding the sword when changing, it will glitch out and you don't get to see anything and they turn. It doesn't seem to be the problem here though. Maybe the map sprites are incompatible, though I know nothing about map sprites. It can't be because Hector (F) holds an axe and the character use a spear instead. I'm not sure. When I get home I'll tinker more, just hoping to see if anyone else has the problem. It is the third class, no animation when changing and no animation when battling, and like I said, I can change the animation of the spearmen class to the new Hector one and works fine, it is just my new custom class 0x81 just doesn't work properly.

But yes, thank you. I'm going to compile everything in my first post, so others have an easier time doing this.

Link to comment
Share on other sites

I apologize, can you go through the steps and make an 81st class? I rebuilt the 81st class, changed the .nmm to 130. Changed .txt. And exact copies a current class to the 81st one, and still having problems. I am not sure what is wrong with it. The 80th is fine, the next one isn't. I don't think my array expanding went wrong if the 80th went right.

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...