ROM Hack [Research] FE: SOV Save Discussion

Koko-Kun

A Guppy
OP
Member
Joined
Jun 10, 2016
Messages
122
Trophies
0
Location
Paradisum
XP
111
Country
United States
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

If you just replaced bytes, then you're fine, disregard this. If you see your file size has changed after you edited it, then this applies to you.

Step 1: Changing the pointers. Go find the text string EDNID. There you'll see 5 pairs of bytes that aren't 0's. Should be from offset 0xC8 to 0xD9.
C3ixNva.png

Step 2: Now if you added bytes to your files, these pointers should be incorrect. Why does it matter if it's incorrect? Well you'll lose some stuff like inventory and units so yeah. To remedy this problem you want to to find these text strings: TOPS, TINU, NART, IFER, and ILER. The first pair of bytes is the pointer to TOPS, second pair of bytes is the pointer to TINU, third pair of bytes is the pointer to NART, fourth pair of bytes is the pointer to IFER, and the fifth pair of bytes is the pointer to ILER. as shown in the picture as a reference.

Step 3: Copy the offset of the first letter of the text string and reverse it. So let's say it's located on offset 0x6887. You would just reverse it. The new offset would be 0x8768 which we will just remember.
GL6kp3x.png

Step 4: Now replace the bytes from step 1, the pointers, with the new offsets that we just reversed. So now I'm replacing 0x4367 by 0x8768. And to double check if it points correctly, just reverse the value and go to that offset.
UFCk8I1.png

Step 5: That's about it. Just apply the same step to the other pointers.
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.
    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.
  • 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
    Kinda unrelated: I went ahead and bought SoV today. It might be a bit before I get around to playing it, though, and I don't really plan on doing anything with it save editor-wise. If anyone reading this decides to make a save editor for SoV, feel free to shoot me any questions you might have about how Fates does things. There are probably quite a few similarities in the overall save structure, even if the details on how particular things are stored are different.
Interesting Info When Editing:
Just some things I found that I think a lot of people are the most interested in editing.
To find your coins simply just convert the value that your game shows to hex and reverse it. EXP: 999 (0x03E7) Silver coins. Reversed Value: 0xE703. And just search with the reversed value.

I made a mistake, the orange F1 belongs with the green highlighting, the Skill Item in progress. The Byte after the item is the rank, 10 = 1 star, 20 = 2 start, etc.
kWNqCl6.png

Amiibo + Deen and Sonya + Guide on Adding Characters
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 . Follow the guide below to add them. I think I finally simplified it now!

Guide on Adding Them
Step 1. Add the character block before another character block. Refer to this to see what you should be looking for.
fIMbIgT.png
uACozys.png

Step 2: Find the text string TINU. Two bytes after it is the byte that tells the game how many units are in your lineup. This is important because if it's wrong it will crash. It should always be before a character block.

JAvK0bE.png

Step 3: Count how many units you will now have or just add the number of units you added to that byte. If you don't know how to add hex, just google something like, "0x21 + 0x7". That should give your sum.

Step 4: Replace that byte by the sum.

Step 4: Follow this extensive guide very important:
Step 1: Finding the pointers. Go find the text string EDNID. There you'll see 5 pairs of bytes that aren't 0's. Should be from offset 0xC8 to 0xD9. Ignore the first two pair of bytes, they won't be affected by this.
C3ixNva.png

Step 2: Step 2: Now if you added bytes to your files, these pointers should be incorrect. Why does it matter if it's incorrect? Well you'll lose some stuff like inventory and units so yeah. To remedy this problem you want to to find these text strings: TOPS, TINU, NART, IFER, and ILER. The first pair of bytes is the pointer to TOPS, second pair of bytes is the pointer to TINU, third pair of bytes is the pointer to NART, fourth pair of bytes is the pointer to IFER, and the fifth pair of bytes is the pointer to ILER as shown in the picture as a reference. Ignore TOPS and TINU as they won't be affected by this.

Step 3: Copy the offset of the first letter of the text string and reverse it. So let's say it's located on offset 0x6887. You would just reverse it. The new offset would be 0x8768. (Pretend the image says another string instead of TINU)
GL6kp3x.png

Step 4: Step 4: Now replace the bytes from step 1, the pointers, with the new offsets that we just reversed. So now I'm replacing 0x4367 by 0x8768. And to double check if it points correctly, just reverse the value and go to that offset. (Pretend the image says another string instead of TINU)
UFCk8I1.png

Step 5: That's about it. Just apply the same step to the other pointers.

Fernand + Berkut (Credits to @DeathChaos25)
So, after finally being home, and considering the choices, I figured I'd make this as easy as possible for you guys, so this is what I'll do.

Attached here is a file with the character save blocks for both Berkut and Fernand, using the Robin save block from the OP post as a base, so just follow the instructions OP has listed for adding the amiibos, except this time you're adding Berkut and Fernand.

