[Release] Yo-kai Watch save data decrypter / encrypter

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by togenyan, Feb 21, 2016.

  1. togenyan
    OP

    togenyan Member

    Newcomer
    43
    71
    Feb 19, 2016
    yw_save - Yo-kai Watch save data decrypter / encrypter
    ...and save editors (see below)


    https://github.com/togenyan/yw_save

    This script decrypts and encrypts save data of Yo-kai Watch.
    • You need Python 3.x to run this script.
    • You need PyCrypto to handle saves of Yo-kai Watch 2 and Busters.
    Currently injecting doesn't work on Yo-kai Watch Busters.
    (2016-03-18T19:11:06+09:00) Yo-kai Watch Busters savadata encrypting is now supported!

    Usage

    First dump game1.yw (the number depends on your save slot) with svdt.

    Decrypt game1.yw with following command:
    Code:
    python3 ./yw_save.py --game yw --decrypt game1.yw game1_decrypted.yw
    After editing, re-encrypt game1.yw with following command:
    Code:
    python3 ./yw_save.py --game yw --encrypt game1_decrypted.yw game1_encrypted.yw
    Rename it and inject it with svdt.
    Code:
    mv game1.yw game1.yw.bak
    mv game1_encrypted.yw game1.yw
    Decrypting, encrypting and injecting works with:
    • Yo-kai Watch (tested only on JP version, but it should work on other versions)
    • Yo-kai Watch 2 Ganso / Honke
    • Yo-kai Watch 2 Shin'uchi
    • Yo-kai Watch Busters and Getto-gumi
    • Yo-kai Watch 3
    You can specify the game with "--game" option.
    • --game yw (default) : Yo-kai Watch 1
    • --game yw2 : Yo-kai Watch 2 Ganso / Honke 1.X and Shin'uchi
    • --game yw2x : Yo-kai Watch 2 Ganso / Honke 2.X
    • --game ywb : Yo-kai Watch Busters
    • --game ywb_getto : Yo-kai Watch Busters Getto-gumi
    • --game yw3 : Yo-kai Watch 3
    (for details see https://github.com/togenyan/yw_save/blob/master/README.md )

    I hope someone will make easy-to-use save editor...


    Save editors

    I eventually made simple save editors.
    These save editors do decryption and encryption when needed (you don't have to use yw_save).

    Yo-kai Watch:
    https://github.com/togenyan/Yo-kai_Editor_1/releases

    Yo-kai Watch 2 (Ganso, Honke, and Shin'uchi):
    https://github.com/togenyan/Yo-kai_Editor_2/releases

    Yo-kai Watch Busters:
    https://github.com/togenyan/Yo-kai_Editor_Getto/releases

    Yo-kai Watch 3:
    https://github.com/togenyan/Yo-kai_Editor_3/releases

    Note: You have to install Visual C++ 2013 redistributable package to run these editors.
    https://www.microsoft.com/en-us/download/details.aspx?id=40784
    choose vcredist_x86.exe.

    Error Reporting
    If you encounter an error, please check following before reporting:
    1. You are using the correct version of save editor
    2. (YW2 and above only) "head.yw" file exists in the same directory as "game*.yw" file
    If the error persists, please send me your save data files (game*.yw AND head.yw) via PM, email, or GitHub issues. Or you can also post it to this thread directly. In any case, do not forget to write the version and region of your game. example: Yo-kai Watch 2 Shin'uchi v1.2 JP

    Error codes
    1XX IO Error
    103 "head.yw" not found​
    2XX Decryption error
    201 AES CCM decryption failed
    202 Decryption failed​
    3XX Encryption error
    4XX Save data parsing error
     
    Last edited by togenyan, Apr 27, 2017
    Pixel-Pie, Goshi, skyrealmz and 21 others like this.


  2. IT Marco 93

    IT Marco 93 Newbie

    Newcomer
    1
    0
    Oct 20, 2009
    Italy
    First of all thanks for your job! Have you already tried hex editing your save files to edit yo-kai's stats or items?
    If so, any results?
     
  3. togenyan
    OP

    togenyan Member

    Newcomer
    43
    71
    Feb 19, 2016
    Yes and some results:

    [​IMG]

    [​IMG]

    See
    https://imgur.com/a/0sozY
    for more screenshots.

    As for stats, you can edit IVs, EVs, and level of your yo-kai. Actual stats are not stored in the save data.

    Here are some offsets:
    0x04BC : Medallium progress
    0x05F0 : Items
    0x11FC : Equipments
    0x1848 : Key Items
    0x1D08 : Yo-kai (0x5C byte for each)
    0x73CC : money

    See tools/dump.py for more information.
     
  4. Ryuzaki_MrL

    Ryuzaki_MrL Furry Addict

    Member
    744
    719
    Jun 23, 2015
    Brazil
    I love this game. Thanks for the tools!
    I'll try to make a save editor off of this when I have some spare time.
     
  5. SoyAlexPop

    SoyAlexPop GBAtemp Regular

    Member
    189
    119
    Sep 1, 2015
    Mexico
    I look forward to this, because catching rare bugs for the fusion items are a pain. And getting more purple coins is even worse. So thank you for trying.
     
  6. royr719

    royr719 Member

    Newcomer
    34
    2
    Nov 1, 2015
    Any progress in an editor?
     
  7. JohnsonNJohnson

    JohnsonNJohnson Newbie

    Newcomer
    2
    0
    Nov 18, 2015
    Canada
    Sorry; I've never used Python before and I think I am stuck.

    I've installed Python 3.5 and I've also got the game1.yw ready from the svdt.
    I ran the Python 3.5 and kept typing in "python3 ./yw_save.py --game yw --decrypt game1.yw game1_decrypted.yw" but it's keep saying SyntaxError: invalid syntax.. I've also tried to open the downloaded py files but it doesn't really open.

    Would anyone please help me? Thank you.
     
  8. togenyan
    OP

    togenyan Member

    Newcomer
    43
    71
    Feb 19, 2016
    Please post the whole error message.
     
    linkmatador10 likes this.
  9. Ryuzaki_MrL

    Ryuzaki_MrL Furry Addict

    Member
    744
    719
    Jun 23, 2015
    Brazil
    I'm running it from CMD (using Python 3.4.3): python yw_save.py --decrypt --game yw game1.yw game1_decrypted.yw
    This should also work with python 3.5

    EDIT:
    I've started working on an editor called WhisperTool, it's going to be a 3DS homebrew, but it's still way toooo far from finished.
     
    Last edited by Ryuzaki_MrL, Mar 30, 2016
    royr719, togenyan and SoyAlexPop like this.
  10. Hidden Gardevoir

    Hidden Gardevoir Member

    Newcomer
    25
    1
    Mar 14, 2015
    This looks really interesting!
    I wish I knew how to use this tool, the results are amazing... but I have no idea about coding, this looks pretty hard to me ;_;
     
  11. cearp

    cearp the ticket master

    Member
    7,466
    4,704
    May 26, 2008
    Tuvalu
    thanks for the tool, but i prefer warunyan :)
     
  12. JohnsonNJohnson

    JohnsonNJohnson Newbie

    Newcomer
    2
    0
    Nov 18, 2015
    Canada
    [​IMG]
    Here is my attempt to blindly enter the command codes to Python directly and failing miserably lol

    [​IMG]
    I've never really used CMD either.. I tried to look up online how to run Python with CMD and still am so lost...
     
  13. Hidden Gardevoir

    Hidden Gardevoir Member

    Newcomer
    25
    1
    Mar 14, 2015
    upload_2016-3-30_3-6-58.png
    It looks like we have the same error.
     
  14. togenyan
    OP

    togenyan Member

    Newcomer
    43
    71
    Feb 19, 2016
    Remove "Python 3.5.1: " then it should work.

    You don't have to launch python interpreter. Use cmd instead. And "ywb" is for Yo-kai Watch Busters, which is released only in Japan.

    :huh:


    Btw, I eventually made a simple save editor, which runs on PCs. It might not be "easy-to-use", but it has some basic functions, such as editing stats of Yo-kai and items. This app can also be used as a decryptor / encryptor. If you are not used to command line, then this is for you.

    https://github.com/togenyan/Yo-kai_Editor_1/releases

    screenshot:
    [​IMG]
     
    Crezut, Ankh, pbanj and 7 others like this.
  15. SoyAlexPop

    SoyAlexPop GBAtemp Regular

    Member
    189
    119
    Sep 1, 2015
    Mexico
    You made the tool also for Mac, I love you thank you so much.
     
  16. Hidden Gardevoir

    Hidden Gardevoir Member

    Newcomer
    25
    1
    Mar 14, 2015
    I'm using "ywb" because I want to try this with my Busters save.
    Thanks for the help!
     
  17. togenyan
    OP

    togenyan Member

    Newcomer
    43
    71
    Feb 19, 2016
    Oh, sorry. Then you need "--head" option. The whole command should be like:

    yw_save.py --game ywb --head head.yw --decrypt game1.yw game1_decrypted.yw

    And you need PyCrypto to decrypt savedata of Busters.

    Alternatively, You can use my save editor for Busters to decrypt your save.
    https://github.com/togenyan/Yo-kai_Editor_Getto/releases
     
  18. neko00

    neko00 Member

    Newcomer
    43
    10
    Apr 3, 2015
    Thanks a lot for this tool!! I know the save editor has just been released but whenever I try to open it, it always tells me there are some missing .dll files such as MSVCP120.dll or MSVCR120.dll, and I can't use the app.

    What should I do? Thank you once again ^ ^


    Edit: it is compatible with shinuchi too, right?
     
    Last edited by neko00, Mar 30, 2016
  19. Hidden Gardevoir

    Hidden Gardevoir Member

    Newcomer
    25
    1
    Mar 14, 2015
    Thank you! That save editor is really useful!
     
  20. togenyan
    OP

    togenyan Member

    Newcomer
    43
    71
    Feb 19, 2016
    You have to install Visual C++ 2013 redistributable package.
    https://www.microsoft.com/en-us/download/details.aspx?id=40784
    choose vcredist_x86.exe.

    Currently no save editor for shinnuchi is available. Use yw_save instead.
    It is not hard to make a save editor because savedata processing of shinnuchi is very similar to one of Busters (shinnuchi is a bit simpler). I'll try it before long.
     
    neko00 likes this.