chrrox wrote:The game can read uncompressed and compressed files there is no real need to re compress the content to have it load.
Ok, that's good to know, I was going to test that, but now I don't need to.
Here is a QuickBMS script that will extract the character model PAC files for easy access. It only works on the chXXX.pac files and it will extract the compressed files into a folder and then extract the uncompressed files into another folder. The folder name will start with the basename of the chXXX.pac file. I've only tested it so far on SvR2010 for Xbox 360.
I know it could prolly be rewritten better, but hey, it works.
Code: Select all
IDString "EPK8"
Get MASTERNAME FILENAME
Get NAME BASENAME
Set AFOLDER NAME
String AFOLDER + Attire
GoTo 0x0800
IDString "EMD "
Get NUMBERPACS SHORT
Math NUMBERPACS / 4
Set DIRPOSITION 0x0814
For i = 0 < NUMBERPACS
Open "." MASTERNAME
Set FOLDERNAME AFOLDER
String FOLDERNAME + i
Set NAME FOLDERNAME
STRING NAME + \
STRING NAME + FOLDERNAME
STRING NAME + ".pac"
GoTo DIRPOSITION
get PACOFFSET long
get PACLENGTH long
math PACOFFSET += 8 # 0x4000
math PACOFFSET *= 0x800
math PACLENGTH *= 0x100
Log NAME PACOFFSET PACLENGTH
Math DIRPOSITION + 16
Set NAME FOLDERNAME
STRING NAME + ".pac"
Open FOLDERNAME NAME
IDString "PACH"
Get FILENAME BASENAME
Set CFOLDER FILENAME
String CFOLDER + compressed
Set UFOLDER FILENAME
String UFOLDER + uncompressed
GoTo 0x0004
Get NUMBERFILES LONG
SavePos DIROFFSET
Math TMP = NUMBERFILES
Math TMP * 12
Math DATAOFFSET = DIROFFSET
Math DATAOFFSET + TMP
GoTo DIROFFSET
For k = 0 < NUMBERFILES
Get UNKNOWN LONG
Get OFFSET LONG
Get LENGTH LONG
Math TMP = DATAOFFSET
Math TMP + OFFSET
Set NAME CFOLDER
STRING NAME + \
STRING NAME + file
if k < 10
STRING NAME + 0
endif
STRING NAME + k
STRING NAME + ".compressed"
Log NAME TMP LENGTH
next k
For k = 0 < NUMBERFILES
Set NAME file
if k < 10
STRING NAME + 0
endif
STRING NAME + k
STRING NAME + ".compressed"
Open CFOLDER NAME
IDString "BPE "
GoTo 0x008
Get ZSIZE LONG
Get SIZE LONG
ComType yuke_bpe
Set NAME UFOLDER
STRING NAME + \
STRING NAME + file
if k < 10
STRING NAME + 0
endif
STRING NAME + k
Clog NAME 16 ZSIZE SIZE
next k
next i