GithubHelp home page GithubHelp logo

Comments (6)

h3x4n1um avatar h3x4n1um commented on August 27, 2024

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

from reton.

webfussel avatar webfussel commented on August 27, 2024

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

from reton.

nineteendo avatar nineteendo commented on August 27, 2024

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.

from reton.

h3x4n1um avatar h3x4n1um commented on August 27, 2024

Used with the newest 3.1.2 release.

Can you try it again with 3.1.3?

from reton.

h3x4n1um avatar h3x4n1um commented on August 27, 2024

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

  • We can't infer the data type from json format
  • By default, RETON using the upper bound limit of the data type (e.g use double for real number instead of float, use 8-byte RTON number for integer) to cover as widest range as possible
  • However, some specific RTON keys appear to have predefined data type, maybe I can try to implement this into RETON?

from reton.

nineteendo avatar nineteendo commented on August 27, 2024

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.

from reton.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.