Users browsing this thread: 1 Guest(s)
[TUTORIAL] Making BMS Scripts; Post and get help with your BMS scripts!
(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.  Tongue  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 Tongue. 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!
Reply
Thanked by: SaraGames


Messages In This Thread
RE: [Tutorial] Making BMS Scripts - by Saeid0034 - 03-21-2020, 05:17 AM
RE: [Tutorial] Making BMS Scripts - by justdancer - 07-02-2016, 01:53 AM
RE: [Tutorial] Making BMS Scripts - by dionn1993 - 07-10-2019, 12:06 AM
RE: [Tutorial] Making BMS Scripts - by SKYHAMSTER - 08-06-2020, 06:06 AM
RE: [Tutorial] Making BMS Scripts - by Yarcaz - 11-18-2015, 08:19 AM
RE: [Tutorial] Making BMS Scripts - by Shade - 11-18-2015, 05:31 PM
RE: [Tutorial] Making BMS Scripts - by Yarcaz - 11-18-2015, 05:04 PM
RE: [Tutorial] Making BMS Scripts - by Hallow - 12-22-2015, 06:59 PM
RE: [Tutorial] Making BMS Scripts - by Hallow - 12-22-2015, 10:42 PM
RE: [Tutorial] Making BMS Scripts - by TGE - 12-24-2015, 08:14 PM
RE: [Tutorial] Making BMS Scripts - by Hallow - 12-24-2015, 08:57 PM
RE: [Tutorial] Making BMS Scripts - by nobody231 - 12-24-2015, 09:01 PM
RE: [Tutorial] Making BMS Scripts - by TGE - 12-25-2015, 06:36 AM
RE: [TUTORIAL] Making BMS Scripts; Post and get help with your BMS scripts! - by Pingus! - 07-30-2017, 10:56 PM

Forum Jump: