PAK Files
PAK Files (or packfiles, pack files) are package files that contain most of Epic Mickey’s game assets, such as level data, scripts, and graphics. All of Epic Mickey’s PAK files are located within the packfiles folder of the game’s root.
Extracting PAK files
PAK files can be extracted using a tool called QuickBMS and a script written by xentax.com user WRS. They can either all be extracted at once (recommended for convenience) or individually. The instructions are as follows:
- Create a working folder somewhere on your PC. This will be used to contain all the required files.
- Download QuickBMS and put it in your working folder. This program will be used to extract the PAK file.
- Download the Epic Mickey BMS script here and place it in your working folder. (CREDIT: WRS from zentax.com)
- Place the PAK file that you want to extract in your working folder. Your working folder should now look similar to the image below this guide.
- Open QuickBMS.exe and follow the steps (select BMS script, select file, select output folder). I recommend creating a new folder for your files to be exported to. (NOTE: To extract multiple or all of the PAK files, select them all when prompted by QuickBMS. If the program gets stuck on duplicate files, follow the instructions onscreen to tell it to skip all future conflicts.)
- If the files were extracted successfully, you can now close the BMS terminal and navigate to your output folder.
Reinserting modified PAK files
WARNING: A modified file cannot be larger than the original file.
QuickBMS can also reimport files into archives. Unfortunately, this means you must replace files and cannot create new ones. For instructions, here is an excerpt from QuickBMS’s instructions (section 3).
Make a backup copy of the original archive!
Extract the files or only those you want to modify as you do normally via the GUI (double-click on quickbms.exe) OR via command-line like the following example:
quickbms script.bms archive.pak output_folder
Modify the extracted files leaving their size unchanged or smaller than before. I suggest to delete the files that have not been modified so that the reimporting process will be faster and safer. In the folder leave only the files you modified. Remember that their size must be smaller/equal than the original!
Reimport the files in the archive via the GUI by clicking on the file called “reimport2.bat” OR via command-line:
quickbms -w -r -r script.bms archive.pak output_folder
Test the game with the modified archive
Make sure to always use “reimport2.bat”, as “reimport.bat” doesn’t work and “reimport3.bat” corrupts the file.
Notes
- Tests have shown that the game can access user-inserted PAK files. When wm_whiteroom.pak, a PAK file only found in the Japanese version of the game, is moved into the packfiles folder of the American release, the wm_whiteroom level contained in the PAK file loads just fine.
- Any PAK file not in the “packfiles” folder use a different, older format. They cannot currently be opened, but seem to use the same format seen in Quake (2).
- Files inside the PAK files must be ordered a certain way so the game can load the data correctly. The files are ordered in the reverse order that they are referenced, so when an asset attempts to load something, it is actually there. An example of this would be a model’s texture being ordered before the model, so when the model requests the texture to load, it is there for it to load.
- Contrary to popular belief, most files inside PAK files are not actually compressed. The format itself supports compression, but the game requires some file formats to be uncompressed to load them at all. These include…
- .nif/.nif_wii
- .hkx/.hkx_wii
- .hkw/.hkw_wii
- .kf/.kf_wii
- .kfm/.kfm_wii
- .lit_cooked
- .gfx
- .bsq
- .dct
- Files formats that are actually compressed in the archives include…
- .gsa/.bin
- .level
- .lua
- .part
- Any other format