Closed RealDarkCraft closed 7 months ago
I solved the problem in type padding there are first the 4 bytes of the type exemple Uint32 (04000000) and the next 4 octet is a kind of ID because in my save there have sereval value for an same name like this : { "type": "UInt32Property", "name": "SaveDataArea", "value": 8 }, { "type": "UInt32Property", "name": "SaveDataArea", "value": 65540 }, { "type": "UInt32Property", "name": "SaveDataArea", "value": 1 }
so the ID is a 4-byte hex (int32) that allows the game to differentiate between the values (for exemple, for the money value, he has the id to "591c0000" (7257) for UInt32, so the correct padding is 04000000591c0000)
This is the same issue #13 and #14 run into. I started implementing a way of handling this in the duplication-index branch but didn't like how annoying it made the rest of the API so haven't figured out what to do with it yet.
This is the same issue #13 and #14 run into. I started implementing a way of handling this in the duplication-index branch but didn't like how annoying it made the rest of the API so haven't figured out what to do with it yet.
it's not a problem, in fact I'm already using a python program that can do it, and the reason I made this issue was that I had another problem but I solved it in fact, when padding types such as Uint32, int8... the program set the padding to (for example, for UInt32) : to : 04000000 00000000 the first 4 bytes are correct, but the next 4, which are set to "00000000", are not necessarily "00000000".
the program does not support variables with several of the same name (example): the program gives this: "SaveSlotName": { "Str": { "value": "SaveData001" } }, "FirstName": { "Int8": { "value": 107 } }, "LastName": { "Int8": { "value": 116 } }, "Month": { "Int": { "value": 4 } },
when it should look something like this : { "type": "StrProperty", "name": "GameName", "unknown": "0a", "value": "LIBRA" }, { "type": "StrProperty", "name": "SaveSlotName", "unknown": "10", "value": "SaveData001" }, { "type": "Int8Property", "name": "FirstName", "value": 72 }, { "type": "Int8Property", "name": "FirstName", "value": 101 }, { "type": "Int8Property", "name": "FirstName", "value": 108 }, { "type": "Int8Property", "name": "FirstName", "value": 108 }, { "type": "Int8Property", "name": "LastName", "value": 66 }, { "type": "Int8Property", "name": "FirstName", "value": 111 }, { "type": "Int8Property", "name": "LastName", "value": 66 }, { "type": "Int8Property", "name": "LastName", "value": 68 }, { "type": "IntProperty", "name": "Month", "value": 4 },
and the other problem I've had with an another program (but wich correctly make the json), even if the json is created correctly, is that in the original gvas there are extra bytes in the padding (which the program set to 00000000). exepmle : original gvas file : SaveDataArea����UInt32Property���{0x14}H{0x03}���"���� modified gvas ( {0x14},H and {0x03} were replaced by 0x0): SaveDataArea����UInt32Property���������"����
sample file :
(the file was named with .txt because otherwhise i can't send it on github) decrypted.sav.txt