Do also note that they will not have any written dialogue enabled, stuff like lv up quotes, death quotes, etc, will be missing, because those are coded for a certain version of Fernand and Berkut that simply do not exist in the game, so the refferences need to be redirected for them to work, attached here is an example edit to re-enable lv up quotes and class change quotes for English versions of the game, the download also includes a luma folder, just place that in the root of your SD and enbale luma game patching, and USA versions of the game will have level up quotes and class changing quotes for both of them.

Small video of these units in action


FAQ:
Q: Is there a save editor yet/in the works?
A: No.

Q: Are the hex IDs the same in X region?
A: Yes, the hex IDs are the same for every region. They all share the same romfs (just different voice clips and text).

Q: My items disappeared. Why?
A: The pointer is probably wrong.

Q: My character/class is "unknown", I didn't edit the save. Help?
A: You probably just deleted or don't have the Extdata from the DLC.
 
Last edited by Koko-Kun,

TildeHat

Well-Known Member
Newcomer
Joined
Oct 29, 2015
Messages
97
Trophies
0
XP
828
Country
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.
 

Koko-Kun

A Guppy
OP
Member
Joined
Jun 10, 2016
Messages
122
Trophies
0
Location
Paradisum
XP
111
Country
United States
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.

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:
0x41 * 0x25^0 + 0x83 * 0x25^1 + 0x73 * 0x25^2 + 0x83 * 0x25^3 + 0x43 * 0x25^4 + 0x83 * 0x25^5 + 0x8C * 0x25^6 + 0x83 * 0x25^7 + 0x5F * 0x25^8 + 0x44 * 0x25^9 + 0x49 * 0x25^10 + 0x49 * 0x25^11 = 13348196937435327584 --> B93E52648FCA2C60

0x41 * 0x1f^0 + 0x83 * 0x1f^1 + 0x73 * 0x1f^2 + 0x83 * 0x1f^3 + 0x43 * 0x1f^4 + 0x83 * 0x1f^5 + 0x8C * 0x1f^6 + 0x83 * 0x1f^7 + 0x5F * 0x1f^8 + 0x44 * 0x1f^9 + 0x49 * 0x1f^10 + 0x49 * 0x1f^11 = 1916534329561909490 --> 1A98E5D1896108F2

Is there any possibility of someone making edited saves available for download?
It's possible, thought that's a bit vague. A lot of the stuff is similar to Fate's so sure, anything is possible.
 
  • Like
Reactions: backpeace

TildeHat

Well-Known Member
Newcomer
Joined
Oct 29, 2015
Messages
97
Trophies
0
XP
828
Country
Canada
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:
0x41 * 0x25^0 + 0x83 * 0x25^1 + 0x73 * 0x25^2 + 0x83 * 0x25^3 + 0x43 * 0x25^4 + 0x83 * 0x25^5 + 0x8C * 0x25^6 + 0x83 * 0x25^7 + 0x5F * 0x25^8 + 0x44 * 0x25^9 + 0x49 * 0x25^10 + 0x49 * 0x25^11 = 13348196937435327584 --> B93E52648FCA2C60

0x41 * 0x1f^0 + 0x83 * 0x1f^1 + 0x73 * 0x1f^2 + 0x83 * 0x1f^3 + 0x43 * 0x1f^4 + 0x83 * 0x1f^5 + 0x8C * 0x1f^6 + 0x83 * 0x1f^7 + 0x5F * 0x1f^8 + 0x44 * 0x1f^9 + 0x49 * 0x1f^10 + 0x49 * 0x1f^11 = 1916534329561909490 --> 1A98E5D1896108F2

Bytes are signed so any byte that's greater than 0x7F, they're negative.
 
  • Like
Reactions: Koko-Kun

backpeace

Member
Newcomer
Joined
May 13, 2017
Messages
13
Trophies
0
Age
29
XP
42
Country
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.
 

WarioTails358

Well-Known Member
Member
Joined
Oct 2, 2015
Messages
345
Trophies
0
Age
24
XP
168
Country
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?
 

DeathChaos

Unmei wo koeru!
Member
Joined
Oct 21, 2015
Messages
1,364
Trophies
0
Age
28
XP
1,724
Country
Puerto Rico
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?
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.
 
  • Like
Reactions: Koko-Kun and Dylos

Dylos

Well-Known Member
Member
Joined
May 13, 2016
Messages
285
Trophies
0
Age
37
XP
220
Country
United States
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.
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).
 

backpeace

Member
Newcomer
Joined
May 13, 2017
Messages
13
Trophies
0
Age
29
XP
42
Country
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.
 

Koko-Kun

A Guppy
OP
Member
Joined
Jun 10, 2016
Messages
122
Trophies
0
Location
Paradisum
XP
111
Country
United States
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

54 49 4E 55 01 03 29 | TINU)
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.
n8X3TIn.png
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.
DLYWjvd.png
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 ^^.

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.
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,
  • Like
Reactions: backpeace

GameSystem

Well-Known Member
Member
Joined
Sep 14, 2009
Messages
606
Trophies
1
XP
1,733
Country
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.
 

cercity

Well-Known Member
Newcomer
Joined
Jan 16, 2016
Messages
69
Trophies
0
XP
97
Country
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.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: @OctoAori20, Thank you. Hope you're in good spirits today like I am. :)