lslib icon indicating copy to clipboard operation
lslib copied to clipboard

BG3 PAK extraction produces thousands of empty files

Open hypermorphicmods opened this issue 1 year ago • 0 comments

Extracting the most recent Patch3_Hotfix* with divine or ConverterApp creates 33,000 zero-length files in the output. I tracked it down to this flag in PackagedFileInfo:

https://github.com/Norbyte/lslib/blob/0354342705d23ee770452e653d5f8bb293a60296/LSLib/LS/PackageCommon.cs#L519-L522

I couldn't find any instances of value 0xdeadbeefdeadbeef, but the Patch files have entries flagged 0x0000beefdeadbeef that are empty except for the filename. They must be placeholders rather than deletions, since the game couldn't run without them. For whatever reason they're ramping up in number:

Patch0_Hotfix2.pak:1
Patch0_Hotfix3.pak:3
Patch0_Hotfix4.pak:3
Patch1.pak:1052
Patch2.pak:7448
Patch2_Hotfix1.pak:7458
Patch2_Hotfix2.pak:7463
Patch3.pak:7496
Patch3_Hotfix1.pak:7496
Patch3_Hotfix2.pak:33301
Patch3_Hotfix3.pak:33299

Could they be excluded from extract and list operations?

hypermorphicmods avatar Oct 17 '23 00:10 hypermorphicmods