Posts: 4,868
Threads: 49
Likes Received: 4,317 in 2,682 posts
Likes Given: 6,825
Joined: Aug 2017
Reputation:
77
08-27-2017, 08:20 AM
(This post was last modified: 10-02-2020, 02:04 AM by robhal.)
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):
Code: # 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:
Code: 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 (NEW)
NOTE: the original one is here, SF5-extract (obsolete because it fails on extracting pak0 which is over 4GB now)
Click below to see how to use the SF5-extract (from the download link above)
Show ContentSpoiler:
1. Obviously, download it first.
2. Then extract that downloaded file to your SFV Paks folder (usually it's "\Steam\SteamApps\common\StreetFighterV\StreetFighterV\Content\Paks") and run the "extract-all.bat", but before you double-click the bat file, you may want to read the step #2a below first.
-OPTIONAL BUT STRONGLY RECOMMENDED- 2a. Before you run the "extract-all.bat", you may want to move away the "pakchunk53-WindowsNoEditor.pak" file temporarily to somewhere else first, that way you save a lot of disk space by not unpacking that particular huge pak file as it only contains the game files for character story mode (afaik no one ever do mods for character story mode, so why wasting space and time to extract the file, right?). Anyway, if you decide to do this step #2a, don't forget to restore the "pakchunk53-WindowsNoEditor.pak" file back to its original place after you have done with step #3 below.
3. Wait until finish (it may take awhile because of the files are so many) and you see inside your pak folder there is new folder named "out". Now what you gonna do with the extracted files is depend on the two choices below (either 4a or 4b).
-IF YOU JUST WANT TO GET INTO MODDING ACTIVITIES- 4a. At this point, you only need to move the "out" folder to somewhere else and you are done.
or
-IF YOU WANT TO RUN THE GAME WITH FULLY UNPACKED FILES- 4b. open the "out" folder and move all its contents to SFV root folder (usually it's "\Steam\steamapps\common\StreetFighterV"), then go to the "\Steam\SteamApps\common\StreetFighterV\StreetFighterV\Content\Paks" folder and move out all pak files there to somewhere else. But before you proceed to try launching the game, don't do that yet as there is still additional (but very important) step to do.
See, one of the crucial requirements if you want to run the game with fully unpacked files is that you MUST NOT leave the "\Steam\SteamApps\common\StreetFighterV\StreetFighterV\Content\Paks" folder completely empty. It must have at least one pak file in there, that's why I strongly recommend to not extract the contents of "pakchunk53-WindowsNoEditor.pak" file (as written in step #2a above) because you can use it for the "not leaving the Paks folder completely empty" requirement. So just move the "pakchunk53-WindowsNoEditor.pak" file back to Paks folder again and now you are ready to run the game with fully unpacked files.
Posts: 2
Threads: 0
Likes Received: 1 in 1 posts
Likes Given: 1
Joined: Oct 2017
Reputation:
0
10-31-2017, 06:16 PM
(This post was last modified: 10-31-2017, 06:20 PM by hora.)
Some files are missing from the latest version of the game
I do not see any meshes or texture files in Ibuki's skelmesh 1
I confirm that there is no 1, 2 folder in ryu's skelmesh
•
Posts: 4,868
Threads: 49
Likes Received: 4,317 in 2,682 posts
Likes Given: 6,825
Joined: Aug 2017
Reputation:
77
@"hora"
That's because the SF5-extract uses the regular quickbms to extract all pak files, in the past the regular quickbms works well because all pak files are still below 4GB size, but now pak0 (the very first pak file) is over 4GB size so now you have to use the "quickbms_4gb_files" to extract it.
Posts: 2
Threads: 0
Likes Received: 1 in 1 posts
Likes Given: 1
Joined: Oct 2017
Reputation:
0
11-01-2017, 03:19 PM
Okay
Thank you for answer
The following 1 user Likes hora's post:1 user Likes hora's post
• robhal
Posts: 3
Threads: 0
Likes Received: 1 in 1 posts
Likes Given: 0
Joined: Jan 2018
Reputation:
0
01-07-2018, 01:39 AM
Excuse me, why did I complete the complete extract-all, Out folder only three folders, Youtube teaching should have three, Content folder, only three folders, it seems incomplete?
•
Posts: 4,868
Threads: 49
Likes Received: 4,317 in 2,682 posts
Likes Given: 6,825
Joined: Aug 2017
Reputation:
77
@"qaz1973825"
Can't see your pics, but I think you can found the solution in the post below (the one separated two posts above yours)
http://modderbase.com/showthread.php?tid...79#pid2579
•
Posts: 3
Threads: 0
Likes Received: 1 in 1 posts
Likes Given: 0
Joined: Jan 2018
Reputation:
0
(01-07-2018, 03:05 AM)robhal Wrote: @"qaz1973825"
Can't see your pics, but I think you can found the solution in the post below (the one separated two posts above yours)
http://modderbase.com/showthread.php?tid...79#pid2579
Oh .... I have carefully read the solution in the post below, but I am very confused, I do not know where is the problem, I seem to use the same tool, but the folder is not the same? Picture can not see, So I recorded a video, can you help me to see where the problem lies? Or is my tool really have problems?
https://www.youtube.com/watch?v=C_uEiIEp...e=youtu.be
•
Posts: 4,868
Threads: 49
Likes Received: 4,317 in 2,682 posts
Likes Given: 6,825
Joined: Aug 2017
Reputation:
77
01-08-2018, 09:02 AM
(This post was last modified: 01-08-2018, 09:04 AM by robhal.)
@"qaz1973825"
That's exactly your issue and the solution is that post I pointed to you. The content of "\StreetFighterV\Content" folder should be like this
See, back when SFV was released in early days, the batch file "extract-all.bat" (which if you open it with Notepad, you can see it still uses "quickbms" command) worked well because all official game pak files were still under 4 GB size. But now that same batch file "extract-all.bat" will fail on extracting the "pakchunk0-WindowsNoEditor.pak" because currently it is bigger than 4 GB size. So the solution is either you can manually run the "quickbms_4gb_files.exe" to extract the "pakchunk0-WindowsNoEditor.pak" or download the archive below (it contains the same files as the original "SF5-extract.rar" from the first post, except that I has modified the batch file "extract-all.bat" a little by making it runs "quickbms_4gb_files" instead)
https://mega.nz/#!BNIxRKyB!I2uyqhvFcZO4Y...S0d0IT0v4Q
Please test the new batch file if you want, and if you can confirm it works correctly, I will replace the download link with the new one.
•
Posts: 3
Threads: 0
Likes Received: 1 in 1 posts
Likes Given: 0
Joined: Jan 2018
Reputation:
0
01-08-2018, 01:39 PM
(This post was last modified: 01-08-2018, 01:51 PM by qaz1973825.)
(01-08-2018, 09:02 AM)robhal Success!!!! T hank you so much, you are really very kind. Wrote: @“qaz1973825”
That's exactly your issue and the solution is that post I pointed to you. The content of "\StreetFighterV\Content" folder should be like this
See, back when SFV was released in early days, the batch file "extract-all.bat" (which if you open it with Notepad, you can see it still uses "quickbms" command) worked well because all official game pak files were still under 4 GB size. But now that same batch file "extract-all.bat" will fail on extracting the "pakchunk0-WindowsNoEditor.pak" because currently it is bigger than 4 GB size. So the solution is either you can manually run the "quickbms_4gb_files.exe" to extract the "pakchunk0-WindowsNoEditor.pak" or download the archive below (it contains the same files as the original "SF5-extract.rar" from the first post, except that I has modified the batch file "extract-all.bat" a little by making it runs "quickbms_4gb_files" instead)
https://mega.nz/#!BNIxRKyB!I2uyqhvFcZO4Y...S0d0IT0v4Q
Please test the new batch file if you want, and if you can confirm it works correctly, I will replace the download link with the new one.
robhal : Success!!!! T hank you so much, you are really very kind.
Posts: 502
Threads: 1
Likes Received: 1,690 in 381 posts
Likes Given: 426
Joined: Jun 2018
Reputation:
8
@"robhal"
So did something change with the most recent update of SFV? Because extracting the files with the quickbms_4gb_files exe isn't getting everything anymore. The pakchunk0 file is now over 5 gigs, so I don't know if that matters.
•
Posts: 4,868
Threads: 49
Likes Received: 4,317 in 2,682 posts
Likes Given: 6,825
Joined: Aug 2017
Reputation:
77
@"addysun"
I just test extracting the pakchunk0 file again with the same quickbms_4gb_files (and the sf5.bms script) from this thread, and I can extract all files correctly. There are several reasons imo that maybe can result in failed extracting process:
1. Not enough disk space, all files in pak0 should be around 9 GB so you must have more than 9 GB free space in your HDD/SSD.
2. There is possibility that if your pak0 file is located in folder with very long path, the extracting process can fail because Windows can only handle up to 255 characters for folder/filename. So maybe you can try moving the pak0 file temporarily to the folder with shorter path (such as C:\SFV\) and try the extracting process again.
•
Posts: 502
Threads: 1
Likes Received: 1,690 in 381 posts
Likes Given: 426
Joined: Jun 2018
Reputation:
8
(03-13-2019, 03:15 PM)robhal Wrote: @"addysun"
I just test extracting the pakchunk0 file again with the same quickbms_4gb_files (and the sf5.bms script) from this thread, and I can extract all files correctly. There are several reasons imo that maybe can result in failed extracting process:
1. Not enough disk space, all files in pak0 should be around 9 GB so you must have more than 9 GB free space in your HDD/SSD.
2. There is possibility that if your pak0 file is located in folder with very long path, the extracting process can fail because Windows can only handle up to 255 characters for folder/filename. So maybe you can try moving the pak0 file temporarily to the folder with shorter path (such as C:\SFV\) and try the extracting process again.
Thanks! ill try those options.
Posts: 14
Threads: 1
Likes Received: 3 in 2 posts
Likes Given: 3
Joined: Jan 2019
Reputation:
0
Give it no tool who made us the life easyer ?
•
Posts: 48
Threads: 7
Likes Received: 1 in 1 posts
Likes Given: 0
Joined: Sep 2020
Reputation:
0
09-30-2020, 04:53 PM
(This post was last modified: 09-30-2020, 05:26 PM by wadewatts34.)
I dont understand what I need to do with the code and the bat part of the tutorial?
also when you said to your sfv folder does that mean I have to put extract all into my sfv folder?
Also how much time does the extract all take?
•
Posts: 74
Threads: 1
Likes Received: 54 in 34 posts
Likes Given: 32
Joined: Feb 2020
Reputation:
1
(09-30-2020, 04:53 PM)wadewatts34 Wrote: I dont understand what I need to do with the code and the bat part of the tutorial?
also when you said to your sfv folder does that mean I have to put extract all into my sfv folder?
Also how much time does the extract all take?
1st question: You don't have to do anything with the .bat files. You need them, but you don't have to touch them.
2nd question: No when you exact it, doesn't have to be in the folder that the game is located. It's similar(SIMILAR) to unzipping a file. The unzipped files can be placed anywhere, just like the extracted files.
3rd question: How long? Well if your extracting the whole game it can take a couple of hours, depending on how fast you computer is. My "normal" desktop, which is not very high end, took about 3-4 hours. If your just exacting 1 skin from a modder though, only a couple of seconds.
|