plusplus Posted August 16, 2016 Share Posted August 16, 2016 I recently tried to add a few extra enemies to the Prologue chapter in FE8. I copied all the enemy data starting from the offset 8B3C14 (the original prologue units' offset) until the end of the list (6 units total x 20 bytes each) and moved them to a new spot, then I added two extra enemies to the end of the list (2 x 20 bytes). I did a search in the hex editor to replace all instances of the original offset (14 3c 8b 08) with my new offset. I'd expect these would complete the move from the old table to the new one. However, when I start up the emulator with the new ROM: 1. no new enemies were added (I think this might have something to do with the REDA values, which I'm not too familiar with), but more importantly... 2. it seems the game is still loading the data from the old enemy list; if I tried to change the boss's weapons in the new extended list, the change is not picked up, but if I make the change at the old offset, then the change is reflected I couldn't figure out why this was the case, especially after I've replaced all the old pointers to point to the new list. Is there some other values I need to change to get this to work? Thanks in advance! Quote Link to comment Share on other sites More sharing options...
CT075 Posted August 16, 2016 Share Posted August 16, 2016 This may sound like a dumb question, but does it look like there are any extra enemies being loaded in the cutscene before the map? Quote Link to comment Share on other sites More sharing options...
plusplus Posted August 17, 2016 Author Share Posted August 17, 2016 This may sound like a dumb question, but does it look like there are any extra enemies being loaded in the cutscene before the map? Thanks for the reply! I just redid the process of copying and repointing. It still wasn't working. It didn't seem like anything was out of place in the cutscene. I also tried disassembling the prologue events header table to double check. It had a line like this: ORG $E4A874 Units1: _0x0000 Where E4A874 is the address of my new prologue units list. It seems like IT IS pointing to the right place, but I don't get why it doesn't pick up any changes...urrrgg Quote Link to comment Share on other sites More sharing options...
marlon0024 Posted August 17, 2016 Share Posted August 17, 2016 (edited) Umm why dont you let the event assembler do it? Unless im wrong(wich is very posible) You dissaemble a Units list in a wordpad right? Then write your new units in the text file, just change the offset where the $ is, and just assemble your chapter...Unless FE8 does it differently of course... Edit: If i remember correctly, sometimes you must reppoint almost all the data that is behind the data you just reppointed, same happened to me when i tried to add new conversations on a chapter, reppointed only one part and the game ignored it...the reppointed everything else, or another way i did, was reppoint what was next, so i had more space...But that sometimes wrecks the chapter...you better reppoint it all... Edited August 17, 2016 by marlon0024 Quote Link to comment Share on other sites More sharing options...
plusplus Posted August 17, 2016 Author Share Posted August 17, 2016 (edited) Umm why dont you let the event assembler do it? Unless im wrong(wich is very posible) You dissaemble a Units list in a wordpad right? Then write your new units in the text file, just change the offset where the $ is, and just assemble your chapter...Unless FE8 does it differently of course... Edit: If i remember correctly, sometimes you must reppoint almost all the data that is behind the data you just reppointed, same happened to me when i tried to add new conversations on a chapter, reppointed only one part and the game ignored it...the reppointed everything else, or another way i did, was reppoint what was next, so i had more space...But that sometimes wrecks the chapter...you better reppoint it all... Uhhh...Well, I'm not too familiar with EA yet. I tried disassembling the prologue units list by giving it the original offset and specifying the length based on the values in the .nmm , but I got some errors. The only thing I can disassemble successfully right now is the events header table (which isn't very useful). Maybe when I have time tmr, I'll go take a look at EA again. As for repointing the data, I did a global search and replace inside the hex editor, so there should be nothing else pointing to the original offset. I'm not sure what you mean by "repoint what was next", could you please elaborate? Edited August 17, 2016 by plusplus Quote Link to comment Share on other sites More sharing options...
Deltre Posted August 17, 2016 Share Posted August 17, 2016 Hoo boy, that sounds like a lot of hassle haha. Although I believe that process should work in theory, EA is just so much easier to deal with in my opinion, and there's much less room for error once you understand what you're looking at. So here's a breakdown of what to looking for in EA instead. The first thing I'm going to recommend is that you reassemble the entire chapter together instead of just the unit list. While that will work (usually) I've had some strange reactions before such as units not loading, cutscene corruption, etc. where as by reassembling the entire chapter I can be more confident that things will work as planned. This is particularly true if you want to start messing with other things besides the Unit List, but that's just my preference. Okay so you've got the offset of the chapter you want to disassemble (in this case $9E863C), and you've disassembled it with EA into a text file. If you follow my advice to reassemble the whole chapter I recommend that you move the Pointers List to the top of the file like so ////////////////////////////////////////////////////// //// Disassembled with Nintenlord's Event Assembler //// Version: 9.10.4713.28131 //// Game: FE8 //// File: FE8LRV.2.gba //// Offset: $9E863C //// //////////////////////////////////////////////////////ORG $B391A0//This should be free space in you ROMPointerList:POIN TurnBasedEventsPOIN CharacterBasedEventsPOIN LocationBasedEventsPOIN MiscBasedEventsPOIN Dunno1 Dunno2 Dunno3 TutorialPOIN Traps1 Traps2POIN Units1 Units1POIN $0 $0 $0POIN $0 $0 $0POIN BeginningScene EndingScene Then you'll want to scroll down a bit until you find the until you see the enemy unit list. Units1 is to the best of my knowledge reserved for player units, so it'll be something like labelXX. For the prologue, it looks like this label36: UNIT 0x68 0x3F 0x0 0x24 [14,8] 0b 0x0 0x1 0x8B3BFC [0x20,0xBD,0x0,0x0] [0x0,0x12,0x0,0x0]UNIT 0x82 0x3F 0x0 0x14 [14,7] 0b 0x0 0x1 0x8B3C04 [0x1F,0x0,0x0,0x0] [0x0,0xA,0x0,0x0]UNIT 0x80 0x3F 0x0 0x14 [14,7] 0b 0x0 0x1 0x8B3C0C [0x1F,0x0,0x0,0x0] [0x0,0x12,0x2,0x0]UNIT 0x82 0x19 0x0 0xD [14,7] 0b 0x0 0x1 archer [0x2D,0x0,0x0,0x0] [0x0,0x12,0x0,0x0]UNIT You can see that I've already added an archer to the list, but FE8 is a little weird sometimes when you just throw a unit into a pre-existing list, even when you've moved everything to a place with ample free space. Let's look at just one unit. UNIT 0x68 0x3F 0x0 0x24 [14,8] 0b 0x0 0x1 0x8B3BFC [0x20,0xBD,0x0,0x0] [0x0,0x12,0x0,0x0] UNIT tells the game that this is well...a unit. The next four bytes (in order) are Character ID, Class ID, Leader (I believe anyways, I never use it and this is usually 0x0), and Level. Following that, we have the co-ordinates on the map where this unit will appear (this is the initial position by the way). The next byte is basically a flag that tells the game if the unit in question has any kind of special behavior associated (such as drop last item, randomized placement for skirmishes/tower, etc.). This is followed by two bytes that I am unsure of off the top of my head. Following that is a pointer to a unit's REDA (REinforcement DAta) which will be very important, but I will come back to that. Not every unit will have REDA, but you should take note of it in Unit Labels that do. The remaining eight bytes are the unit's inventory (first four), followed by their AI behavior (last four). For the sake of my example let's say this is the only unit in the chapter. I relay this information to the game by putting another UNIT at the end of my unit list label36: UNIT 0x82 0x19 0x0 0xD [14,7] 0b 0x0 0x1 archer [0x2D,0x0,0x0,0x0] [0x0,0x12,0x0,0x0] UNIT like so. As for the REDA, I'm guessing that this may be the reason that you're not having any success with your own method. Let's look at the archer I added. UNIT 0x82 0x19 0x0 0xD [14,7] 0b 0x0 0x1 archer [0x2D,0x0,0x0,0x0] [0x0,0x12,0x0,0x0] So if we take this Archer's co-ordinates at face value, we would assume that he appears on the map at [14,7]. Already there's a problem, as he shares this position with two other units! However, if you load the game up, you'll see that in reality he's standing at [12,9] in battle. First he appears at [14,7] as seen in the cutscene, then moves to the position defined by his REDA, in this case, [12,9]. Now, the reason I'm giving this part so much detail is that in my experience, adding more units to a list that has REDA means that you must also assign REDA for any new units. I haven't really found a way around this, as even under a separate label for new units the game still seems to requires REDA even if the initial position is going to be the same as the REDA position, but I digress. Fortunately the REDA itself is very simple. archer://can be any name within reason, must match the units REDA pointerREDA [12,9] 0x0 0x0 0x0 0x0 There's not really much to explain. All we really have is the label name (archer), the command (REDA), and the coordinate [12,9]. Following that we have four bytes that I don't really remember; look at a dedicated tutorial if you have to know but it's nothing too crucial for what you're trying to do. Hopefully that will at least get you started man :D Also, it's worth knowing that everything I said about REDA's only applies if there's at least one pre-existing REDA pointer on that particular unit list. If there's no REDA to begin with, you can just add units freely and their assigned coordinates will work properly. It's a mystery Quote Link to comment Share on other sites More sharing options...
plusplus Posted August 18, 2016 Author Share Posted August 18, 2016 (edited) Then you'll want to scroll down a bit until you find the until you see the enemy unit list. Units1 is to the best of my knowledge reserved for player units, so it'll be something like labelXX. For the prologue, it looks like this label36: UNIT 0x68 0x3F 0x0 0x24 [14,8] 0b 0x0 0x1 0x8B3BFC [0x20,0xBD,0x0,0x0] [0x0,0x12,0x0,0x0] UNIT 0x82 0x3F 0x0 0x14 [14,7] 0b 0x0 0x1 0x8B3C04 [0x1F,0x0,0x0,0x0] [0x0,0xA,0x0,0x0] UNIT 0x80 0x3F 0x0 0x14 [14,7] 0b 0x0 0x1 0x8B3C0C [0x1F,0x0,0x0,0x0] [0x0,0x12,0x2,0x0] UNIT 0x82 0x19 0x0 0xD [14,7] 0b 0x0 0x1 archer [0x2D,0x0,0x0,0x0] [0x0,0x12,0x0,0x0] UNIT Thanks! I actually wasn't able to find the UNIT list when I disassembled mine. This is what I have: //////////////////////////////////////////////////// // // // Disassembled with Nintenlord's Event Assembler // // Version: 9.10.4713.28131 // // Game: FE8 // // File: SacredStones.GBA // // Offset: $9E863C // // // //////////////////////////////////////////////////// ORG $592104 label20: EVBIT_MODIFY 0x4 ASMC 0x85375 ENDA //The next line is for re-assembling purposes. Do not delete! MESSAGE Original ending offset is $592114 and the new ending offset is CURRENTOFFSET ORG $8B3C14 Units1: _0x0000 //The next line is for re-assembling purposes. Do not delete! MESSAGE Original ending offset is $8B3C28 and the new ending offset is CURRENTOFFSET ORG $9E858C TurnBasedEvents: TURN 0x0 label15 [1,0] 0x8 TURN 0x0 label16 [2,0] 0x0 TURN 0x0 label17 [3,0] 0x0 TURN 0x8 label18 [1,255] 0x8 END_MAIN CharacterBasedEvents: END_MAIN LocationBasedEvents: END_MAIN MiscBasedEvents: AFEV 0x3 EndingScene 0x2 AFEV 0x7 label19 0x0 AFEV 0x0 label20 0x65 END_MAIN Dunno1: END_MAIN Dunno2: END_MAIN Dunno3: END_MAIN Tutorial: _0x0000 //The next line is for re-assembling purposes. Do not delete! MESSAGE Original ending offset is $9E8600 and the new ending offset is CURRENTOFFSET ORG $9E863C PointerList: POIN TurnBasedEvents POIN CharacterBasedEvents POIN LocationBasedEvents POIN MiscBasedEvents POIN Dunno1 Dunno2 Dunno3 Tutorial POIN Traps1 Traps2 POIN Units1 Units1 POIN $0 $0 $0 POIN $0 $0 $0 POIN BeginningScene EndingScene //The next line is for re-assembling purposes. Do not delete! MESSAGE Original ending offset is $9E868C and the new ending offset is CURRENTOFFSET ORG $9ED9A8 Traps1: ENDTRAP //The next line is for re-assembling purposes. Do not delete! MESSAGE Original ending offset is $9ED9A9 and the new ending offset is CURRENTOFFSET ORG $9EDE99 Traps2: ENDTRAP //The next line is for re-assembling purposes. Do not delete! MESSAGE Original ending offset is $9EDE9A and the new ending offset is CURRENTOFFSET ORG $9EEBE8 BeginningScene: _0x0A40 SVAL 0x2 0x89EF1BC _0x0A40 CHECK_TUTORIAL BNE 0x0 0xC 0x0 ASMC 0xCF461 LABEL 0x0 _0x0229 _0x2C40 0x1 ENUN SVAL 0x1 0xD SET_HP 0x2 CUMO 0x1 STAL 60 CURE MUNO SVAL 0x2 0x1D SVAL 0x3 0x90D _0x0A40 MUSI MOVE 0x18 0x2 [4,4] ENUN CUMO 0x2 STAL 60 CURE TEXTSTART TEXTSHOW 0x90E TEXTEND REMA SVAL 0x2 0x89EF27C _0x0A40 _WARP 0x0 0x1 [4,5] ENUN _0x0A40 _0x0A40 EVBIT_T 0x7 ENDA //The next line is for re-assembling purposes. Do not delete! MESSAGE Original ending offset is $9EECBC and the new ending offset is CURRENTOFFSET ORG $9EF0D8 label19: CHECK_ENEMIES SVAL 0x7 0x1 BNE 0x0 0xC 0x7 CUMO 0x2 STAL 60 CURE TEXTSTART TEXTSHOW 0x913 TEXTEND REMA _0x0221 GOTO 0x1 LABEL 0x0 CHECK_EVENTID SADD 0xC2 ENUF_SLOT2 LABEL 0x1 EVBIT_T 0x7 ENDA label18: MUSC 0x13 TEXTSTART TEXTSHOW 0x914 TEXTEND REMA CHECK_TUTORIAL BNE 0x0 0xC 0x0 SVAL 0x1 0x0 CHAI 0x68 LABEL 0x0 EVBIT_T 0x7 ENDA EndingScene: MUSC 0x31 SVAL 0x2 0x1D _0x0A40 TEXTSHOW 0x918 TEXTEND FADI 16 REMA _0x0229 _0x0229 _0x0229 _0x0229 _0x0229 _0x0229 _0x0229 _0x0229 _0x0229 _0x0229 _0x0229 MNC2 0x1 ENDA //The next line is for re-assembling purposes. Do not delete! MESSAGE Original ending offset is $9EF1BC and the new ending offset is CURRENTOFFSET ORG $9EF214 label15: SVAL 0x2 0x89EF0A4 _0x0A40 SVAL 0x2 0x89EF3B4 _0x0A40 EVBIT_T 0x7 ENDA label16: SVAL 0x2 0x89EF3D8 _0x0A40 EVBIT_T 0x7 ENDA label17: SVAL 0x2 0x89EF610 _0x0A40 SVAL 0x2 0x89EF670 _0x0A40 EVBIT_T 0x7 ENDA //The next line is for re-assembling purposes. Do not delete! MESSAGE Original ending offset is $9EF27C and the new ending offset is CURRENTOFFSET I used the offset for the prologue and I checked the option to disassemble the "Whole chapter". I've also tried the same thing with a clean ROM, but I got the same thing as what I posted above. Now that I've seen what the disassembled output should look like with the UNITS list, it seems like my output file is missing some stuff. Have you seen this before or am I an idiot who can't even use a simple UI correctly (lol)? Edited August 18, 2016 by plusplus Quote Link to comment Share on other sites More sharing options...
Deltre Posted August 18, 2016 Share Posted August 18, 2016 Interestingly enough, I went back and tried to disassemble the prologue to a fresh text file (the initial one I posted was from long ago), when lo and behold I encountered the same thing! But when I reverted to a previous revision of EA (the one you are using, ironically) it outputted the files correctly. I honestly haven't the slightest idea what may be causing this, all I can really recommend is that you try to re-download EA and try again. I'd be interested to know if anyone has insight to this issue, I have an entire folder of nearly every chapter's events and have never seen this before haha. Quote Link to comment Share on other sites More sharing options...
plusplus Posted August 19, 2016 Author Share Posted August 19, 2016 (edited) Interestingly enough, I went back and tried to disassemble the prologue to a fresh text file (the initial one I posted was from long ago), when lo and behold I encountered the same thing! But when I reverted to a previous revision of EA (the one you are using, ironically) it outputted the files correctly. I honestly haven't the slightest idea what may be causing this, all I can really recommend is that you try to re-download EA and try again. I'd be interested to know if anyone has insight to this issue, I have an entire folder of nearly every chapter's events and have never seen this before haha. Awesome! Thanks dude! Finally got it working. So apparently the version that I had was V10, the latest one, which also didn't work for you (even though on the disassembled file it says it was still V9.10). I went back and downloaded V9.12 and now it works :) Seems like the latest version has some issues... Edited August 19, 2016 by plusplus Quote Link to comment Share on other sites More sharing options...
Crazycolorz5 Posted August 19, 2016 Share Posted August 19, 2016 That's odd; I didn't touch the disassembly section... I'll look into it I guess. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.