You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my research I have stumbled across multiple issues that might extend to your tool as well:
Duplicate Keys
A file can contain duplicate keys, in most coding languages this leads to the first value of the first key being replaced by the value of the last key.
I'm afraid this will require much work to solve. I used arrays of tuples and a FakeDict class to make the json library interpret them as a dictionary with duplicate keys, no idea how you could approach this.
Latin strings
Non-unicode strings are probably latin-1 and not ASCII, this also complicates converting json back to rton.
Repairing files
catch errors related to end of file:
not enough data for a number
no data left to specify the next data type
unicode with an unexpected character length (just mention it during the conversion)
array with an unexpected length (use array end to end the array not the length)
Extension
[objects][objclass] defines the extension when the json doesn't include it pp.rton instead of pp.dat.rton:
["DraperSaveData", "GlobalSaveData", "PlayerInfoLocalSaveData", "LootSaveData", "SaveGameHeader"] result in .bin
"PlayerInfo" results in .dat
others result in rton
The text was updated successfully, but these errors were encountered:
I'm truly thank you for your suggestion, but I'm afraid I'm kinda busy lately (a lot of university deadline are chasing me plz help). I'll take a look on your idea after I have more free time to spend on RETON project :(
Why would I propose this?
I recently finished 1Zulu's RTONParser and a tool for the reverse written in Python and it's working very well: https://github.com/Nineteendo/PVZ2tools/tree/master/RTONConverter
Format
I suggest a more logical format (but I'm not sure if -uRTON_int32_t is correct):
0x0
0x83
0x1
0x2
0x83
0x3
0x83
0x8
0x9
0xa
0xb
0x10
0x11
0x12
0x13
0x20
0x21
0x22
0x23
0x24
0x25
0x26
0x27
0x28
0x40
0x41
0x42
0x43
0x44
0x45
0x46
0x47
0x48
0x81
0x82
0x83
0x0
,0x2
and0x3
0x84
0x85
0xff
0x86
0xfd
followed by uRTON_t ends with0xfe
0x90
0x91
0x92
0x93
0xfd
0xfe
0xfe
0xff
Potential Issues
In my research I have stumbled across multiple issues that might extend to your tool as well:
Duplicate Keys
A file can contain duplicate keys, in most coding languages this leads to the first value of the first key being replaced by the value of the last key.
I'm afraid this will require much work to solve. I used arrays of tuples and a FakeDict class to make the json library interpret them as a dictionary with duplicate keys, no idea how you could approach this.
Latin strings
Non-unicode strings are probably latin-1 and not ASCII, this also complicates converting json back to rton.
Repairing files
catch errors related to end of file:
Extension
[objects][objclass] defines the extension when the json doesn't include it pp.rton instead of pp.dat.rton:
The text was updated successfully, but these errors were encountered: