Twelve sky 2 unpack script
this is the bms script for unpack file "subject" and "mobject" from data files of TwelveSky and TwelveSky2
Quote:
# Game: TwelveSky & TwelveSky 2 (PC)
# by fatduck Jul2011
# script for QuickBMS
[Only registered and activated users can see links. Click Here To Register...]
get PRENAME basename
get NUMRES long
savepos OFS_RES
for i = 1 to NUMRES
goto OFS_RES
get FLAG1 long
get USIZE long
if FLAG1 != 1
math FLAG1 -= USIZE
math FLAG1 *= -1
else
math FLAG1 -= 1
endif
get CSIZE long
savepos OFS_RES
set RESNAME PRENAME
string RESNAME += _
if i < 10
string RESNAME += "0"
endif
string RESNAME += i
string RESNAME += .mdl
if USIZE > 0
clog RESNAME OFS_RES CSIZE USIZE
endif
math OFS_RES += CSIZE
math OFS_RES += FLAG1
goto OFS_RES
get FLAG1 long
get USIZE long
if FLAG1 != 1
math FLAG1 -= USIZE
math FLAG1 *= -1
else
math FLAG1 -= 1
endif
get CSIZE long
savepos OFS_RES
set RESNAME PRENAME
string RESNAME += _
if i < 10
string RESNAME += "0"
endif
string RESNAME += i
string RESNAME += .dds
if USIZE > 0
clog RESNAME OFS_RES CSIZE USIZE
endif
math OFS_RES += CSIZE
math OFS_RES += FLAG1
next i
credit by fatduck