nson editor

UserNo999

Newbie
Feb 26, 2021
21
30
Hey guys,

I worked on this little python script to decrypt nson files, which are the save files for games like "Wonder Save Trainer" or "Tomie Wanna Get Married". So far its really just a simple script that decompresses the nson files into plaintext json files. After editing you can then compress them again with the same script.

Tested on Ubuntu 20.04 with "Tomie Wanna Get Married".

To use the script rename the attached file to "nson_edit.py" and execute it like this to extract the json fiile.

Bash:
python3 nson_edit.py -x -i nsonfile -o jsonfile
Afterwords you can compress the json file again with this command:

Bash:
python3 nson_edit.py -c -i jsonfile -o nsonfile
Update: For Windows users: Replace "python3" with "py", that is the windows python launcher.

Feel free to ask me anything or provide helpful feedback how i could improve my post/program/writing whatever.
Have a nice day. :giggle:
 
Last edited:

gk000000666

New Member
Jul 14, 2019
5
9
How would you run this on a Windows machine.

I tried with Python 3.9 and with CMD with the command line you provided but all I am getting is syntax errors:invalid syntax.

Thank you
 
  • Like
Reactions: UserNo999

UserNo999

Newbie
Feb 26, 2021
21
30
How would you run this on a Windows machine.

I tried with Python 3.9 and with CMD with the command line you provided but all I am getting is syntax errors:invalid syntax.

Thank you
If you installed python normally, there is the windows launcher "py". Just replace "python3" with "py" and you should be good to go.
Will update the post, because most users are probably windows users.
 
  • Like
Reactions: gk000000666

gk000000666

New Member
Jul 14, 2019
5
9
Ok I got this script working in Windows.

I had to run it in Command Line and make sure the nson_edit.py file is in the same folder as your save files. I also moved my save files to my download folder as I got a file name length error trying to run it in the LocalLow location of most Unity saves. Always make a duplicate of the save you are trying to edit incase of errors.

For Command Line you will have to download the Python plugin. In Windows 10 this is easy as the first time you try and run a command line with python3 at the front it will tell you don't have it and open it up in the Windows Store. After that is installed run the following command:

python3 nson_edit.py -x -i C:/Users/system/Downloads/GameSave001.nson -o C:/Users/system/Downloads/GameSave001.json

You should now be able to open your new json file in a text editor. After you are finished editing and need to convert back to a nson file run this command:

python3 nson_edit.py -c -i C:/Users/system/Downloads/GameSave001.json -o C:/Users/system/Downloads/GameSave001.nson

Move your file back to your games LocalLow save location. I tested it and gave myself more money in Wonder Slave Trainer.

Thank you UserNo999 for creating this script.
 

Gtogtz

Newbie
Dec 27, 2017
48
70
This is my error I am getting what am I doing wrong?

python3 nson_edit.py -x -i J:/WWS/GameSave002.nson -o J:/WWS/GameSave002.json
python3: can't open file 'nson_edit.py': [Errno 2] No such file or directory

Update
Insured nson_edit.py is on the same path, also tried moving my / to \ just to see if it changed anything, still the same error.
 
Last edited:

UserNo999

Newbie
Feb 26, 2021
21
30
Always make a duplicate of the save you are trying to edit incase of errors.
Very true! Backup is always important.

For Command Line you will have to download the Python plugin.
You can also just install the normal windows installer from the python website:

After that you will also have the standard windows "py" launcher available.

python3 nson_edit.py -x -i C:/Users/system/Downloads/GameSave001.nson -o C:/Users/system/Downloads/GameSave001.json
If you copy the files into the same directory as the nson_edit script you dont have to use the long path names. It is also possible to just rename the file first, so that after renaming "GameSave001.nson" to "S1.nson" you can use this command:

Code:
py nson_edit.py -x -i S1.nson -o S1.json
Nonetheless i am happy it worked for you!
 

UserNo999

Newbie
Feb 26, 2021
21
30
This is my error I am getting what am I doing wrong?
My suggestion: make a completely new directory and put the script file plus a copy of your game save file into it. This way you don't have any hassle with path names.
Protip: If you open the explorer and click into the address bar you can simply type "cmd" and it will open the commandline in that specific directory.
 

nghia91111

Newbie
Jun 1, 2021
27
21
Done. Change attached file extension to ".nson" and copy into game save folder. Tell me if it worked and have fun!
It worked, i m so happy now. All things i had done before my old save files gone forever have just recoverd the most important part thank to you.
 
Last edited:
  • Like
Reactions: UserNo999

MysticFox

New Member
Nov 9, 2017
4
1
may i request visual aid im having such a hard time reading through and it might just be my dyslexia kicking in idk, just like picture guide or video would be really appreciated! <3
 

UserNo999

Newbie
Feb 26, 2021
21
30
may i request visual aid im having such a hard time reading through and it might just be my dyslexia kicking in idk, just like picture guide or video would be really appreciated! <3
I currently only have access to a Linux System which wouldn't really help you. But im planning to extend my basic script with a full graphical interface which will make it much easier for you guys to use. I just cannot tell when im going to write that. Maybe a week maybe 2. I will message you when im done. Stay tuned.
 

excalibertypo

Active Member
Apr 10, 2020
509
404
My suggestion: make a completely new directory and put the script file plus a copy of your game save file into it. This way you don't have any hassle with path names.
Protip: If you open the explorer and click into the address bar you can simply type "cmd" and it will open the commandline in that specific directory.
having same issue please help
 

3lfscout

Member
Jan 8, 2018
412
529
-x works

-c not so much

case Tomie version 1.260, "GameSave007.nson"
-> -x:
"GameSave007.json"
change jokers to 90 (after finding it)
-> -c:
TypeError: compressobj() takes no keyword arguments