(PS3) Darksiders OBPK packages
Posted: Wed Oct 06, 2010 11:15 am
The contents of this post was deleted because of possible forum rules violation.
Code: Select all
# few notes on filenames
# "psystem" are BOD files
# "mp3" is FSB
endian big
## Header
idstring "OBPK"
getdstring UNKNOWN 14
get NSTRUCTPOINTER long # >= 30
get DATAPOINTER long # next 4096 block - NSTRUCTPOINTER
## EStruct (only in scythe.opps3 from the few examples i had -
# though has the same structure as NStruct)
get ESTRUCTCOUNT long
for i = 0 < ESTRUCTCOUNT
getdstring UNKNOWN 8
get NAMELEN long
getdstring NAME NAMELEN
next i
## NStruct
# goto NSTRUCTPOINTER
get NSTRUCTCOUNT long
for i = 0 < NSTRUCTCOUNT
getdstring UNKNOWN 8
get NAMELEN long
getdstring NAME NAMELEN
next i
## ZLib data chunks
savepos LASTPOS
math DATASTART = DATAPOINTER
math DATASTART += NSTRUCTPOINTER
goto DATASTART
get ZSIZE long
savepos POS
get SIZE asize
math SIZE -= POS
# the opps3 files are small enough to make this ok
clog MEMORY_FILE POS SIZE ZSIZE
## Split files
goto LASTPOS
get NULL long
get FOLDERS long # actually resource type, not folder
math FOLDERSKIP = FOLDERS
math FOLDERSKIP *= 10 # NOTE: 10 IS FOR lurcher file ONLY - OTHER FILES ARE DIFFERENT (not completely reversed)
getdstring UNKNOWN FOLDERSKIP
get UNKNOWN long
math FILECNT = ESTRUCTCOUNT
math FILECNT += NSTRUCTCOUNT
math FILECNT -= FOLDERS
print "Exporting %FILECNT% files (there are references to %FOLDERS% types)!"
math MEMOFFSET = 0
for i = 0 < FILECNT
getdstring UNKNOWN 8
get SIZE1 long
get BYTE4 byte
get SIZE2 long
get NULL long
log "" MEMOFFSET SIZE1 MEMORY_FILE
math MEMOFFSET += SIZE1
next i