Post by robhal on Aug 20, 2017 2:46:24 GMT
Original post from FluffyQuack
I looked into the PAK format and I realized the "directory offset" is actually part of each PAK file. The BMS script even reads it, but it does nothing with it.
So here's a better way of extracting the PAK files which should be compatible with any PAK files Capcom adds to the game.
New BMS script (create a text file called sf5.bms and copy and paste this into it):
Copy and paste this into BAT file to easily extract all PAK files in one go:
You'll also need quickbms.exe and all the PAK files in the same directory for this to work.
Alternatively, just download this which has everything set up for extraction: SF5-extract
Click below to see how to use the SF5-extract (from the download link above)
I looked into the PAK format and I realized the "directory offset" is actually part of each PAK file. The BMS script even reads it, but it does nothing with it.
So here's a better way of extracting the PAK files which should be compatible with any PAK files Capcom adds to the game.
New BMS script (create a text file called sf5.bms and copy and paste this into it):
# Unreal Engine 4 - Unreal Tournament 4 (script 0.4)
# Modified by FluffyQuack for better SF5 support
# script for QuickBMS http://quickbms.aluigi.org
# set your AES_KEY here as text or C string ("\x11\x22...")
set AES_KEY binary "_aS4mfZK8M5s5KWC2Lz2VsFnGKI7azgl"
goto -0x2c
idstring "\xe1\x12\x6f\x5a" # 0x5a6f12e1
get VERSION long
get OFFSET longlong
get SIZE longlong
getdstring HASH 20
goto OFFSET
#Acquire base name
get NAMESZ signed_long
math NAMESZ -= 9
getdstring DUMMY 9 #Skip the "..\..\..\" part of the filepath
getdstring BASENAME NAMESZ
get FILES long
for i = 0 < FILES
callfunction GET_NAME 1
savepos TMP_OFF
get OFFSET longlong
get ZSIZE longlong
get SIZE longlong
get ZIP long
if VERSION <= 1
get TSTAMP longlong
endif
getdstring HASH 20
math CHUNKS = 0
if VERSION >= 3
if ZIP != 0
get CHUNKS long
for x = 0 < CHUNKS
get CHUNK_OFFSET longlong
get CHUNK_END_OFFSET longlong
putarray 0 x CHUNK_OFFSET
putarray 1 x CHUNK_END_OFFSET
next x
endif
get ENCRYPTED byte
get CHUNK_SIZE long
endif
comtype copy # for AES
if ZIP & 1
comtype zlib
elif ZIP & 2
comtype gzip
endif
if CHUNKS > 0
putvarchr MEMORY_FILE SIZE 0
log MEMORY_FILE 0 0
append
for x = 0 < CHUNKS
getarray CHUNK_OFFSET 0 x
getarray CHUNK_END_OFFSET 1 x
math CHUNK_ZSIZE = CHUNK_END_OFFSET
math CHUNK_ZSIZE - CHUNK_OFFSET
if ENCRYPTED != 0
encryption aes AES_KEY "" 0 32
math CHUNK_ZSIZE x 32
endif
clog MEMORY_FILE CHUNK_OFFSET CHUNK_ZSIZE CHUNK_SIZE
next x
append
encryption "" ""
log NAME 0 SIZE MEMORY_FILE
else
# the file offset points to an entry containing
# the "same" OFFSET ZSIZE SIZE ZIP HASH ZERO fields,
# just an additional backup... so let's skip them
savepos BASE_OFF
math BASE_OFF - TMP_OFF
math OFFSET += BASE_OFF
if ENCRYPTED != 0
encryption aes AES_KEY "" 0 32
math ZSIZE x 32
endif
clog NAME OFFSET ZSIZE SIZE
encryption "" ""
endif
next i
startfunction GET_NAME
get NAMESZ signed_long
if NAMESZ >= 0
getdstring NAME NAMESZ
else
math NAMESZ n NAMESZ
math NAMESZ * 2
getdstring NAME NAMESZ
set NAME unicode NAME
endif
set TMP BASENAME
string TMP += NAME
set NAME TMP
endfunction
Copy and paste this into BAT file to easily extract all PAK files in one go:
for %%s in (*.pak) do quickbms -Y sf5.bms %%s out
You'll also need quickbms.exe and all the PAK files in the same directory for this to work.
Alternatively, just download this which has everything set up for extraction: SF5-extract
Click below to see how to use the SF5-extract (from the download link above)
1. Obviously, download it first.
2. Then extract that downloaded file to your pak folder and run the "extract-all.bat".
3. Wait until finish and you see inside your pak folder there is new folder named "out",
4. open that folder and move all its contents to SFV root folder (usually \Steam\steamapps\common\StreetFighterV).
5. Wait until finish and you know the rest (move out or delete all pak files then try to run the game first).
2. Then extract that downloaded file to your pak folder and run the "extract-all.bat".
3. Wait until finish and you see inside your pak folder there is new folder named "out",
4. open that folder and move all its contents to SFV root folder (usually \Steam\steamapps\common\StreetFighterV).
5. Wait until finish and you know the rest (move out or delete all pak files then try to run the game first).