Page 1 of 1
Blade chronicles archives
Posted: Thu Aug 11, 2011 4:50 am
by finale00
Code: Select all
#Blade chronicles mbn
#textures archive
get idstring long
get files long
get null long
get null long
for i = 0 < files
get id short
get part2 byte
get part1 byte
get size long
get unk long
get unk long
next i
goto 56 0 SEEK_CUR
#start saving files
I don't know how to save those files though. There doesn't seem to be any offsets to work with.
Re: Blade chronicles archives
Posted: Thu Aug 11, 2011 4:56 am
by finale00
Here are a different set of mdn archives that contain model files.
For some reason, some mdl's are unpacked, while others are. I don't know why this is the case, but I've already verified that model files start with "mdl" string.
Re: Blade chronicles archives
Posted: Thu Aug 11, 2011 2:37 pm
by WRS
the first unknown in the file structure is actually the filename
get fileid short
get part1 byte
get part2 byte
notice the filename is <part2>_<part1>_00000.mbn
the maxlength of a short is 65535 (5 chars)
so
file may be referred to internally as "<part2>_<part1>_<fileid>"
Code: Select all
string FNAME p= "%03i_%03i%05i" part2 part1 fileid
print "%FNAME%"
Re: Blade chronicles archives
Posted: Thu Aug 11, 2011 3:35 pm
by finale00
nice catch, I didn't think much about those and just assumed they were longs.
So the filename and the filesize is there, but the offsets are still missing.
The long after the size (which...might not be a long I guess)
Re: Blade chronicles archives
Posted: Thu Aug 11, 2011 5:24 pm
by WRS
you dont need offsets when you have the data size
i cant understand one of the texture files i opened - theres 56 bytes of garbage before the first dds header - but the images are corrupted even with manually extracting..
models seem fine though.. and you have another thread on those - so use something like this for now
Code: Select all
get idstring long
get files long
get DUMMY long
get DUMMY long
savepos offset
set pos long files
math pos *= 16 # size of file record structure
math pos += offset
get filesize asize
for i = 0 < files
get id short
get minor byte
get major byte
get size long
get unk long
get unk long
string FNAME p= "%03i_%03i_%05i.mdl" major minor id
log FNAME pos size
math pos += size # next offset
next i
Re: Blade chronicles archives
Posted: Thu Aug 11, 2011 5:34 pm
by finale00
oh yes, for texture archives I just skip 56 bytes.
Only for those archives though, and I'm not sure if there is a way to distinguish between the two.