Ni No Kuni (US) Save Modification

Discussion in 'PS3 - Tutorials' started by Kentoss, Jan 25, 2013.

Jan 25, 2013

Ni No Kuni (US) Save Modification by Kentoss at 7:20 AM (180,185 Views / 14 Likes) 316 replies

  1. Duomeng

    Newcomer Duomeng Newbie

    Joined:
    Mar 4, 2013
    Messages:
    1
    Country:
    United States
    Thanks guys for the great info here. Can someone tell me which part of a familiars code dictate the signs? I would use the editors, but they either produce corrupted saves or fail to load correctly(it said that my mitey had a double planet sign when it was just a sun, among other things). Thanks!

    EDIT: nvm, I seem to have figured it out. I only had familiars with the signs sun, star, moon, and double sun, but by comparing the differences between the blocks, it seems that byte number 231 from FE FF FF FE determines the sign.
    01 = sun
    02 = star
    03 = moon
    04 = planet
    05 = double sun
    06 = double star
    07 = double moon
    08 = double planet

    Oh, and if someone can teach me the "hex" way to relay this information(im sure that particular byte shouldn't be called "byte number 231") I'd really appreciate it. I know next to nothing about hex editing :(
     


  2. MaximusArg1982

    Newcomer MaximusArg1982 Newbie

    Joined:
    Feb 17, 2013
    Messages:
    8
    Country:
    Argentina
    Damn, Ninja'd.

    I didn't want to release it yet, since I still have trouble with the inventory...
    But here it is, It let's you edit more than just the Characters and Familiars, and this one also has a configurable offset table.

    I do not want to mess with the encrytor/descryptor, so you will still need to decrypt it before using this editor, and then encrypt it again to upload to PS3.
    (This is all well explained on OP's first post).


    And don't worry guys, this is NOT done with .NET; you can use this editor in every computer from 98 up to win7 (Should work on Win8, but since I'm not touching that one yet I can't certify it)



    Last of all, enjoy it!!


    EDIT:
    The offset table (blocks.xml) allows you to define the structure of every block in this way:
    <d1>, <d2>, <d4> : decimal, 1 to 4 bytes,
    <h1>, <h2>, <h4> : hexadecimal, 1 to 4 bytes (for item IDs and such)
    <string> : text, you gotta tell it the size in bytes of the string.
    <collection> : tells the program the contained offset will be repeated "count" times.

    All numbers in the .xml file (offset, size, count, etc) must be in Hex for the program to read it correctly.

    The zip file contains an example table with all the offsets I collected from this thread and on my own.
     

    Attached Files:

    Vith and MarcusJester like this.
  3. Don Killah

    Member Don Killah GBAtemp Maniac

    Joined:
    Nov 21, 2002
    Messages:
    1,127
    Country:
    France
    Awesome Maximus, now i guess that i can ditch my work in progress editor :D
     
  4. MaximusArg1982

    Newcomer MaximusArg1982 Newbie

    Joined:
    Feb 17, 2013
    Messages:
    8
    Country:
    Argentina
    Hey, don't stop because of me :)

    I've only posted it for people to try it and add some feedback, when I've completed it (inventory) I will upload the source to github, if you know pascal (It's done in Delphi 2010) you can contribute to it. Or simply read it for ideas to make your's better :)
     
  5. Don Killah

    Member Don Killah GBAtemp Maniac

    Joined:
    Nov 21, 2002
    Messages:
    1,127
    Country:
    France
    Fine, i'll check your repo on time.
    And yeah, i'm coding with Delphi7 most of the time for small projects, for bigger one i usually switch to VisualStudio.
    Anyway, here's a snippet that might come handy for dectecting is file is already uncrypted or not, and how to decrypt/encrypt it from your app.

    Code:
    if opendialog1.execute then
    begin
        try
            if FileExists('SYS-DAT') then
            begin
                FileStream := TFileStream.Create('SYS-DAT', fmOpenRead);
                setlength(MyTempBuffer, FileStream.size); // added memory allocation
                FileStream.Read(pbytearray(MyTempBuffer)^, FileStream.size); // corrected reading
                FileStream.Free;
     
                // Check if header is decrypted or not
                if (MyTempBuffer[0] = $FF) and (MyTempBuffer[1] = $FE) and (MyTempBuffer[2] = $F1) and (MyTempBuffer[3] = $00) then
                begin
                    ShowMessage('File is already decrypted !!!')
                    // do some stuff...
                    // DecryptEncryptFile(Form1.OpenDialog1.FileName, 'encrypt');
                end
                else
                begin
                    ShowMessage('File is encrypted !!!')
                    // do some other stuff...
                    // DecryptEncryptFile(Form1.OpenDialog1.FileName, 'decrypt');
                end;
            end;
        finally
        // Do some stuff...
        end;
    end;
               
    procedure TForm1.DecryptEncryptFile(folder, action: string);
    // folder = folder to process
    // action = decrypt|encrypt
    var
        gameFolder, temp: string;
    begin
        temp := '';
        temp := ExtractFilePath(folder);
        temp := Copy(temp, 1, length(temp) - 1);
        gameFolder := temp;
        while Pos('\', gameFolder) > 0 do
        begin
            temp := temp + copy(gameFolder, 1, pos('\', gameFolder));
            Delete(gameFolder, 1, pos('\', gameFolder));
        end;
     
        temp := '-g ' + gameFolder + ' -' + action[1] + ' ' + gameFolder + '\ SYS-DAT';
     
        // ShellExecute(Form1.Handle, 'Open', PChar('pfdtool.exe'), PChar('-g BLUS30947 -d BLUS30947\ SYS-DAT'), nil, SW_SHOWDEFAULT);
        ShellExecute(Form1.Handle, 'Open', PChar(appdir + 'pfdtool.exe'), PChar(temp), PChar(appdir), SW_SHOWDEFAULT);
    end;
    PS:
    Be sure that you use the latest version of BruteForce Save Data in order to have the relevant secure_file_id for Ni No Kuni.

    Code:
    ; "Ni No Kuni: Wrath of the White Witch / Ninokuni: Shiroki Seihai no Joou"
    [BLUS30947/NPUB30932/NPUB90846/BLES01555/NPEB01158/BCAS20218/BLJS10150/BLJS10150/BLJS10185/BLJS10186/NPJB00238]
    ;disc_hash_key=
    secure_file_id:*=01020304050000000000000000000000
     
  6. MaximusArg1982

    Newcomer MaximusArg1982 Newbie

    Joined:
    Feb 17, 2013
    Messages:
    8
    Country:
    Argentina
    Nice, I maybe add this to the editor then.
    Thanks a lot.
     
  7. ToraxOutlaw

    Newcomer ToraxOutlaw Member

    Joined:
    Feb 17, 2013
    Messages:
    13
    Location:
    Stoke-on-Trent
    Country:
    United Kingdom
    I just keep getting errors when I try to use the Editor.

    2013-03-10 @01:18:26: App started
    2013-03-10 @01:18:27: Loading save game file
    Unable to load save game
    Invalid data
    Invalid file format
    Still encrypted? Found header: DB7ACDDF
    2013-03-10 @01:18:30: Save game file loaded
    2013-03-10 @01:19:10: Loading save game file
    Unable to load save game
    Invalid data
    Invalid file format
    Still encrypted? Found header: DB7ACDDF
    2013-03-10 @01:19:14: Save game file loaded

    But I decrypted both the files where my save is located.

    ((Never mind I was decrypting the wrong location))
     
  8. ToraxOutlaw

    Newcomer ToraxOutlaw Member

    Joined:
    Feb 17, 2013
    Messages:
    13
    Location:
    Stoke-on-Trent
    Country:
    United Kingdom
    So has anyone figured out how to add familiars yet? Or better still how I can change one of my golden familiars into a normal one, then I can pass this quest and then undo the change.
     
  9. wdf

    Newcomer wdf Newbie

    Joined:
    Mar 10, 2013
    Messages:
    5
    Country:
    United States
    You could search for that golden familiars' code with the known digits and change those into the normal one.
    The same you do to get the tickets.
    Also the saveditors could do it.

    Any progress on adding/managing Inventory Items Maximus?
    Thank you for the work, looks nice so far already!
     
  10. ToraxOutlaw

    Newcomer ToraxOutlaw Member

    Joined:
    Feb 17, 2013
    Messages:
    13
    Location:
    Stoke-on-Trent
    Country:
    United Kingdom
    I wouldn't know where to begin, and it's just the golden trumpy-pumper that i need change into the normal one. If anyone can explain and give my clear instructions on how do this I'll be extremely grateful. And yes I have captured a golden trumpy-pumper familiar.
     
  11. smokey17

    Newcomer smokey17 Newbie

    Joined:
    Mar 11, 2013
    Messages:
    1
    Country:
    Canada
    amazing job you guys, i used the ni no kuni save editor for guilders (cos i didnt want 999 g like all the others) however the reason for me wanting guilders is for casino coins... and there isint an offset for that lol. bruteforce doenst work for me for some reason.. just wondering if i can use this editor for just casino coins..? thanks in advance
     
  12. dgwillia

    Member dgwillia The Bacon Lover

    Joined:
    Mar 9, 2008
    Messages:
    2,171
    Location:
    Columbia Station, Ohio
    Country:
    United States
    This is confusing me pretty badly, and its just my luck the Inventory Editor won't work on my computer. I'm just trying to add the Griffy Ticket, and I saw someone earlier post they added it in after Drippy's Hamelin Armor. Does that mean I just copy paste it directly after that key? Or do I have to keep it in sequence like everything else is

    I'm new to this sort of thing lol, so any help is appreciated
     
  13. Laraid

    Newcomer Laraid Newbie

    Joined:
    Jul 5, 2012
    Messages:
    2
    Country:
    Puerto Rico
    Just wanted to say thanks for the awesome guide.
     
  14. ryguy5254

    Newcomer ryguy5254 Member

    Joined:
    Mar 13, 2013
    Messages:
    11
    Country:
    United States
    I just want to thank everybody in the thread for the instructions, and the editors.

    I was able to get a decent amount of money, and get merit cards or merit points. And sooner or later, I'll get the tickets.
     
  15. er0_senn1n

    Newcomer er0_senn1n Newbie

    Joined:
    Mar 12, 2013
    Messages:
    1
    Country:
    Australia
    Great work with the editors guys, making my second play through rather amusing
     
  16. Dakarus

    Newcomer Dakarus Newbie

    Joined:
    Mar 13, 2013
    Messages:
    2
    Location:
    Ohio
    Country:
    United States
    Could someone edit my save for me? I don't really want to go through learning how to hex edit and all those things. What I basically need is all the ingredients and treats maxed out to 99. I am tired of trying to get scrolls of truth. If this is possible for someone to do I would really appreciate it. Shoot me a PM if you are interested!
     

    Attached Files:

  17. wdf

    Newcomer wdf Newbie

    Joined:
    Mar 10, 2013
    Messages:
    5
    Country:
    United States
    Maximus, be able to parse the read name into the treeview would be great for familiars and characters,
    also with a lookup for the item ids the same could be done for items, making editing vastly easier.
    similarly for skills.

    any chance to get your source code this weekend?
     
  18. Don Killah

    Member Don Killah GBAtemp Maniac

    Joined:
    Nov 21, 2002
    Messages:
    1,127
    Country:
    France
    Yep, would be glad to peek around and improve it :D
     
  19. Dakarus

    Newcomer Dakarus Newbie

    Joined:
    Mar 13, 2013
    Messages:
    2
    Location:
    Ohio
    Country:
    United States
    Haha...nevermind. I found the inventory editor a few pages back. I got everything I needed. Thank you for whomever made it!
     
  20. MarcusJester

    Newcomer MarcusJester Newbie

    Joined:
    Mar 7, 2013
    Messages:
    1
    Country:
    Canada
    Some quick questions regarding the Editors currently found in this awesome thread.

    First, a huge THANK YOU to these guys for researching designing and posting three great editors!

    gimmestuff02:
    Inventory Editor.
    http://gbatemp.net/threads/ni-no-kuni-us-save-modification.341864/page-9#post-4552337

    MaximusArg1982:
    Save Character and Familiar stats Editor.
    http://gbatemp.net/threads/ni-no-kuni-us-save-modification.341864/page-14#post-4575462

    jakdo:
    Dotnet Character and Familiar Editor.
    http://gbatemp.net/threads/ni-no-kuni-us-save-modification.341864/page-13#post-4571058

    Gimmestuff, are you going to expand your editor to familiars / characters?

    Maximus, are you going to expand your editor to include items?

    jakdo, are you going to expand your functionality as well?

    I would love to see a comprehensive all-in-one editor from you guys if you have time, however, I have found that using each editor separately still allows me to update stats, items, money and bonuses with ease.
    I wish I had programming knowledge so I could contribute to these projects.

    Cheers guys and thanks again!
     

Share This Page