topche-katt / hlsavetool

Uncompress and compress sqlite db from Hogwarts Legacy gvas save file
MIT License
6 stars 0 forks source link

Could this work for switch save files? #7

Open yurisasc opened 3 weeks ago

yurisasc commented 3 weeks ago

Hi, I followed the tutorial to decompress save files and got this error. I'm wondering if it's because the save file is from the Nintendo Switch version of the game.

Trying to decompress save file "HL-00-14.orig"
[Info] Input file: HL-00-14.orig
[Info] Output file: HL-00-14.decomp
[Info] Input file size: 449636 bytes
[Info] Input file memory buffer size: 449636 bytes
[Info] GVAS File Header:
[Info]  Signature: 0x47564153
[Info]  Version: 2
[Info]  Package: 524
[Info]  Engine: 4.27.2 (2148711348)
[Info] Address of Base: 8921088
[Info] Address of RawDatabaseImage: 8923123
[Info] Head address 8921088 and size 2035 bytes
[Info] Head relative offset: 2035
[Info] FString of length [17] and value (RawDatabaseImage)
[Info] FString of length [14] and value (ArrayProperty)
[Info] ArrayProperty value length: 228812 bytes
[Info] FString of length [13] and value (ByteProperty)
[Info] ByteProperty value length: 228808 bytes
[Info] ByteProperty value signature: 0xC1832A9E
[Info] Tail address 9152000 and size 218724 bytes
[Info] Tail relative offset: 230912
[Info] Before processing RawDatabaseImage with -d command
[Info] Decompressing 228808 bytes of data...
[Info] Compressed Block #0:
[Info]  Signature: 0xC1832A9E
[Info]  Scratch max size: 131072 bytes
[Info]  Compressed size: 9385 bytes
[Info]  Uncompressed size: 131072 bytes
[Info]  Decompressed: 131072 bytes
[Info] Compressed Block #9433:
[Info]  Signature: 0xC1832A9E
[Info]  Scratch max size: 131072 bytes
[Info]  Compressed size: 11550 bytes
[Info]  Uncompressed size: 131072 bytes
[Info]  Decompressed: 131072 bytes
[Info] Compressed Block #21031:
[Info]  Signature: 0xC1832A9E
[Info]  Scratch max size: 131072 bytes
[Info]  Compressed size: 19492 bytes
[Info]  Uncompressed size: 131072 bytes
[Info]  Decompressed: 0 bytes
[Error] Compressed block partial decompression detected! expected 131072 bytes; decompressed 0 bytes.

The switch save files by default don't have any format like .sav from the PC version. Here's the save file if you want to take a look: https://www.dropbox.com/scl/fi/xue7ml34h6wjgavjjb9h5/HL-00-14?rlkey=t0xdobsx4vtbmt0hiy0cprite&st=wk9botkk&dl=1

topche-katt commented 2 weeks ago

File structure is the same on switch and pc. I took a quick look and the file seems fine, however, decompressing that specific block of data fails. I will take a deeper look when I have more time and see if I can fix it. Thank you for your report.

yurisasc commented 2 weeks ago

Thank you for looking into it! To give more context, the save file is still in the early game and hasn't reached the point of unlocking Talent Points. I'm not sure if it matters, but considering that the save editor had an issue with it, I thought it's worth mentioning.

yurisasc commented 2 weeks ago

I have just tested with a save that has unlocked Talent Points, but still got the same error. The game version is 1.0.4