Some useful data for SoV save editing - unit stats and classes

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by deventio7, May 20, 2017 at 2:30 AM.

May 20, 2017 at 2:30 AM
  1. deventio7
    OP

    Newcomer deventio7 Newbie

    Joined:
    Saturday
    Messages:
    2
    Country:
    Canada
    I've been tinkering around - mostly been working with how to edit unit data - specifically, stats and class. This is all I've uncovered so far.

    In world map saves, all the unit data is stored near the end of the file, in a chunk that looks something like this 00 01 00 00 00 00 FF 00 00 00 FF 00 00 00 00 01 02 75 E2 BA 8F 75 0E A4 33 00 9E 25 06 76 3E F0 F2 EA 00 02 01 0D 00 00 00 11 D2 EB 9D 4B 41 83 D5 02 00 00 00 04 02 00 00 00 00 D7 07 F4 66 73 6D 53 90 46 67 BC 9C 53 00 00 00 02 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 15 07 23 CD E7 C2 25 37 82 C2 05 92 F2 26 DE 6E 78 A1 5D 00 9E 55 DF 60 0A 08 0A 09 08 08 02 00 26 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 FF 00 01 9B D6 F7 7B ED 0A 67 5D 00 00 01 01 89 B0 EF A3 29 44 EE FE 07 02 01 03 00 00 00 8A D3 8F E2 2E 1C 0C 74 02 00 00 00 03 01 00 00 00 00 D7 07 F4 66 73 6D 53 90 65 84 59 99 53 00 00 00 02 00 00 00 00 03 30 00 10 00 00 00 00 00 00 00 00 08 00 08 00 00 00 15 06 5F 17 4B 53 27 C9 CF 87 06 5A 40 29 08 62 B1 04 70 00 12 14 19 69 09 08 0C 0D 05 09 02 00 21 FF FF FF FF 00 00 00 00 00 00 01 00 00 00 FF 00 01 9B D6 F7 7B ED 0A 67 5D 00 00 01 02 BE CD 22 0E FA 98 4C EA 0F 95 9F 20 9E DD 49 BF FA 00 02 01 08 00 00 00 AD 1E 6B 15 53 38 61 C8 02 00 00 00 03 01 00 00 00 00 D7 07 F4 66 73 6D 53 90 DD E5 65 99 53 00 00 00 02 00 00 00 00 03 23 00 13 00 00 00 00 00 00 00 00 08 00 08 00 00 00 15 06 51 BB 31 AC 11 BD 5E DD FB DD 0E AF B1 43 3F CF CC 00 89 B3 AB 12 0D 08 09 0A 0A 08 02 00 23 FF FF FF FF 00 00 00 00 00 00 02 00 00 00 FF 00 01 A5 57 22 94 AB 06 D2 F5 00 00 01 01 9B D6 F7 7B ED 0A 67 5D 01 02 01 81 00 00 00 5C CB 45 C1 84 B5 9D 66 02 00 00 00 03 01 00 00 00 00 D7 07 F4 66 73 6D 53 90 DD E5 65 99 53 00 00 00 02 00 00 00 00 03 29 00 15 00 00 00 00 00 00 00 00 08 00 08 00 00 00 15 06 33 36 5C 73 26 A8 7A 1A 06 69 70 5A 3B 5F 51 80 C6 00 2F AE A5 40 08 09 08 07 09 0A 02 00 1B FF FF FF FF 00 00 00 01 00 00 03 00 00 07 FF 00 00 00 00 01 00 02 00 02 00 00 00 03 01 00 00 00 00 D7 07 F4 66 73 6D 53 90 E1 0D 66 99 53 00 00 00 02 00 00 00 00 03 15 00 09 00 00 00 00 00 00 00 00 08 00 08 00 00 00 15 08 2B A5 A7 36 27 F7 B0 79 06 E3 E9 01 23 21 FF 77 26 00 7D 55 DD 3B 0A 0A 0A 0B 08 07 02 00 1E FF FF FF FF

    Note the 'FF FF FF FF' bytes - this is what separates the units' information from the next, and is the easiest way to tell you're looking at the right block.

    I've yet to figure out what the rest of the bytes do, but at the end of each, it follows this pattern.

    XX XX XX XX XX XX XX XX 00 ?? ?? ?? ?? HP AK SK SD LK DF RS MV ?? FF FF FF FF

    The XXs correspond to codes for classes: I've listed all those that I know below. HP, AK, SK, SD, LK, DF, RS, and MV are the amounts that the units have grown from their base stats: for instance, if Celica has stats of 30/10/10/9/9/5/9/4. since her base stats are 20/8/6/6/8/4/7/4, those bytes would be saved as 0A 02 04 03 01 01 02 00. Note that these can't be negative and don't need to be because of how promotions work in SoV.

    The class codes I know so far are as follows.

    • Fighter (Alm) : 92 F2 26 DE 6E 78 A1 5D
    • Priestess (Celica) : 27 FC DB EA 45 53 E3 63
    • Archer: E3 E9 01 23 21 FF 77 26
    • Cleric: 69 70 5A 3B 5F 51 80 C6
    • M!Mage: DD 0E AF B1 43 3F CF CC
    • F!Mage: 9B 0D AF B1 13 3E CF CC
    • Soldier: 0F FE 1B 4A A1 75 77 6F
    • Peg Knight: 9C 62 D7 13 50 DE 57 9C
    • Cavalier: 4A C0 58 88 5C 6D 1E BF
    • Mercenary: 5A 40 29 08 62 B1 04 70
    Finally, it is fairly useful to know which unit you are editing: The save slots change from Chapter 1 to Chapter 2, and they could change again, but this is what I know for now:

    EDIT: Turns out that the save slots change around as you change routes and what units you deploy to chapters, and there is some other identifying information for which unit is which. Ignore everything past this point.

    Chapter 1:

    1. Alm
    2. Lukas
    3. Gray
    4. Tobin
    5. Faye
    6. Kliff
    7. Silque
    8. Clair
    9. Clive
    10. Forcyth
    11. Python
    Chapter 2:
    1. Celica
    2. Alm
    3. Gray
    4. Tobin
    5. Faye
    6. Kliff
    7. Silque
    8. Clair
    9. Lukas
    10. Clive
    11. Forcyth
    12. Python
    13. Mae
    14. Boey
    15. ...
    The list goes on for Chapter 2, but I don't know the rest of it yet. Happy hacking!



     
    Last edited by deventio7, May 20, 2017 at 4:37 AM
    backpeace likes this.
  2. SkittleDash

    Member SkittleDash White Knight

    Joined:
    Oct 21, 2015
    Messages:
    780
    Location:
    Skyloft
    Country:
    United Kingdom
    I think I'll stick to NTR until a save editor is released. lol

    Great find though! :)
     
  3. deventio7
    OP

    Newcomer deventio7 Newbie

    Joined:
    Saturday
    Messages:
    2
    Country:
    Canada
    Is there NTR for the English version? I thought we only had NTR for JPN version (and just changing the ticket number to the English one doesn't work, I've tried it myself)
     
  4. TildeHat

    Newcomer TildeHat Advanced Member

    Joined:
    Oct 29, 2015
    Messages:
    85
    Country:
    Canada
    Copy paste from Serenes:


    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.
     
  5. KunoichiZ

    Member KunoichiZ GBAtemp Guru

    Joined:
    Mar 16, 2012
    Messages:
    6,599
    Country:
    United States
    deventio7 likes this.
  6. Samsonb79

    Newcomer Samsonb79 Member

    Joined:
    Feb 6, 2017
    Messages:
    23
    Country:
    United States
    here's a few more to add to your list:

    M!Villager: C5 1B 98 DC 57 87 88 5C
    F!Villager: 83 1A 98 DC 27 86 88 5C
    Knight: A6 12 F3 C2 1E 68 88 6D
    F!Cavalier: 08 BF 58 88 2C 6C 1E BF
    F!Paladin: 47 A5 00 99 87 89 CB 0C

    Hope we can get a full list soon.
     
    Last edited by Samsonb79, May 20, 2017 at 10:29 AM
  7. backpeace

    Newcomer backpeace Newbie

    Joined:
    May 13, 2017
    Messages:
    8
    Country:
    United States
    Very good deventio7, until finally appeared people like you to help on the subject of hacks in SoV.
     
  8. Samsonb79

    Newcomer Samsonb79 Member

    Joined:
    Feb 6, 2017
    Messages:
    23
    Country:
    United States
    Also I should mention you should avoid reclassing Alm and Celica to classes other than figher/priestess.
    Just tried it out and it leaves you unable to attack in the 3d dungeons because those classes don't have the proper animations (you can still move around and interact with doors and they will use animations appropriate for their class).
     

Share This Page