lushen124

Member
  • Content count

    33
  • Joined

  • Last visited

Profile Information

  • Gender
    Male

Previous Fields

  • Favorite Fire Emblem Game
    Radiant Dawn

Member Badge

  • Members
    Micaiah

Recent Profile Visitors

811 profile views
  1. [FE7] Any information regarding map encoding?

    Ah ok. I'll start from there. Thanks a lot!
  2. Hi, I'm taking a second stab at doing another FE randomizer for FE7. I wanted to be able to move some units around randomly and also detect potential issues with scripting, but that requires some knowledge of the map layout that's in the game. I could hard code these values, but I'd prefer to reconstruct the maps in code so that it has some knowledge on how to handle that dynamically. I've found the pointers to the map data, but I'm unsure how to read it. I'm not sure what the first 5 bytes are, but I can guess that bytes 6 and 7 are referring to the dimensions (width and height, respectively). But after that, just taking the prologue map as an example (which starts at 0x36AF00), I've messed around with the hex there and I've gathered that it's using some kind of encoding that lets it specify multiple occurrences of a tile pattern within a single instance of a byte pair. For example, changing the hex at 0x36AF07 from B0 to another value will change not only the tile in the top left, but also two tiles near the mountains on the right side of the map, presumably because it's the same pattern being used. I'm just curious if there's any documentation on how this is encoded and how it could be decoded. I figure it must exist somewhere if the map insertion tools exist because they're presumably doing the same thing when encoding it.
  3. Universal GBA FE Randomizer v1.0

    Sorry for the long hiatus, been busy moving into a new house, but now that I have some time, there's an update available. You can see the first post for details (including a new link :)), but v1.1.0 is now available. The biggest change is that it has the ability to generate changelogs when randomizing so no more digging through Nightmare to see what exactly changed. It also fixes an issue that causes every unit to start with A rank weapons because the old logic of randomly increasing weapon ranks based on appearance time had the critical flaw of most characters showing up in game data several times even if they didn't join, so now it tries to carry over their highest weapon rank to their new class if their class has changed.
  4. [GBA FE] Decoding Text

    So I have it mostly working. I was able to decode text properly for FE7 and FE8. I tried it on TLP and it also pulled names out properly, so it seems like uncompressed data should work. However... I loaded up FE6 with the localization patch found here and I got back what seems like incorrectly encoded text (like UTF-16 surrogate pairs encoded as UTF-8) Is there something I'm missing? I'm looking at the hex, and the pointers there are marked as uncompressed (i.e. bitmasked with 0x80000000 or xx xx xx 88) so FEditor seems to just read from them directly, byte-for-byte, until it reaches a null 00 terminator, which is good, but then when I jump to the actual address, it doesn't look like ASCII/UTF-8. EDIT: Wait, I see what's going on, though I'd like an explanation. FE6 has codes to replace [0x82][0x??] with real characters. I can implement this, but I'm just curious why.
  5. [GBA FE] Decoding Text

    Oh, I didn't realize FEditor came with the code. Thanks, I'll look in there.
  6. [GBA FE] Decoding Text

    I know this is a solved problem via FEditor Adv, but how does one decode text from the ROM and make it readable? Presumably there is a table that's just pointers to text in the game somewhere, but I heard the text is encoded/compressed. How do I decompress/decode this into something readable? Maybe there's documentation archived somewhere about this? For context, I'm trying to add a feature to the randomizer that does changelog and will eventually need it to support fine-grained control on characters/class randomization (and hopefully have it support randomizing hacks properly).
  7. [FE7] AFEV not firing

    Sure, but that means that in the chapter you do turn it on, you always run the same code. e.g. If you have it in chapter 1 to spawn reinforcements defined at some offset, it will do the exact same thing in chapter 3 and any other chapter you turn it on. I ended up just moving more stuff around and allowing for more death quote entries in the table, so now I have Snag DQ for Ch. 1 specifically. If I use it again, I'd create another one for, say Snag DQ for Ch. 3, and it would point to a different event unique to Ch. 3. So now, I have this: So that the pointer to "death event" only fires in Chapter 1, and it points to event code in the Chapter 1 events. That aside, I found some more interesting quirks about Misc_events. I was running into some oddities trying to get the AREA code to work. I slapped it on the end of everything in the Misc_events and, for whatever reason, it just wouldn't fire. Then I wondered if there was a limit to how many things you can have in there, so I moved it up to the top (swapped positions with CauseGameOverIfLordDies) and now it works. The weird thing is that it still causes game over if the lord dies, so now I really don't know why it works now, unless the order of Misc_events is important. To be more explicit, this works: Misc_events: AREA HordeStarted BeginHorde [0,9] [14,29] // Crossing the line to the first clearing starts the horde. DefeatAll(AllEnemiesDefeated) AFEV 0x0 ResetBossDeathQuote 0x02 // After the first boss goes down, no other quotes play. We need to reset them. AFEV 0x0 IncrementCasualties PlayableCharacterDied // We mapped other deaths to 0x22, 0x65 is still the game over flag. CauseGameOverIfLordDies End_MAIN But this didn't (and still doesn't, I just checked): Misc_events: CauseGameOverIfLordDies DefeatAll(AllEnemiesDefeated) AFEV 0x0 ResetBossDeathQuote 0x02 // After the first boss goes down, no other quotes play. We need to reset them. AFEV 0x0 IncrementCasualties PlayableCharacterDied // We mapped other deaths to 0x22, 0x65 is still the game over flag. AREA HordeStarted BeginHorde [0,9] [14,29] // Crossing the line to the first clearing starts the horde. End_MAIN So it's possible the AFEV not firing was also due to an ordering issue... I'll have to retry that one again.
  8. [FE7] AFEV not firing

    Correct, any chapter means the events attached to it will fire off every chapter, but the problem is I may not want the same thing to happen every chapter. ;) Hence, if I go down this route, that's a snag for each chapter (and each snag is attached to 1 chapter). Not a huge problem, but just a pain (partially because I didn't allocate much more extra space for my table. :p) What I don't understand is that the other one in my example works. IncrementCasualties fires off properly when 0x22 is attached to real characters and ResetBossDeathQuote works when attached to the boss's 0x2 death event, and the event code runs in both of those cases. Yet, 0x23 for whatever reason doesn't. If this method didn't work I expected the DQ table to not have been accessed instead of AFEV not working, but instead, now it's AFEV that's not triggering, and the death quote works just fine. >_< EDIT: I'll just deal with it when the time comes. I'll just lock this entry to Ch. 1. If somebody still wants to chime in, feel free (because I still prefer AFEV if possible). But for now:
  9. [FE7] AFEV not firing

    So I'm seeing some flakiness with AFEV not always firing for me. I'm trying to make it so that I get an event triggered when one of the snag's in my chapter are destroyed, which I can do by making a "death quote" for the snag "unit" in the death quote table. This allows me to add a pointer and a eventID to trigger when it happens. Right now I'm using event ID 0x23 and some random guy's death quote event to test. So in Nightmare, I have this: In my events, I have this snippet: Misc_events: CauseGameOverIfLordDies DefeatAll(AllEnemiesDefeated) AFEV 0x0 ResetBossDeathQuote 0x02 // After the first boss goes down, no other quotes play. We need to reset them. AFEV 0x0 IncrementCasualties 0x22 // We mapped other deaths to 0x22, 0x65 is still the game over flag for Lords. AFEV 0x0 SnagKill 0x23 // Going to experiment with this one. Does killing Snag cause an event to be fired? End_MAIN ... SnagKill: ENUF 0x23 // Unset the flag so that it can trigger again (there's 2) // Log a debug message for now. TEX6 0x5 [0,0] 0x054E // Display "Snag" in a yellow box _ASM0x42 0x83181 ENDA So, the good news is that when destroying the snag, the random guy's death quote does go off, which means that I should be able to get the AFEV to fire, but it doesn't, for some reason. I know this becuase A) the debug log doesn't show up after the death quote and B) the second snag broken doesn't show the death quote (meaning the event ID did trigger and ENUF wasn't hit) and C) if I break the second snag first, the death quote still plays, so both snags look at the same DQ entry. Yes, I can just put the code I want in the pointer to the death event, but that means I need to create a new snag unit death quote for every chapter I do this in, which is a pain. So is there something I'm missing about AFEV that I should know? I've found some event IDs that I know just don't work properly (presumably because they're used by the game in some unknown way) including 0x50, 0x51, 0x52, 0x64 (presumably everything between 0x52 and 0x64 too). I also found that anything above 0xA5 (or at least 0xA5 - 0xB1) doesn't actually carry over between chapters, unfortunately (and I think 0xA7 or something actually just flat out doesn't work). I'm aware of the big chunk used by the game for future events between 0x66 and 0x9D, so I'm trying to avoid touching those, since I'm only messing with Lyn mode at the moment.
  10. Universal GBA FE Randomizer v1.0

    You are correct. Growths are stored as unsigned integers (0 - 255). I'm pretty sure the nightmare module is incorrectly interpreting it as a singed integer (-128 - 127). And the randomizer should already be taking that into account, so the highest possible growth is 255. As for why it can't be signed, Lamia had a good example, but specifically in FE8, look at Myrrh's growths. A signed integer couldn't hold her HP or DEF growth properly (130% and 150%, respectively). The reason why the enemies are pretty poor is because classes have pretty crappy bases and pretty horrid growths for the autoleveling routine.
  11. I think I heard the trainees were hard coded, so I wouldn't get your hopes up on Ewan promoting properly. Actually, due to the logic of handing out classes, Ewan might still be tier 0 (instead of tier 1 (i.e. trainee (2)) that I normally give out to everybody else) so he's probably never promoting until potentially Ch. 17, and even then, he might be forced into Eirika Great Lord. I need to look into the weapon ranks. I realized I didn't even set up ranks for anything past FE6, so I added them in later, though maybe I was a bit too hasty in that. I'll have to revisit that when I have time.
  12. Universal GBA FE Randomizer v1.0

    Updated the first post, but v1.0.1 is now available. Some minor fixes and a new option for class randomization since it was asked for. :) Added logic to make sure legendary weapons don't show up prematurely. Updated logic for movement costs to only update them for classes of units that need them (FE6: Miledy and Gale, FE7: Fiora and Farina, FE8: Glen and Valter). Removed Enemy Buff: At least Amount. Added Cross Gender option when randomizing classes. Fixed an issue where FE8 monster weapons were getting 1-2 range causing crashes. Fixed an issue where FE8 wasn't determining an appropriate promoted class for trainees (should only affect random recruitment). https://github.com/lushen124/Universal-GBA-FE-Randomizer-Windows/blob/master/GBA%20FE%20Stat%20Randomizer/GBA%20FE%20Stat%20Randomizer/bin/Release/GBA%20FE%20Randomizer%20v1.0.1.zip
  13. Universal GBA FE Randomizer v1.0

    Tutorial characters aren't part of the random recruitment because then it'd be possible to have double characters (i.e. Kent and Tutorial Kent). This applies to Lyn, Sain, Kent, Wil, Florina, and Rath, I think.
  14. Universal GBA FE Randomizer v1.0

    The trainee issue is something I'm actually not sure how to solve. I dug through a little bit of ASM to look at it, but I haven't found anything yet. I thought it might be hard coded to look for a specific character ID and a specific class ID, but I didn't find such a routine in the ASM, so I don't have any other ideas at the moment. Or maybe there's a table hidden somewhere for those three characters that hasn't surfaced yet. I don't think there's anything in the nightmare modules that cover this. So I'll have to look for it some more when I have time.
  15. Universal GBA FE Randomizer v1.0

    It's possible, but the randomizer doesn't look at shop data right now. (Random shops? lol) It shouldn't be too hard to add unless it's already reached its limit on number of items sold, which I don't remember what it is.