[WIP] Fire Emblem Fates Randomizer

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by thane98, Dec 7, 2016.

Dec 7, 2016
  1. thane98
    OP

    Member thane98 GBAtemp Fan

    Joined:
    Apr 23, 2016
    Messages:
    363
    Country:
    United States
    [​IMG][​IMG][​IMG]

    This tool allows you to randomize character classes and join order for Fire Emblem Fates. However, this randomizer goes a bit further than making simple gameplay changes - all cutscenes in the game are modified to follow the new join order. So if a character switches places with another, they will essentially take their place in the story. For example, if Selena switched places with Hinoka in Revelation, she would appear in Hinoka's place for every cutscene in Revelation. As of beta 4, the randomizer also allows for randomization of parent/child combinations. In addition to join order changes, the randomizer also includes basic support for randomizing character stats, skills, and join items.

    The tool is still a work in progress - while certain chapters have been tested thoroughly, others have yet to be examined. Therefore, you may run into bugs or glitches throughout a randomized playthrough. If you run into any issues or notice any cutscenes where a character's replacement does not appear as expected, please report the issue so that it can be fixed for the next version.

    This tool requires an up to date version of Java (Java 8+).

    You can find more screenshots of the randomizer's results here.

    Download: link

    Patching:
    If you don't know how to run ROM hacks on your 3DS I'll give you a short break down on some of the methods for running them as well as how to gain homebrew access below. Keep in mind that homebrew entry points change drastically between firmware updates, so the methods I list below may become outdated in the future. If you want to keep homebrew access on your 3DS, I advise looking at community sources to see whether or not your entry point works on the latest version before updating your 3DS.

    Please note that homebrew programs do not always play well with digital versions of Fates. I advise attempting to run Fates through HANS at least once before going through the process of dumping and randomizing your game to ensure that it works correctly.

    Getting Homebrew Access: There are three methods for running ROM hacks: HANS, NTR, and Luma. I've included instructions for NTR and HANS below. Currently, you can set up either way of running hacks from a stock 3DS. NTR is the most convenient way to run ROM hacks, but requires you to install custom firmware first. If you want to avoid headaches in the long run and are fine with some initial setup, you can follow Plailect's guide to setup custom firmware. Given the availability of methods for setting up arm9loaderhax and custom firmware right now, I highly recommend going with this option.

    If you don't want to go through the setup to run hacks through NTR, your other options is HANS. For HANS, just download soundhax from here, and the homebrew launcher as well as the appropriate payload for your 3DS from this link. Place the contents of the files on your SD card, load up the sound player on your 3DS, and play the file that came with soundhax. You'll end up in the homebrew launcher if placed the files on the SD card correctly. From there, you can proceed to the directions for HANS in order to play your randomized game.

    For both HANS and NTR: Use this version of this version of braindump to dump your Fates ROM. Once braindump is done, take the romfs file from the dump and use romfs extractor to extract the files from the romfs. From here, you can follow the instructions listed below to randomize your ROM. Before you do though, I advise making a copy of either the romfs you dumped or the extracted files just in case anything goes wrong.

    HANS: When you're done randomizing your files, drag them back into the folder with the files extracted from the romfs and overwrite the original files. If you did not get a prompt asking you if you'd like to overwrite, chances are you forgot to recompress your files using FEAT after randomizing. Once everything's done overwriting, use romfs builder with the folder containing your ROM files to rebuild the romfs. Create a folder called HANS at the root of your 3DS's SD card and place the recompiled romfs inside of it. Rename your romfs to the last 8 characters of your version's ID. For braindump, this should be the last 8 character of the name of the dumped romfs. For example, 00179400.romfs would be the correct filename for US birthright. Open up homebrew on your 3DS, navigate to HANS, run Fates through it, and set the romfs option to load the romfs from the SD. Enjoy your randomized game!

    NTR: If you haven't installed NTR on your 3DS yet, do that first. I highly recommend using this version of NTR as it supports the latest firmware versions. Once you've followed the randomization instructions and recompressed your randomized files, download the Same-Sex expansion and copy the NTR version for your copy of Fates to the root of your SD card (you should have a "plugin" folder on the root of your SD card when all is said and done). If you don't want the contents of the patch, just delete everything from the other folder that came with the plugin (the birthright/conquest/fefatesSE folder). Afterwards, copy the randomized files into the birthright/conquest/fefatesSE folder. From there all you have to do is run NTR on your 3DS then run your copy of Fates. Keep in mind that you will need to run NTR every time you start your 3DS if you want to play with the randomized files. Enjoy!

    Installation:
    Instructions

    Changelog:
    Beta 4
    Beta 3
    Beta 2

    FAQ:

    When I dumped my game, I only received one path even though I own the others as DLC. Why did this happen, and how can I fix it?

    DLC has to be dumped separately from the base game. Modifying it requires the installation of custom firmware. You will then need to use a tool like Decrypt9 to dump the DLC paths. You can then randomize the DLC paths by including their content in the randomizer folder for randomization and pulling the content back out afterwards. Finally, you can create an installable CIA for the DLC using something like ctrtool. Install that on your 3DS and you should be good to go.

    I'm trying to randomize a European version of Fates. The randomizer says that I'm missing a file in the "m" folder, but I'm confident that I dumped everything correctly. What is going on?

    Every region uses a different layout for the text files, unfortunately. The randomizer lacks support for the European version currently, but there's an easy fix to get the tool to read your text files correctly. Simply go into the "m" folder in the files you want to randomize and find the folder for your language (@U for the English version). Rename this to @E, and do the the same for the folder for your language in the folder for the path you want to randomize ("m/A" for Birthright, "m/B" for Conquest, and "m/C" for Revelation). The randomize should detect your folders and allow you to randomize everything like normal. Once you're done randomizing, simply rename the files back in order to use them in game.

    The file verification window said that everything verified, but I didn't get an options window!

    Update your version of Java. The options window uses some features from Java's more recent versions, so the window will fail to open if you're version isn't up to date.

    Troubleshooting:
    As this randomizer is still a work in progress, you may encounter bugs or glitches while using it. At this point you shouldn't encounter any serious issues like crashing, but if you do, the procedure for stopping the issues is fairly simple. First, you need to identify which chapter the issue occurs on so that you can find its files. If the issue occurs on Birthright Chapter 10, for example, the file name you'll be looking for is A010. From there, you'll need to replace files from your patch with the original files until the issue is resolved. First you should try removing all files in Scripts/bev that start with the chapter prefix. So for this example you'd delete every files in Scripts/bev that starts with A010. If that fails to fix the issue, delete the map script, which is named after the chapter (Scripts/A010.cmb in the example). If the issue persists, navigate to GameData/dispos and delete the dispo file (once again, A010.bin if you're looking at the example). That procedure should fix any issue you encounter while using the randomizer. Make sure to report your issue and the chapter it occurred on so that it can be fixed!

    As always, I want to thank a couple people who helped make this tool a reality:

    RainThunder for his nightmare modules and wiki which helped with setting up GameData and Person file randomization.
    DeathChaos25 for his original randomizer and general contributions to the 3DS Fire Emblem hacking community.
    Dylos for the inspiration to make the tool as well as his efforts to help with testing more unstable versions of the randomizer.
    SciresM for his archive tool, FEAT.
     
    Last edited by thane98, Jan 15, 2017 at 5:25 PM
    Darukeru, Seriel, Kobazco and 10 others like this.


  2. Swift Red

    Newcomer Swift Red Newbie

    Joined:
    Feb 22, 2016
    Messages:
    5
    Country:
    Canada
    You are amazing.
     
    Last edited by Swift Red, Dec 7, 2016
  3. Dylos

    Member Dylos GBAtemp Regular

    Joined:
    May 13, 2016
    Messages:
    198
    Country:
    United States
    Did you manage to get a fix for internal levels in to make sure everyone can gain proper xp at the point they are recruited?
     
  4. thane98
    OP

    Member thane98 GBAtemp Fan

    Joined:
    Apr 23, 2016
    Messages:
    363
    Country:
    United States
    I forgot to mention that one. Yes, internal levels should be fixed now.
     
    FlappyFalco and Dylos like this.
  5. Grima

    Member Grima GBAtemp Regular

    Joined:
    Jul 2, 2016
    Messages:
    102
    Country:
    United States
    Out of curiosity, would it be possible to randomize the game to include the custom DLC characters in it as well? Or would it not be possible due to the way the tool does the randomizing and the dlc characters files that allow them to be playable not being in the Rom prevent that?
     
  6. thane98
    OP

    Member thane98 GBAtemp Fan

    Joined:
    Apr 23, 2016
    Messages:
    363
    Country:
    United States
    It would be easy to add them in to the randomizer using their PIDs, but I don't know how well it would work in game.
     
  7. Dylos

    Member Dylos GBAtemp Regular

    Joined:
    May 13, 2016
    Messages:
    198
    Country:
    United States
    You could include the option of adding Anna, since she's in the base code at least. (of course the problem with adding Anna or a custom DLC character into the mix is that will ultimately make 1 less character available.)

    Additionally, I think I found a bug, though not anything gamebreaking - Leo replaced Jakob this time around, but he did so as a Troubadour, which is of course an unpromoted class. I don't consider this too much of an issue for me personally since it was still a very early game healer (though the other bad thing here is since secondary classes are not randomized, Leo's class set is now Troubadour/Troubadour) but Jakob should be getting replaced with a promoted unit. I just checked my output file and it seems Felecia is switched with an unpromoted unit as well.

    More on the note of me getting unlucky and having Leo randomize into his secondary class, would it be possible for you to add an option that randomizes secondary classes as well?

    Edit: Keaton replaced Kaze, but his level is off, Keaton is level 15 in chapter 4.
    Edit2: For some reason, Keaton (Kaze) didn't teach me about trading in chapter 4, and I cannot trade. Edit4: I can trade in chapter 5.
    Edit3: Peri's (replaced Hanako) model didn't load in chapter 4 after the map, she was instead a hooded figure.
    Edit5: Post chapter 5, Subaki (replaced Takumi) is a hooded figure as well, also pre-chapter 5 hung when the royal siblings came in. Additionally, Post-chapter 5 when Azura gives Corrin the dragonstone, she is not replaced.
    Edit6: Laslow was randomized into Frederick's spot, but for some reason he's classed wrong. He joined as a Hoshido Noble, yet his reclass option seems to imply he was supposed to be a paladin. additionally he can't reclass into a great knight.
     
    Last edited by Dylos, Dec 8, 2016
  8. thane98
    OP

    Member thane98 GBAtemp Fan

    Joined:
    Apr 23, 2016
    Messages:
    363
    Country:
    United States
    Yeah, there's no real way to address the problem of character removal. However, I'm fine with adding in an option for Anna and potentially an option for the custom DLC characters (this would require you to install the custom DLC first, obviously). As for the other issues:
    • I forgot to document the change to Jakob/Felicia. I need to test this again, but when they were treated as promoted units you'd typically end up with a ridiculously strong unit in their place for Chapter 2/3, so I had the randomizer treat them as unpromoted. I might add in an option for this so that you can choose which pool of classes the randomizer picks from for them.
    • I put something in place to switch levels, but I forget if it made its way into the release build. If it didn't I'll put out a hotfix with level switching added in sometime soon.
    • I actually haven't heard about the issue with chapter 4. I'll look into it and see what turn's up.
    • Model swapping still doesn't work in every instance unfortunately. I got it to a point where most models swap and no crashes occur, but it's still not perfect.
    • The hooded figures are another side effect of model swapping still not being 100% complete. I'm looking into this, but for the moment you may encounter hooded figures in cutscenes.
    • I think the hang in chapter 5's cutscene is also an issue with some models not swapping correctly. I'd like to identify the source of this issue before the next release. This one can be skipped at least.
    • Not sure what you mean here. Did you mean Gunter instead of Frederick? If so, which class appeared in the output file for Laslow? The reclass option might be an issue - fortunately, fixing a bad reclass option should be a quick fix if that's all it is.
    • I'd like to add randomization for reclass options into the next update if possible. The algorithm for class randomization is already there, so adding it in shouldn't take too long.
    I can't really give a definite date on when I'll post the next update, as I'm probably going to take a break from working on it for a couple days depending on how I'm feeling. I've got a couple of experimental features that I'd also like implement (potential join order swapping with the MU, for example), but I need to see how well they work in game. Anyways, thanks for the feedback. I'll try and fix what I can before the next update.
     
  9. Dylos

    Member Dylos GBAtemp Regular

    Joined:
    May 13, 2016
    Messages:
    198
    Country:
    United States
    yea, I meant Gunter, I confuse Gunter since he's so bland. Anyway the output file says he's a Hoshido Noble, I think his origin class is the issue here as I suspect it's set to paladin, I'll check later.
     
  10. thane98
    OP

    Member thane98 GBAtemp Fan

    Joined:
    Apr 23, 2016
    Messages:
    363
    Country:
    United States
    Yeah, go ahead and check what class Laslow is set to using the nightmare modules. It should be set to something like Hoshido Noble on class 1 with Nohr Prince in class 2 if I remember correctly. If not, I can try and implement a fix for that.
     
  11. Dylos

    Member Dylos GBAtemp Regular

    Joined:
    May 13, 2016
    Messages:
    198
    Country:
    United States
    Class 2 says paladin.
     
  12. thane98
    OP

    Member thane98 GBAtemp Fan

    Joined:
    Apr 23, 2016
    Messages:
    363
    Country:
    United States
    I took a look at how the class IDs are arranged, and I found the issue. Implementing a fix right now.
     
  13. KunoichiZ

    Member KunoichiZ GBAtemp Psycho!

    Joined:
    Mar 16, 2012
    Messages:
    4,426
    Country:
    United States
    So to use this with NTR, do we just place the generated files (after the randomization) in the fefatesSE (or whatever it's called for BR/CQ) folder and boot NTR?
     
  14. Dylos

    Member Dylos GBAtemp Regular

    Joined:
    May 13, 2016
    Messages:
    198
    Country:
    United States
    You'll need the layeredfs file or whatever from the gay fates, but yes

    Edit: Another bug, enemies in Rev chapter 7 are not switched on the map, though they are in dialogue. Edit3: Chapter 8 is the same way.
    Edit2:Mozu isn't randomized?
     
    Last edited by Dylos, Dec 8, 2016
    KunoichiZ likes this.
  15. KunoichiZ

    Member KunoichiZ GBAtemp Psycho!

    Joined:
    Mar 16, 2012
    Messages:
    4,426
    Country:
    United States
    So wait...You can't get Izana in Revelation, yet the output.txt file states that, in my case, Fuga takes Izana's place (in which the output file says Chapter: Join, but Izana does spoilery things in Revelation), so does that mean I won't get Fuga (who I don't care for at all)?

    What does A013 mean? For example, my Camilla is now a Merchant and the file says she appears in A013 and replaces Scarlet. Does that mean she appears where Scarlet appears in Chapter 13 (and subsequently, all of Scarlet's cutscenes from here on out (aka chapter 18))?

    Is there a way to randomize what class Corrin starts out in or does that happen automatically with the randomizer?
     
    Last edited by KunoichiZ, Dec 8, 2016
  16. Dylos

    Member Dylos GBAtemp Regular

    Joined:
    May 13, 2016
    Messages:
    198
    Country:
    United States
    A013 would be Birthright Chapter 13 I believe, which is the chapter Scarlet joins in Birthright. Also, chapter Join is what it puts for anyone who joins in your castle, which Izana does join in the castle in both other paths.

    Personally, I'm curious how recruiting Benny and Charlotte's replacements will work, will I need to have recruited Elise by that point or will whoever replaced Elise need to do the recruitment?

    Fates 3rd path spoiler

    Also, I'm starting to notice that it looks like everyone on the enemy side in Revelations starting on chapter 6 isn't randomized into their switched character, though the dialogue seems to imply that they should be.
     
  17. KunoichiZ

    Member KunoichiZ GBAtemp Psycho!

    Joined:
    Mar 16, 2012
    Messages:
    4,426
    Country:
    United States
    I would assume it would be whoever replaces Elise should be the one to talk to whoever replaces Charolotte and Benny. Strangely enough, Leo's model didn't switch until Camilla and Elise join you after you first battle with Xander.

    EDIT: I got to where you battle Kaze & Rinkah, but then the game crashed as soon as the initial cutscene ended.

    EDIT2: I'm going to try to extract the files and try again. I noticed some text issues (The No option being blank and some text cutting off).

    EDIT3: I managed to make it to Chapter 7 of Revelation so far. A few things I noticed:
    -Gunter's voice didn't switch to the new character.
    -Sakura stayed Sakura despite her dialogue showing that she's a different character (Nyx, in my case)
    -Hinoka stayed Hinoka, but during the Hinoka-cry-on-shoulder scene, she was replaced with an Outrealmer (basically ???) but he was doing some Swordmaster movement with his sword.
    -In Chapter 6 (Rev route), after the battle, Ryoma's map sprite still showed him as Ryoma, despite being replaced by Kaze.
    -When Lilith shows you around My Castle, Jakob stayed being Jakob (albeit, with a different class) despite him being replaced by Ryoma. It was still Ryoma talking though. Also, your My Castle helper (where you go to place new buildings and go to the next battle) switches to a generic Villager, despite it supposed to be Jakob/Felicia (which is to be expected because the game wasn't programmed to have Ryoma be a My Castle helper).

    Also, Azura got replaced by Mercenary!Charlotte, holy crap it's freaking hilarious and for once, Charlotte can actually hit stuff. On another note, Rinkah & Kaze got replaced with Samurai!Selena and Sky Knight!Odin, which I thought was kinda funny. If only Ryoma got replaced by Laslow, then the mission that the Awakening trio of Nohr got assigned to in Hidden Truths would've been completed.

    My one criticism so far is that if Jakob/Felicia get replaced by someone day Ryoma, then he easily murders the next several chapters that he's in. Could you maybe add something where the too OP units can't be in the very beginning of the game? It is pretty fun to watch Ryoma blitz through everything, but it takes the fun out of it.
     
    Last edited by KunoichiZ, Dec 8, 2016
  18. Dylos

    Member Dylos GBAtemp Regular

    Joined:
    May 13, 2016
    Messages:
    198
    Country:
    United States
    There are a few slots that a powerful character can show up in depending on route and have them totally destroy everything. Personally, I got Leo as a Troubadour in Jakob's spot, Camilla as an Oni Savage in Azura's spot, and Fuga as a priest in Subaki's spot (with 3 stats capped at level 5!) all three of them are quite powerful (I changed Leo into a Dark Falcon because I didn't need him to be a healer). Unfortunately I won't get Xander for awhile as he replaced Fuga.

    But that's the fun of a randomizer, just like in the FE7 randomizer how you can get Athos impossibly early and just end up steamrolling everything. If you really want a challenge, you avoid using those characters and play on Lunatic, though sometimes you won't have a choice.

    Also, a thought occurs to me, if you're going to add Anna and possibily custom DLC characters to the replacement part, perhaps the amiibo units should be added as well, as they don't necessarily take away from the number of characters since their challenge maps can have their character changed, plus if you're playing with this on top of the gay fates hack, they can support and it'd be fun to have Lucina as one of Corrin's sisters, lol.
     
    Grima likes this.
  19. thane98
    OP

    Member thane98 GBAtemp Fan

    Joined:
    Apr 23, 2016
    Messages:
    363
    Country:
    United States
    Model swaps are still a work in progress, so you may end up with some instances where an outrealmer shows up instead of the proper character. I'm still trying to identify the source of the issue. Also, in which case did Sakura stay Sakura? Was it when she joined you in chapter 5, or was it during a cutscene?

    The map sprite issue is being worked on - it's a result of every character having map-specific IDs until they join for real. I'll see what I can do about Ryoma on chapter 6.

    Yeah, the generic villager is the only thing that can show up as far as I know. I might look into setting something up for alternative butlers, but I'm going to leave that for later.

    I actually forgot to fix the issue with Gunter's voice. Fortunately, it's as simple as changing the sound entry for Gunter in a data file, so that should be fixed by the next update. As far the issue with OP units, I'm working with the stat randomization feature right now to see if it can address the issue.

    The amiibo units sounds like a pretty good idea actually. In that case, I'll go ahead and add options for Anna and the amiibo units as optional characters during the next update. Also, I went ahead and added Mozu's entry back into the pool for randomized characters, so every first gen character should be covered now.
     
  20. KunoichiZ

    Member KunoichiZ GBAtemp Psycho!

    Joined:
    Mar 16, 2012
    Messages:
    4,426
    Country:
    United States
    How can I word this properly?
    It was only in Chapter 4 where this occurred. Most of the dialog (I talked with her during battle but I kinda got into the habit of skipping conversations and accidentally skipped it) was Nyx, but anything battle related Sakura. Basically, it was a standard Chapter 4 playthrough, but with Nyx taking over the dialog during cutscenes and and she replaced Sakura in the scene where Hinoka hugs you. The in-battle sprite, the healing animations, and voices during battle were Sakura.

    In Chapter 5, however, Sakura was completely replaced by Nohr Princess!Nyx, dialog/in-battle sprites/battle animations included. Even the cutscene that appears when you get the Yato and Dragonstone were Nyx.

    @Dylos: I will admit that I'm not good at strategy games at all so I'm playing Phoenix mode (I know I'm a scrub) until I get better at placing units on the map correctly and the things involved with that. Yeah, I do love randomizers because of this factor, but seriously Ryoma. Even as a Sky Knight he was murdering everything. It was also pretty funny reading Ryoma's dialog as "Lady Corrin" xD.

    I wonder how this works for the children. Would it still be the same as the first gen units? Or would their stuff change based on their parents?
     
    Last edited by KunoichiZ, Dec 8, 2016

Share This Page