07-30-2017, 10:56 PM
(07-30-2017, 07:48 PM)SaraGames Wrote: Hi! I'm sorry my first post on the site is to ask for help even after that fantastic tutorial you've put up...but...we both know what this is unfortunately. I spent about 4 hours working through your guide and tried 2 different hex editors to make sure my notepad+ plugin wasn't messing things up but I cannot seem to find out anything about the file archives that Divinity 2 Developer's Cut comes with. The older versions of this game had working file pack/unpackers, those do not work on the new versions of the files since they repackaged the game for this special edition. My husband is a pretty good scripter/programmer and spent a few hours looking into this as well with no luck. I have found that the first sets of 4 chunks are the same in every file.
05 00 00 00 01 00 00 00 04 00 00 00
It has a file list on the side, and that's pretty much all I can tell. Was wondering if you could take a look at the smallest of the archive files and give us a clue on how to write this script? It's only 96KB so I thought it'd be the easiest to peek into. https://drive.google.com/open?id=0B6eDWb...VBaaTVwZmc If you get time to look thank you very much, if not I'll survive. I've made a few little mods for some other games and was just hoping to see what I could spice up in this one.
Hey no worries! This file is decently difficult if you're new to this kind of extraction, and it's really no problem that you guys didn't figure it out. The files were compressed using ZLIB compression, and the data offsets were a little tricky. Here's a script for the program QuickBMS to extract the files:
Code:
# Divinity II: Developer's Cut *.dv2
# Written By Anex For QuickBMS
get NULL longlong
get NULL long
get NULL short
get DATASTART long
get FTBSIZE long
savepos FNAMETABLE
getdstring SKIP FTBSIZE
get FCOUNT long
savepos OFFTABLE
comtype ZLIB
for i = 0 < FCOUNT
goto FNAMETABLE
get NAME string
savepos FNAMETABLE
goto OFFTABLE
get DATAOFF long
get ZSIZE long
get SIZE long
xmath OFFSET "DATASTART + DATAOFF"
savepos OFFTABLE
clog NAME OFFSET ZSIZE SIZE
next i
Just copy and paste the code into a text document and save it to your desktop. Grab QuickBMS, which can be found here, and follow the extraction tutorial inside of it. It's pretty self explanatory . If this script doesn't work on any other archives (please test them!), feel free to respond here, and please upload the archives that aren't compatible with the script, and I'll try to fix it up. Good luck!
~Pingu!