Skip to content

Instantly share code, notes, and snippets.

@EhsanKia
Created March 21, 2022 08:46
Show Gist options
  • Save EhsanKia/232943e8ab8fad2ee99d33aa57c168ff to your computer and use it in GitHub Desktop.
Save EhsanKia/232943e8ab8fad2ee99d33aa57c168ff to your computer and use it in GitHub Desktop.
Unpacks Game Pass SAVEDATA for Tunic into individual Steam format
import re
with open('5E113D5F383749AEB72703486DD8247B', 'rb') as fp:
data = fp.read()
filenames = re.findall(rb'\d+\.txt', data)
contents = re.findall(rb'(true\|1[^\0]+)', data, re.DOTALL)
for name, content in zip(filenames, contents):
with open(name.replace(b'.txt', b'.tunic'), 'wb') as fp:
fp.write(content.strip())
@CelesteGH
Copy link

Thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment