Petschko / Java-RPG-Maker-MV-Decrypter

You can decrypt whole RPG-Maker MV Directories with this Program, it also has a GUI.
MIT License
379 stars 51 forks source link

"java.lang.NullPointerException" error #35

Closed TurnUpTheLove closed 2 years ago

TurnUpTheLove commented 2 years ago

Above All, I appreciate your time and efforts involved in making this tool. I found it very useful and convenient. But, I got an problem when try decrypting image files.

When I try to decrypt ".png_" files in cmd or PowerShell with following command; java -jar "RPG Maker MV Decrypter.jar" decrypt [FileDirectory] (I blinded a detailed file directory because of concern about privacy being exposed. I'm so sorry and would appreciate if you could be willing to understand me.)

It responds like this; INFO: Set Project-Dir to: "[FileDirectory]" INFO: Set Output-Dir to: "output" java.lang.Exception: java.lang.NullPointerException: System-File is not set! at org.petschko.rpgmakermv.decrypt.RPG_Project.decryptFilesCmd(RPG_Project.java:407) at org.petschko.rpgmakermv.decrypt.RPG_Project.decryptFilesCmd(RPG_Project.java:386) at org.petschko.rpgmakermv.decrypt.cmd.Decrypt.handleFiles(Decrypt.java:97) at org.petschko.rpgmakermv.decrypt.cmd.Decrypt.run(Decrypt.java:75) at org.petschko.rpgmakermv.decrypt.cmd.CMD.processArgs(CMD.java:141) at org.petschko.rpgmakermv.decrypt.cmd.CMD.runCMD(CMD.java:56) at org.petschko.rpgmakermv.decrypt.App.main(App.java:45) Caused by: java.lang.NullPointerException: System-File is not set! at org.petschko.rpgmakermv.decrypt.Decrypter.detectEncryptionKeyFromJson(Decrypter.java:391) at org.petschko.rpgmakermv.decrypt.RPG_Project.decryptFilesCmd(RPG_Project.java:405) ... 6 more

And it create a folder named "output", which is actually empty.

Here's some information about my system options. OS : WIN 10 Pro 64bit JAVA : JAVA™ SE 17.0.1

It would be great if anyone could help me. Thank you.

Petschko commented 2 years ago

It looks like if the Game you try to decrypt has no System.json or it may cannot find the System.json - thats why there is the null-pointer exception (I could give it a better error message to be honest) So make sure to select the Game-Root dir and not a sub-dir within the game! If you selected the Root-Dir, the System.json is may not in there... You can also manually enter the decryption key if you knew it. Problem is since you didnt showed the path youre using i just can guess whats happening here, fact is it can not find the system.json (which includes the decryption key for decrypting)

Important For Decrypting (Images) however you don't need the Key, so use the command "restore" instead of "decrypt", then you may can restore the images without the System.json >w0 the decrypt command is only when you want to decrypt sound files too - images can restored with the restore cmd~ aka use: java -jar "RPG Maker MV Decrypter.jar" restore [FileDirectory]

Petschko commented 2 years ago

Any news here? If yes please reply, I close this