diff --git a/BL3_find_items.py b/BL3_find_items.py index adff4fa..6f1dd75 100644 --- a/BL3_find_items.py +++ b/BL3_find_items.py @@ -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")