Page 1 of 1
Scarlet Legacy compression
Posted: Fri Aug 12, 2011 10:58 pm
by finale00
The contents of this post was deleted because of possible forum rules violation.
Re: Scarlet Legacy compression
Posted: Fri Aug 12, 2011 11:33 pm
by chrrox
looks like the header is xored with the alphabit or something like ABCDEFGHIJKLMNOPQRSTUVWXYZ
but thats not needed for these files just run offzip on them and you get the decompressed files.
Re: Scarlet Legacy compression
Posted: Sat Aug 13, 2011 1:57 am
by finale00
So I wrote a bms script for it
It replaces the original compressed file with the new one (with -o option), but right now it leaves the uncompressed size as the first 4 bytes for some reason. How can I modify this script so that will delete the leftover?
The uncompressed size was at the end, so maybe that's why it is included in the output? offzip also did the same.
Code: Select all
#scarlet legacy decompressor
goto 0x40
get name FILENAME
get filesize asize
math filesize -= 4
get csize long
savepos offset
goto filesize
get size long
clog name offset csize size
Re: Scarlet Legacy compression
Posted: Sat Aug 13, 2011 2:33 am
by chrrox
save it to a memory file first.
then just get the memory file size - 4 and log the file starting from the offset 4.
get name FILENAME
string name +.dec
goto -4
get size long
goto 0x40
get zsize long
clog MEMORY_FILE 0x44 zsize size
get size asize MEMORY_FILE
math size - 4
log name 4 size MEMORY_FILE
Re: Scarlet Legacy compression
Posted: Fri Dec 02, 2011 4:39 pm
by Antaler
Work the script?

Re: Scarlet Legacy compression
Posted: Mon Dec 12, 2011 2:34 am
by Antaler
Nothing yet?
Re: Scarlet Legacy compression
Posted: Fri Aug 24, 2012 8:08 am
by wimmeke001
qbmbs script unpack pak files
# Scarlet Legacy PAK files
# script for QuickBMS
idstring "PAK\0"
get ver byte
getdstring DUMMY 16
get headSize long
get cdOffset long
get cdSize long
get cdZSize long
get dataStart long
get dataSize long
get fileSize long
clog MEMORY_FILE cdOffset cdZSize cdSize
set base string ""
callfunction recursiveDir
cleanexit
startfunction recursiveDir
get subFils long MEMORY_FILE
get subDirs long MEMORY_FILE
get dirName string MEMORY_FILE
# quick fix for the initial dir
if dirName != "/"
string base += /
string base += dirName
endif
for subd = 0 < subDirs
callfunction recursiveDir
next subd
for subf = 0 < subFils
callfunction extractFile
next subf
endfunction
startfunction extractFile
get fileOffs long MEMORY_FILE
get fileSize long MEMORY_FILE
get fileName string MEMORY_FILE
math fileOffs += dataStart
set filePath string base
string filePath += /
string filePath += fileName
log filePath fileOffs fileSize
endfunction
how to get models out of the pkt files
Re: Scarlet Legacy compression
Posted: Fri Aug 24, 2012 9:50 am
by finale00
The pkt files are just compressed textures.
How do you figure pkt contains models?
Re: Scarlet Legacy compression
Posted: Sat Aug 25, 2012 9:49 am
by wimmeke001
witch file have models xd