From cd42630ace6af31026c91a5b5e98485cd5872fdb Mon Sep 17 00:00:00 2001 From: drojf <1249449+drojf@users.noreply.github.com> Date: Mon, 22 Jan 2024 00:11:34 +1100 Subject: [PATCH] Add some extra debug info in case of error --- scripts/EMIPGenerator.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/EMIPGenerator.py b/scripts/EMIPGenerator.py index 6ebad72..d45bbeb 100644 --- a/scripts/EMIPGenerator.py +++ b/scripts/EMIPGenerator.py @@ -64,6 +64,9 @@ class AssetEdit: def loadTexture2DInfo(self, assets, bundle): self.shouldDecode = True + print(f'Writing {self.file} with id {self.id}') + if self.id not in assets.objects: + raise Exception(f"ERROR: When loading Texture2D info for file {self.file} with id {self.id}, the id was not found. Are you sure the ID {self.id} is correct/exists in the sharedassets?") obj = assets.objects[self.id] data = bundle[obj.data_offset:(obj.data_offset + obj.size)] length = int.from_bytes(data[0:4], byteorder='little') @@ -163,6 +166,8 @@ def generateHeader(numEdits): header += numEdits.to_bytes(4, byteorder='little') # Number of file changes return header +print(f"Running EMPIGenerator in directory [{sys.argv[2]}]") + edits = [] for file in os.listdir(sys.argv[2]):