Skip to content

Commit

Permalink
BL3: Expand to read the entire header
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosuav committed Sep 9, 2023
1 parent 0a1da25 commit 1f57adf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions BL3_find_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ class SaveFileFormatError(Exception): pass
def parse_savefile(fn):
with open(fn, "rb") as f: data = Consumable(f.read())
if data.get(4) != b"GVAS": raise SaveFileFormatError("Invalid magic number - corrupt file?")
header = data.get(18) # Version numbers, various. Probably irrelevant.
buildid = data.str()
fmtver = data.int()
# The keys are GUIDs and the meanings are opaque. I don't know if order is significant but let's preserve it.
fmt = {data.get(16): data.int() for _ in range(data.int())}
savetype = data.str()

def main(args=None):
parser = argparse.ArgumentParser(description="Borderlands 3 save file reader")
Expand Down

0 comments on commit 1f57adf

Please sign in to comment.