h3x4n1um / RETON

Reverse Engineering RTON File
GNU General Public License v3.0
33 stars 3 forks source link

I used the program to edit pp.dat Pvz2, but it did not open the game #14

Open L-byte12 opened 3 years ago

L-byte12 commented 3 years ago

Can it be used in pvz 2? Sorry my english. I used the program to edit( but I did not edit I wanted to see if the game would run, I did the same as the guy who asked you before). I copy what he said

1. I copy pp.dat from android to my laptop
2. I run the rton executable file
  1. Pp.dat is recognised as a rton file. A new folder is created which contains a json file. (without editing the json file, to identify at which stage my issue is occurring)
    1. I again run the executable, now producing a .Rton file. 5 I rename this file pp.dat 6 I copy this version of pp.dat back to my android device On attempting to open pvz2, the screen goes black for a few seconds then back to the home screen. On replacing pp.dat with the old version, the app opens as usual

Sorry, sorry I'm not a programmer and I don't know much but I saw that they are different

I do not know if I am using it well, check the .dat and they are not the same. I attach a pdf https://drive.google.com/file/d/1lLbKhnEI5AT0dcHTfXGIm9YMnVFnb9Zp/view?usp=sharing

Thanks for your time

h3x4n1um commented 3 years ago

If you can please upload your file, it's more useful than screenshot open in Notepad++

webfussel commented 3 years ago

Hello there,

I have the same issue.

-> copy pp.dat from phone to desktop -> run rton2json -> edit -> run json2rton -> rename to pp.dat -> copy to phone -> black screen, app shuts down

Used with the newest 3.1.2 release.

I've added my original pp.dat (pp_original.dat), the modified pp.json and the new pp.dat into this Google Drive. Hope it helps.

Files - Google Drive

nineteendo commented 3 years ago

Firstly RETON seems to have sorted the keys which is not supposed to happen, this might shuffle #comments around. However a much bigger problem seems to be the fact that not the correct data types are used, this will require manual configuration and a major code rewrite ... This is what my tool spits out (https://github.com/Nineteendo/PVZ2tools/tree/master/RTONS_PARSER, https://github.com/Nineteendo/PVZ2tools/tree/master/JSONS_PARSER): pvz2-rton2json.zip

Conversions that happened (> = my tools, >RTON> = your tool): Unmodified(pp_original.dat > pp_original.json > pp_original_from_rton.dat) Modified(pp.json >RETON> pp.dat > pp_from_json.dat > pp_from_json_from_rton.dat) Modified(pp.json > pp_from_rton.dat) webfussel should be able to use this if still interested

Note that my tool is not perfect, just a few bytes get changed.

h3x4n1um commented 3 years ago

Used with the newest 3.1.2 release.

Can you try it again with 3.1.3?

h3x4n1um commented 3 years ago

Firstly RETON seems to have sorted the keys which is not supposed to happen, this might shuffle #comments around. However a much bigger problem seems to be the fact that not the correct data types are used, this will require manual configuration and a major code rewrite ... This is what my tool spits out (https://github.com/Nineteendo/PVZ2tools/tree/master/RTONS_PARSER, https://github.com/Nineteendo/PVZ2tools/tree/master/JSONS_PARSER): pvz2-rton2json.zip

Conversions that happened (> = my tools, >RTON> = your tool): Unmodified(pp_original.dat > pp_original.json > pp_original_from_rton.dat) Modified(pp.json >RETON> pp.dat > pp_from_json.dat > pp_from_json_from_rton.dat) Modified(pp.json > pp_from_rton.dat) webfussel should be able to use this if still interested

Note that my tool is not perfect, just a few bytes get changed.

About the sorted keys: it's a bug because I using std::map to save the json data when converting json to rton, it should be fixed by 3.1.3 release (I switch to nlohmann::fifo_map)

And the other part, the data type: this kinda headache because

nineteendo commented 2 years ago

Well, I think the format is not so strict as first imagined. You don't have to use the predefined datatype, but you do have to respect the RTON format.

Maybe it was just the fact that the keys were sorted, I will check at 17 hours which files are accepted.