Question Need help editing Fire Emblem Three Houses System File

Discussion in 'Switch - ROM Hacking, Saves, Translations & Tools' started by theroonco, Nov 13, 2019.

  1. theroonco
    OP

    theroonco Member

    Newcomer
    1
    Nov 9, 2019
    United Kingdom
    If you download the two attached save folders to your own Switch, you'll see that the last three slots of the "main" folder redirect to three different epilogues, even though the menu says they're all from the end of Part 1. This is because these are saves I copied over from the same positions in the backup folder (i.e. save22~24). I want to edit the system file so that it accurately reflects the time and chapter that those save files are actually on, as I believe this also improves the load times of those saves. For example, I orignally had my Blue Lions epilogue overwriting another Blue Lions run I did and this loaded fine despite loading into a save different to the one that was listed.

    I've tried just copying the characters associated with the last three saves from the backup's version of system to the main's version, but this just told me my save was corrupted so I want to know how to properly change the system file. I've tried creating and deleting saves from the list, yet the two different system files always retain the same string at the bottom (and these are different strings to each other's despite backup being a backup of my main profile, hence the name). I've tried asking on the General Hacking thread yet have been utterly ignored, so am turning to the forum at large. Please help!

    P.S. For those interested, what the system file says a save slot is affects how it loads: I needed each of the "dummy" files to be from an "After Battle" save because this was the only way to load the actual file into the epilogue; otherwise I had to start each chapter from the beginning or with a different party/ stats.

    P.P.S. For what it's worth, I'll ping the folks working on cheats on the general thread. Maybe they'll notice this time: @Falo @SkittleDash @BlackwingAngelx @Raitera11 @Ningyoplug @Gamerjin
     

    Attached Files:

    Last edited by theroonco, Nov 13, 2019
  2. Gamerjin

    Gamerjin GBAtemp Fan

    Member
    5
    May 25, 2016
    United States
    i figured it out....

    The boot loading animation is doing a checksum on the system file from offsets 0xC - 0x1203, every 0x74 bytes starting from 0xC is a save
    So, using a hex editor, copy the 0x74 for the save info, then run a checksum on bytes 0xC to 0x1203, put the checksum in reverse order on the first four bytes. I'm at work right now, when I get home I will edit this further....
     
    Last edited by Gamerjin, Nov 18, 2019
  3. theroonco
    OP

    theroonco Member

    Newcomer
    1
    Nov 9, 2019
    United Kingdom
    Since @Gamerjin was helping me, I'll see if I can help explain what's happening (as far as I understand it, in any case):

    The system file uses 116 (0x74 in Hexadecimals) bytes to store information on each save file (just the surface level stuff, i.e. the character's name, total play time, etc.) and the first save starts at 0x0C (i.e. the 13th byte). When the game boots up, it does a checksum on everything from 0x0C to the very end of the file and throws up a "save is corrupted" error if there's a mismatch. Fortunately, the checksum is saved in the first four bytes of the file in reverse order. For example, if your checksum is 00011997 (i.e. 00 01 19 97), the first four bytes of your file need to be 97 19 01 00 for the game to register it.

    The best part is that the flags that denote whether you cleared the game in Maddening NG and/ or which Supports have been obtained are included at the end of this file, so it may be possible to write cheats to unlock them all now that we know how the system file is being read, for those of you who like saving time :) At least, that's what I gathered from my experiments.
     
Quick Reply
Draft saved Draft deleted
Loading...