[Research] FE: SOV Save Discussion

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by Koko-Kun, May 25, 2017.

  1. Koko-Kun
    OP

    Koko-Kun A Guppy

    Member
    122
    87
    Jun 10, 2016
    United States
    Paradisum
    A save research/discussion for Fire Emblem Echoes: Shadows of Valentia. Sole purpose to collect IDs for convenience. If you want to find hex IDs that are missing or in DLCs read @TildeHat's explanation below. Would appreciate if people contributed in the thread with the IDs that are missing ^^. I'll update as more information rolls in. My resource.

    IMPORTANT IF YOU ADD BYTES TO YOUR FILE

    Warning: Spoilers inside!
    Details:
    • The game's save file reuses the same file compression method as its previous ancestors, Awakening and Fates, so you could reuse @SciresM's FEAST again without any trouble.
    • IDs (Character, Class, Weapons, Items) are 8 bytes long. Reasoning is it actually is a label calculated by using 2 polynomial hashes instead of a byte assigned by the game before which is explained by @TildeHat and there are pointers which you could use by simply reversing the bytes for the offset.
    • Structure of the file should be a bit similar to Fates's so if you got some prior knowledge of Fate's structure this should be easy for you quote @Soaprman
    Interesting Info When Editing:
    WIP Info

    Amiibo + Deen and Sonya + Guide on Adding Characters
    Warning: Spoilers inside!

    Fernand + Berkut (Credits to @DeathChaos25)
    Warning: Spoilers inside!

    FAQ:
    Warning: Spoilers inside!
     
    Last edited by Koko-Kun, Jun 7, 2017


  2. TildeHat

    TildeHat Advanced Member

    Newcomer
    89
    52
    Oct 29, 2015
    Canada
    Copy paste from an old post:

    At 0xCC is a pointer to where the characters are and 0xD0 has a pointer to items.

    Character, class and items are stored in the save by throwing their labels in two polynomial hashes.

    So using the Golden Dagger as an example which had the hex string 11 D2 EB 9D 4B 41 83 D5 in the save file, the first four bytes is when the label is through the hash using 0x25 as a base and the last four bytes is using 0x1F.

    Golden Dagger's label in hex is 49 49 44 5F 89 A9 8B E0 82 CC 92 5A 8C 95. Starting from the end of the label the hashing goes: 0x95 * base^0 + 0x8C * base^1 + etc. Bytes are signed so watch out for that when doing the calculations. Once it's done only the last four 4 bytes are used.
     
    Shiro-san, RainThunder and Koko-Kun like this.
  3. backpeace

    backpeace Member

    Newcomer
    13
    1
    May 13, 2017
    United States
    Is there any possibility of someone making edited saves available for download?
     
  4. Ghostlander

    Ghostlander GBAtemp Regular

    Member
    214
    7
    Jun 26, 2015
    United States
    I'd like this as well
     
  5. robertrobertblaze11

    robertrobertblaze11 Advanced Member

    Newcomer
    68
    4
    Aug 17, 2016
    United States
    want to know where i live huh,u perverted stalker
    hmm resourceful......
     
  6. Koko-Kun
    OP

    Koko-Kun A Guppy

    Member
    122
    87
    Jun 10, 2016
    United States
    Paradisum
    I did the calc for Rapier but for some reason I'm only getting the last byte correct, the three to last don't match with the save's calc. Could you tell me what I did wrong? This is what I got:
    Warning: Spoilers inside!

    Warning: Spoilers inside!

    It's possible, thought that's a bit vague. A lot of the stuff is similar to Fate's so sure, anything is possible.
     
    backpeace likes this.
  7. TildeHat

    TildeHat Advanced Member

    Newcomer
    89
    52
    Oct 29, 2015
    Canada
    Bytes are signed so any byte that's greater than 0x7F, they're negative.
     
    Koko-Kun likes this.
  8. Koko-Kun
    OP

    Koko-Kun A Guppy

    Member
    122
    87
    Jun 10, 2016
    United States
    Paradisum
    Oh oops thanks!
     
    backpeace likes this.
  9. backpeace

    backpeace Member

    Newcomer
    13
    1
    May 13, 2017
    United States
    Awesome. I am with a lot of doubts so if anyone can provide an edited global save just like in Fates it will be a great help for beginners.
     
  10. robertrobertblaze11

    robertrobertblaze11 Advanced Member

    Newcomer
    68
    4
    Aug 17, 2016
    United States
    want to know where i live huh,u perverted stalker
    hmm
    good point
     
  11. WarioTails358

    WarioTails358 GBAtemp Fan

    Member
    343
    55
    Oct 2, 2015
    United States
    Since save editing allows us to edit a character in our party and replace them with someone else, does that mean there's also ID's pertaining to the boss characters as well?
     
  12. DeathChaos25

    DeathChaos25 Unmei wo kaeru!

    Member
    1,291
    657
    Oct 21, 2015
    Yes, unlike Awakening or Fates, any and every enemy within the base game is playable in SoV, because all character blocks are stored in the same file, as opposed to Awakening/Fates having separate files for playables and enemies.
     
    Koko-Kun and Dylos like this.
  13. Dylos

    Dylos GBAtemp Regular

    Member
    278
    75
    May 13, 2016
    United States
    That will be nice for if there's ever a randomizer as it would allow the randomization of bosses in addition to players (or randomly switch the two).
     
  14. backpeace

    backpeace Member

    Newcomer
    13
    1
    May 13, 2017
    United States
    This is quite interesting, we can use any unit of the game as playable. Someone already managed to edit some save and post here to be notice the differences. I want to see where the editing is.
     
  15. Luxifer

    Luxifer Newbie

    Newcomer
    8
    0
    Apr 2, 2017
    Italy
    Palermo, Sicily
    can i use the ex editor to unlock the emiibo dungeon?? (with out amiiboXD)
     
  16. GameSystem

    GameSystem GBAtemp Regular

    Member
    258
    144
    Sep 14, 2009
    United States
    Edit: I accidentally counted wrong. The Item slot value is 750 bytes away from the experience value. I think I got it right this time.
    WIP Character Block with Item slot!
     
    Last edited by GameSystem, May 29, 2017
  17. Koko-Kun
    OP

    Koko-Kun A Guppy

    Member
    122
    87
    Jun 10, 2016
    United States
    Paradisum
    For those of you who are curious about having pernament amiibos in your party, here are the amiibos (excluding Alm and Celica): https://drive.google.com/open?id=0B9HGNDRpe1v0azBITmt5TWRjelk . You have to decompress your save first and copy the blocks into your save. Paste the blocks before a character block so there aren't any errors. Make sure you change the byte that is after TINU by 2 bytes to the exact # of units that you will have after you're done. Pls pls, backup so you don't have to clean up any errors that would make your life miserable

    Example
    The bolded # is what tells the game how many units there are in your lineup. If it's not correct your game will crash. In this example 0x29 to decimal is 41. If you add all 7 characters just add 7 to 0x29/41 then replace 0x29/41 with the sum in hex.

    Next steps:
    So once you pasted the characters and changed the byte of the # of units, you want to find EDNID. Skip the 10 first bytes until you're at the offset 0xD0. The pointers are (example), D3 77, AC 81, and 47 82 which should respectively point at NART, IFER, and ILER. The other two pointers after EDNID don't matter since those won't be affected by the change of the units added, so you can just ignore those.
    Warning: Spoilers inside!
    Now since we added our new units you want to search for those strings because those pointers are incorrect. You want to copy the offset of the first letter of the string.
    Warning: Spoilers inside!
    So the offset of N would be 0x7923. But, you want to reverse it, which would be 0x2379. Replace 0xD377 by 0x2379 and the pointer should be correct now. Rinse and repeat for the other two pointers. That should probably clear any bugs that are caused by adding any units, but again backup just in case. Hopefully a DLC or editor can make this easier.

    If you need help, I'll (try my best) to help. Make sure to backup so no errors ^^.

    The bytes you got there are wrong, unless I misunderstood the information. The ID should be 8 bytes long, not 1. Also, the item slot, (I think we're both talking about what the character wields) is where I labeled in my block, the "Item". The rank of the items is correct though.
     
    Last edited by Koko-Kun, May 31, 2017
    backpeace likes this.
  18. GameSystem

    GameSystem GBAtemp Regular

    Member
    258
    144
    Sep 14, 2009
    United States
    I don't know how I missed that. My eyes must be failing me. It seems that viewing the ram info in realtime is radically different than seeing it through a HEX editor. I guess you can ignore everything I posted.
     
  19. cercity

    cercity Advanced Member

    Newcomer
    67
    10
    Jan 16, 2016
    What are you guys using for compressing/de-compressing? FEAST isn't working for me and when I try other means it messes the save file which causes the game not to recognise the file.
     
  20. backpeace

    backpeace Member

    Newcomer
    13
    1
    May 13, 2017
    United States
    Fantastic, finally a good person has released amiibos for download.