sonic2kk / steamtinkerlaunch

Linux wrapper tool for use with the Steam client for custom launch options and 3rd party programs
GNU General Public License v3.0
2.14k stars 72 forks source link

vdf parsing via bash #292

Closed frostworx closed 3 years ago

frostworx commented 3 years ago

I'm going to remove the appinfo-vdf dependency again and get the required info from the Appinfo directly instead.

frostworx commented 3 years ago

removed in https://github.com/frostworx/steamtinkerlaunch/commit/c61081c2f99df280315903b665c39e36dc381690

frostworx commented 3 years ago

33/436 tested games didn't find their data file in appinfo - needs further reinvestigation... (reopened)

frostworx commented 3 years ago

Hm, one of the appids not found is APPID=39690.

The "find commandline" basically is

sed "s/\x61\x70\x70\x69\x64\x00${SHEXOUT}\x00\x00/APPID$1/g" "$AIVDF" | strings | sed -n "/APPID$1/,/^appid/p"

where SHEXOUT='\x0A\x9B' (reversed appid in hex) and AIVDF is the appinfo.vdf. This is identical for all appids, and everything is sane - no idea why it doesn't return anything (for now)

frostworx commented 3 years ago

Little test gist if someone wants to play with it: https://gist.github.com/frostworx/373fda92e335b50c41d111bd15548b28

The data for the following game appids can't be found here - would be good to know if this is reproducible on other systems:

1255980 Portal Reloaded
1383690 A Wake Inn
207420  Wizorb
208650  Batman™: Arkham Knight
220160  Trials Evolution Gold Edition
2600    Vampire: The Masquerade - Bloodlines
264710  Subnautica
39690   ArcaniA
417290  Ghost of a Tale
497450  Blortasia
547590  Pinball FX2 VR
552970  Sumoman
571740  Golf It!
605450  In Death
663190  Dream Coaster VR Remastered
667800  Loco Dojo
668430  V-Racer Hoverbike
673060  Floor Plan: Hands-On Edition
674150  Simon the Sorcerer: 25th Anniversary Edition
678760  Simon the Sorcerer 2: 25th Anniversary Edition
681280  Descenders
685110  Metachromium
685690  Guns'n'Stories: Bulletproof VR
690040  SUPERHOT: MIND CONTROL DELETE
690120  Inked: A Tale of Love
690640  Trine 4
690790  DiRT Rally 2.0
694090  Apex Construct
704360  SACRALITH
704470  VR Furballs
719040  Wasteland 3
892970  Valheim
frostworx commented 3 years ago

Instead of avove test gist, you could also stl createappinfo all which will try to get data for all your (installed/those which have an appmanifest acf) games from your appinfo.vdf and save it to ~/.config/stl/games/appinfo/$APPID.txt (will need some time, depending on how many games are installed/have an appmanifest)

All files with 0 bytes could not be found for unknown reason.

frostworx commented 3 years ago

Extracting all owned games (SteamAppId) from the packageinfo.vdf works fine in bash utilizing xxd likely this will also be the solution for above appinfo.vdf "problem". Thanks all! 👍

frostworx commented 3 years ago

The ~/.config/stl/games/appinfo/*.txt file won't be used anymore, and can be manually deleted (if you want).

Instead .bin files will be stored there. The reason is simple: The .bin files contain more information (all game info available in the appinfo.vdf), which might be used in later functions.

frostworx commented 3 years ago

The new binary extractor seems to work pretty good. with stl createappinfo o it extracted >6500 files here. This apparently covers most owned games (I own less, so there are some tools, proton appids as well), but not all, as

207420  Wizorb
690040  SUPERHOT: MIND CONTROL DELETE

from the list above are still missing.

frostworx commented 3 years ago

major rewrite landed with https://github.com/frostworx/steamtinkerlaunch/commit/6d288623419a25d71fd125038bedc263400a49e5

Thanks again all, really great! 👍