[Save Edit] Fire Emblem: Awakening (with Ironhax/SDM)

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by [Truth], Sep 1, 2015.

  1. [Truth]
    OP

    [Truth] GBAtemp Advanced Fan

    Member
    839
    351
    Mar 21, 2006
    Germany
    Mushroom Kingdom
    I successfully edited the gold in my FE: Awakening savefile.

    You need:
    Latest Ironhax (2.1)/Tubehax
    Latest boot.3dsx
    Save data manager
    Fire Emblem: Awakening Save Tool
    A Hex Editor (like HxD)
    1. Dump the save from your cartridge/digital via Save Data Manager.
    2. Decompress the save with Fire Emblem: Awakening Save Tool.
    3. Open the save you want to edit in the hex editor (Chapter0-2 = overworld saveslots, map0-1 = battle saveslots, Global = global game settings).
    4. Search for the value you want to edit (search -> hex value).
      I.E, you have 5000 gold on your save, the hex value for 5000 is 13 88 (converter here), reverse the value (88 13) to find it in the save (that is important to find the value!) and change it to your liking (like 3F 42 0F = 999999 max gold).
    5. Save and compress the save again with Fire Emblem: Awakening Save Tool.
    6. Copy back with Save data manager.

    Enjoy your gold!

    That was only one value a quickly found, post away your findings for item/level etc values.
     
    Last edited by [Truth], Sep 1, 2015
  2. Olmectron

    Olmectron GBAtemp Addict

    Member
    2,148
    1,340
    Dec 31, 2012
    Mexico
    A game
    Nice. Was looking for something like this yesterday. Now if only I was able to figure out the same thing for Bravely Default.
     
  3. Hopalongtom

    Hopalongtom GBAtemp Regular

    Member
    239
    35
    Mar 14, 2009
    Ooh yess... can this be used to use enemy only classes? Such as setting your tactician to use the same class as the final boss? ^_^
     
  4. Olmectron

    Olmectron GBAtemp Addict

    Member
    2,148
    1,340
    Dec 31, 2012
    Mexico
    A game
    Everything was alright, and got to edit the file name, but not the avatar's.
     
  5. [Truth]
    OP

    [Truth] GBAtemp Advanced Fan

    Member
    839
    351
    Mar 21, 2006
    Germany
    Mushroom Kingdom
    With the correct hex values you should be able to edit everything with this.
     
    smealum likes this.
  6. Olmectron

    Olmectron GBAtemp Addict

    Member
    2,148
    1,340
    Dec 31, 2012
    Mexico
    A game
    I got to change values for Seraph Robe, Energy Drop, Spirit Dust and so on. However, I don't know that much of this, I thought offsets where immovable, but it seems they differ per save file. Wanted to share the offsets where I changed these, but it won't be possible, it seems.
     
  7. [Truth]
    OP

    [Truth] GBAtemp Advanced Fan

    Member
    839
    351
    Mar 21, 2006
    Germany
    Mushroom Kingdom
    @Olmectron But you could explain how you found them. ;)
     
  8. Olmectron

    Olmectron GBAtemp Addict

    Member
    2,148
    1,340
    Dec 31, 2012
    Mexico
    A game
    Well. That's true.

    This is not a tutorial. I just did trial and error with the tools @[Truth] kindly provided, and had kind of luck in finding the values for some items slots. I'm just a noob in hex editing, never did it before, so if someone can help to explain better, please do it. Oh, and of course I know someone could have already found something like this, but I'm new to the scene and I'm just putting my grain of sand for new users like me that came in when Ironhax was launched.

    Using the tools you provided (HxD and the game's save tool), I looked up first for easy things to change. There were several strings showing my file's name, so I tried changing that. That was easy to find since it's at the start of the file.

    cp1.PNG

    Then I thought. "Let's give Chrom an overpowered STR stat". That's when I remembered how I used to find cheats with my DSTWO card for NDS games. I paused the game with the card's built-in menu, looked for a value, then went back to the game, changed what I wanted to find, then back to the menu, and looked again for the new value.

    That's really fuzzy. Those who owned a DSTWO, or have used any kind of Cheat System will understand immediatly. For those that don't, it's like playing any game with stats. FE:SD, for example, I had a unit with DEF stat 10 and used an stat incrementer making it 12. The DSTWO cheat search function would find the change from 10 to 12, taking down other non-coinciding values until I found the exact value to change for making the DEF stat whatever I wanted.

    Whatever, this gave me the idea to check HxD functions to look for something similar, and after looking at the File-Compare option in Analysis menu, I thought that could work. (However in the end, I couldn't do what expected, but it turned out to something nice the same).

    CP2.png

    1. I backed up my original unmodified data using Save Manager. Copied it to my PC. This will be Backup A.
    2. I went to my game and used an Energy Drop on Chrom. That augmented Chrom's STR stat from 42 to 43 (2A to 2B in hex).
    3. I saved and exited my game immediatly after saving, changed nothing else.
    4. Made a second backup using Save Manager. Copied it to my PC. This will be Backup B.
    5. Using the FE:A save tool, I decompressed both Backups.
    6. In HxD I pressed the File-Compare > Compare... option I showed before. Something like the next image appeared. I don't think Source or Target file matter in order. Anyway, I used Backup B as source since it's the one I was modifying. Backup A as target.

    cp3.PNG

    7. It showed the screen like the following image. Backup B showing up and Backup A showing down.

    cp4.PNG

    Of course, it wasn't showing me that exact part in the start, it was the starting part of the file, since it seems even after just modifying one value (Chrom's STR stat), the header of the file changed too. And so many other things. I looked for all of the changes between the two (pressing F6 skipped through the changes). I looked for the 2A to 2B value in the differences, but after looking twice through all the file, I didn't find them.

    8. Then, after going through the changes for a third time and feeling bad because of not finding the values I wanted, I was playing FE:A on my 3DS looking for some other values that could have changed. My brain turned on when I remembered the value of the Energy Drop quantity should have dropped from 2 to 1. And I saw several 01 values changed on the Backup B file.

    After a little bit more revision, I found the rows I selected in the image from point 7. My item list in the game showed in this order: 3 Seraph Robe, 1 Energy Drop, 2 Spirit Dust, 6 Secret Book, 5 Speedwing, 4 Goddess Icon and so on. That coincided with the first selected row! The same order, just separated by a "00" each time. And the change from 2 to 1 on the Energy Drop value meant it was exactly that.

    9. I modified the values as shown next. My guess was that each item slot could support FF FF items, meaning 65,535 real items in the game. So I filled everything as seen with FF until before a 01. I checked before and the values coincided for several items until the Silver Card, which value was 01. That meant Master Seal, Second Seal, the Bullions, Rift Door, Paragon, Iote's Shield and some other items would be affected since they are listed before the Silver Card.

    CP5.PNG

    10. And done! Enough items for finishing the game without any grinding at all. Haven't tried if my guess about FF FF was true, but anyway, 255 items (for FF) would be enough too. The Inventory always list 99 items, but even after using several of them, it's still in 99 items. I think it saves the real items count, but still only shows 99.



    Note: It seems the file gets bigger with each new character unlocked and even with menus unlocking (in the start the Inventory, Barracks, Wireless are not available, for example). So the hex offset shown won't match with your file's exactly. However, the file I did this with is a finished one (game beaten) with all of the characters unlocked, but 2. So it's possible that you could find the offset somewhere near the ones showed in the images if your file is similar in these things.
     
    Last edited by Olmectron, Sep 2, 2015
    Metab, sudloa and [Truth] like this.
  9. RainThunder

    RainThunder GBAtemp Regular

    Member
    212
    134
    Jun 22, 2012
    Hanoi
    I had successfully edited skillset, stats, etc. for a while ago. Basically it's the same method as Olmectron's.

    Here are some tips:
    - Swap the first character and the second one to find out character block offset.
    - The character structure is basically look like this (different character has different offsets).
    My Donnel example
    - More list, reference can be found on serenesforest forum.
     
    Last edited by RainThunder, Nov 1, 2015
  10. Olmectron

    Olmectron GBAtemp Addict

    Member
    2,148
    1,340
    Dec 31, 2012
    Mexico
    A game
    Nice! Gonna try it tomorrow.
     
  11. KaleoOmega

    KaleoOmega I just don't know what to do with myself...

    Member
    386
    171
    Apr 17, 2013
    Brazil
    Very useful! Used the infos posted here by you, @Olmectron and Truth's combined, and successfully edited some items and equiped skills for two characters (Chrom and my Avatar, at first). Didn't found the "Learned Skill flags" or "Internal Stats" , though... but hey, it's a beginning.
    Can't wait to finally surpass the Apotheosis DLC after some editing (I didn't win this one yet XD )
     
  12. [Truth]
    OP

    [Truth] GBAtemp Advanced Fan

    Member
    839
    351
    Mar 21, 2006
    Germany
    Mushroom Kingdom
    Awesome post, thanks.

    Since the items in the convoy have a fixed place for their amount, it should be easy to get every item available once you find the right place to start "f"-ing.
     
    Last edited by [Truth], Sep 2, 2015
    Olmectron likes this.
  13. [Truth]
    OP

    [Truth] GBAtemp Advanced Fan

    Member
    839
    351
    Mar 21, 2006
    Germany
    Mushroom Kingdom
    Do you guys know where the difficulty setting is stored and if I can change it?
     
  14. Mrperson0

    Mrperson0 GBAtemp Regular

    Member
    195
    81
    Jun 30, 2015
    United States
    Awesome! Hopefully someone will eventually be able to create an Awakening Save Editing tool with a GUI interface (like PKHex)!
     
  15. [Truth]
    OP

    [Truth] GBAtemp Advanced Fan

    Member
    839
    351
    Mar 21, 2006
    Germany
    Mushroom Kingdom
    I managed to change the difficulty of my save.
    Just change these two values at the beginning of the save (offset varies, always two offsets behind the X).
    00 = normal
    01 = hard
    02 = lunatic
    03 = lunatic+
    [​IMG]
     
  16. Armchair

    Armchair Newbie

    Newcomer
    6
    7
    Aug 17, 2015
    United States
    I'm sure you guys may have noticed this already, but I'm going to speak aloud for the benefit of novices like myself who are scratching their heads while trying to manipulate their inventory. One thing I noticed is that the convoy inventory keeps track of how many copies of a weapon you own by summing their combined durability. Let's say you find the offset for Ericka's blade (which has a durability of 20) and want to give yourself an additional blade. In that case, you'll need to increase the value of that entry by 20 (decimal), not 1. If you only increased it by 1, you'd be left with one full strength Erika's Blade and one Erirka's blade with only one durability point.


    So when you're searching for a specific weapon in your convoy inventory, search for the value equivalent to the sum of the durability of all copies of that weapon. If you sell off a copy of a weapon and then generate a second save file for comparison, then you want to search for the paired mismatching values that have a difference equivalent to the durability of that sold weapon.


    So let's say that your inventory contains a single copy of Seliph's Blade at full durability (15). The byte for that field will contain the value 0F. To add a second Seliph's blade to your inventory, you increase that value from 0F to 1E


    Ofcourse if you only care about getting tons of weapons, that should be accomplished by simply locating the bounds of the convoy inventory and then just flooding it with F's.
     
    [Truth] and Olmectron like this.
  17. Armchair

    Armchair Newbie

    Newcomer
    6
    7
    Aug 17, 2015
    United States
    I played around with character editing today. Particularly I wanted to change my Avatar from Female to Male so that I could get a female Morgan.

    I started by attempting to change the character byte within the character block detailed in RainThunder's post above, but wasn't successful. I then attempted to swap two different characters. I edited Kellam's character byte and was successfully able to replace him with Tharja (the folks at serene forest had already compiled a character table: http://serenesforest.net/forums/index.php?showtopic=52377&p=3715147)

    My failure with the Avatar and my success with Kellam/Tharja led me to assume that the Avatar is a special case due to the level of customization options available for that character. I then made two new save files and compared them. One with a male avatar and one with a female avatar, all other settings were default.

    I found a section of the save file that I believe contains all of your customization choices for the Avatar. Name/gender/body type/etc. I was able to locate it within the save file most consistently by searching for FF0106. Just beyond that is a large segment that contains your custom Avatar's name. Shortly beyond that is a byte that determines the gender of the avatar (underlined in red. 00 is male, 01 is female). I suspect the other bytes define the rest of the character's attributes, but I don't know which ones do what.

    [​IMG]
    (edit: In this save, my Avatar's name is Sami. As in the Advance Wars character. That's sort of my default name for female characters in video games).


    Humorously, while I was successful at changing the gender of my avatar, he still retains his old female body type. It is quite awkward looking.

    Unfortunately I seemed to have made some oversight concerning support levels and am presently unable to raise my Avatar's support level with any other character. I don't know enough about how the game is keeping track of support levels to figure out why. I think it is treating my edited Avatar as a different character that is unrecognized by the rest of the party.



    edit:
    I undid my gender change and that seems to have set things back to normal at least. The character block for my avatar kept being re-written whenever I loaded the save file. I suspect that the game parses your avatar's customization options and then tweaks the avatar's character block every time you load the save.

    I suspect what was happening is that my original female avatar character no longer existed and the new male one was being treated as a new character by the rest of the team.

    It was kind of weird. My post-edit avatar remembered his support pairings with the rest of the team even though everyone else viewed him as a character with zero support levels. Multiple battles with the Avatar paired with varying teammates never prompted the option to raise the support level by a letter grade.

    I think I need to try and figure out how the game is saving support levels....and probably marriages/parents as well. I need to read through some of those serene forest threads...


    edit2:
    Had some success on the parent front. When looking at Kjelle's character block, I located the character ID's for her father and mother at 0xC2 and 0xD3 respectively (edit: Not necessarily true for all characters. See my next post). I edited the father's ID and was able to successfully change her father. Furthermore, the game let me define a female character as Kjelle's father (Tikki). Additionally, the edit made Kjelle a manakete and allows her to change classes to the manakete class.

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]


    edit3:
    I went back in looking for where children and spouses are saved. I wasn't able to find anything, but I did notice in-game that Tiki was currently displaying Kjelle as her child despite the fact that I didn't edit Tiki's character block at all. A quick check of Donnel's character showed him as married to Sully, but with no offspring.

    [​IMG]

    [​IMG]

    I suspect that the game parses all the children to see who their parents are, and updates the appropriate paper dolls respectively when you view a character's stats. I don't know what will happen if you define one singular character as the parent of many different offspring.

    I still don't know where marriages are being defined. I don't see it in the character block (I compared two wives and didn't see anything that looked like their husbands' character IDs). Maybe there is a collection of marriage pairings somewhere in the save file? Maybe the info is near the character block and I've just spent too many hours staring at a hex editor?


    edit4:
    One last edit, and one last screenshot.

    [​IMG]

    The game let me replace the mother of a 2nd gen character with a different 2nd gen character. I always got headaches wrapping my head around the crazy eugenics programs people thought up in this game under normal circumstances. I don't even want to think about what sort of implications this may have. What if you assemble some paradox where the kids are their own grandparents? What new heights will this allow Morgan to reach?
     

    Attached Files:

    Last edited by Armchair, Sep 7, 2015
    Birdon, lea and jagerstaffel like this.
  18. SomeGamer

    SomeGamer GBAtemp Guru

    Member
    5,804
    2,773
    Dec 19, 2014
    Hungary
    What DLC things can be accomplished with this without DLC?
     
  19. Armchair

    Armchair Newbie

    Newcomer
    6
    7
    Aug 17, 2015
    United States
    An update for editing parents. I was looking at my Lucina and noticed that the offset for her father and mother were different than Kjelle's.

    So the Father/Mother are not necessarily located 0xC2 and 0xD3

    The mother is still 17 bytes after the father though.

    [​IMG]
     

    Attached Files:

  20. iwabo

    iwabo GBAtemp Regular

    Member
    139
    38
    Sep 4, 2015
    Lesotho
    You are all doing a great job with that research. I hope someday this will end up giving us an actual editor that makes it possible to avoid all those hours of grinding skills and classes.
     
    SomeGamer likes this.