vdf icon indicating copy to clipboard operation
vdf copied to clipboard

Add deserialization support for new binary VDF w/ key table

Open Matoking opened this issue 1 year ago • 5 comments
trafficstars

The new Steam beta introduced a new appinfo.vdf version. This appinfo.vdf V29 introduces a new binary VDF format which does not include field keys in binary VDF segments as-is. Instead, each key is represented by a 32-bit integer which needs to be mapped to an actual string using a table stored at the end of the appinfo.vdf file.

This also means the binary VDF segments in this case are no longer self-contained. The developer can parse and provide the table themselves or instead use the ValvePython/steam library which contains a function to parse appinfo.vdf files.

Also see SteamDatabase/SteamAppInfo@56b1fec7f5ce6be961c3e44cf9baf117e363ad91

Refs ValvePython/steam#462

Matoking avatar Jun 30 '24 21:06 Matoking

This fix is also needed over at https://github.com/cbartondock/node-binary-vdf in case you feel like submitting a PR :) if not I will work on borrowing your code! Good job figuring this out.

cbartondock avatar Jul 12 '24 19:07 cbartondock

This fix is also needed over at https://github.com/cbartondock/node-binary-vdf in case you feel like submitting a PR :) if not I will work on borrowing your code! Good job figuring this out.

Thank you, you can use this PR as a reference.

I can't take full credit, though; SteamDatabase/SteamAppInfo was the first to figure out the new format to my knowledge and this implementation is based on their findings.

Matoking avatar Jul 13 '24 10:07 Matoking

Okay just got it finished. The node module is binary-vdf-2. In case anyone needs the code for reference:

https://github.com/cbartondock/node-binary-vdf/blob/master/src/index.ts

cbartondock avatar Jul 14 '24 23:07 cbartondock

Maintainers, please pick this up and release it so that the library doesn't need to published to PyPI under a new name. It is now more urgent as the stable version of Steam is now using this new format.

chewi avatar Sep 15 '24 13:09 chewi

Just going to point out that, if the maintainer doesn't return, we have a fork that has this and many of the other pending PRs merged: https://github.com/solsticegamestudios/vdf

The python-vdf package on AUR also points to this fork now.

WinterPhoenix avatar Sep 16 '24 07:09 WinterPhoenix