Support for all Battlefield 3 DLC
Closed this issue · 3 comments
cmathew commented
dumper.py seems to have issues with dumping DLC Xpack 2. Stack trace:
==== RESTART: R:\Tools\Battlefield 3\Frostbite-Scripts\frostbite2\dumper.py ====
Reading cat entries...
Reading patched cat entries...
Extracting DLC Xpack1...
Win32\Xp1Chunks.toc
Win32\Levels\XP1_001\XP1_001.toc
Win32\Levels\XP1_002\XP1_002.toc
Win32\Levels\XP1_003\XP1_003.toc
Win32\Levels\XP1_004\XP1_004.toc
Extracting DLC Xpack2...
Win32\Xp2Chunks.toc
Traceback (most recent call last):
File "R:\Tools\Battlefield 3\Frostbite-Scripts\frostbite2\dumper.py", line 364, in <module>
dumpRoot(os.path.join(updateDir,dir,"Data"),patchDir,targetDirectory)
File "R:\Tools\Battlefield 3\Frostbite-Scripts\frostbite2\dumper.py", line 333, in dumpRoot
dump(fname,outPath)
File "R:\Tools\Battlefield 3\Frostbite-Scripts\frostbite2\dumper.py", line 175, in dump
noncasChunkPayload(sb,entry,path)
File "R:\Tools\Battlefield 3\Frostbite-Scripts\frostbite2\dumper.py", line 239, in noncasChunkPayload
out.write(zlibb(sb,entry.get("size"),False))
File "R:\Tools\Battlefield 3\Frostbite-Scripts\frostbite2\dumper.py", line 263, in zlibb
outStream.write(zlib.decompress(data))
zlib.error: Error -3 while decompressing data: incorrect header check
NicknineTheEagle commented
DLCs should already get extracted properly, I think I've caused a regression somewhere.
cmathew commented
DLCs should already get extracted properly, I think I did a regression somewhere.
Thanks for the heads up! I checked out revision 7c3cd5d and everything worked.
NicknineTheEagle commented
I've added temporary workaround for this here: 6f27b5c
I'm seriously stumped by this, it kind of looks some blocks in BF3 are uncompressed but there's no reliable way to differentiate them from the rest. I've even tried decompiling BF3 exe and got nothing useful, the code for parsing the compressed blocked payload doesn't appear to have any special cases.