Unpacking archives:
For unpacking you need to pass the following parameters:
- module name - the module name, handling the current game packing algorithm;
- method - Unpakke method, in this case "unpack";
- input file - The archive file you like to unpack;
- output directory - The destination folder, where the unpacked files will be placed;
First of all check if the game archive you are trying to unpack is supported by Unpakke, by referring to
its homepage.
If the game using this type of archive is listed, that means you are ready to unpack it by using the appropriate Unpakke module.
For example let's take the game "
Silent Scream: The Dancer". According to the information from
Unpakke's homepage, that game uses
PFP files to store its resources. In the table its said you will need the "
upkk_pfp.dll" module, and no additional libs.
So you need to download latest version of "
Unpakke", and the "
upkk_pfp.dll" module. If the game is specified to use additional libraries, you need to download them also, and put them in the same directory where Unpakke and its module is placed.
Then the command line should look like this:
unpakke.exe upkk_pfp.dll unpack assets.pfp assets
The result will be put into "
assets" directory.
Packing archives:
For packing you need to set the following parameters:
- module name - the module name, handling the current game packing algorithm;
- method - Unpakke method, in this case "pack";
- input directory - the source folder, containing the files you like to pack;
- output file - the destination file, where the data will be packed back;
First of all chose the game format you would like to pack into, by checking
Unpakke's homepage and download the appropriate module.
Again i will use "
Silent Scream: The Dancer" for example, so the module will be "
upkk_pfp.dll".
The command line should look like this:
unpakke.exe upkk_pfp.dll pack assets assets.pfp
The result will be newly created "
assets.pfp" file.
Repacking archives:
As a method, repacking is not supported by Unpakke.
However, it still can be used to repack archives on the run.
To do so:
- Unpack the archive somewhere, as described in section 1 of this document;
- Replace the modified files in the unpacked files directory;
- Pack back the directory, as described in section 2 of this document;
- Delete all the unneeded files;
Using BATCH for manipulating archives with Unpakke is not the only way to build your own resource updater.
Still, as easiest method i will give an example of repacking using a BATCH command file that i will name "
updater.cmd".
For the example, I will use "
Silent Scream: The Dancer" again.
I would like to replace the file "
loading.jpg" in the game archive "
assets.pfp" with my modified "
loading.jpg", so first I need to unpack the original "
assets.pfp".
unpakke.exe upkk_pfp.dll unpack assets.pfp assets
My unpacked data is in "
assets" directory so i can now replace the "
loading.jpg" file in it.
Using "
MOVE" command i will replace the original "
loading.jpg" with my modified one.
move /Y loading.jpg assets/backgrounds/loading.jpg
The "
/Y" parameter at the end wont prompt me for replacing the existing file. You can learn more about the "
MOVE" command by typing "
MOVE /?" in Windows CMD.
Now i need to pack the "
assets" directory back to "
assets.pfp". But before that, i will backup the original "
assets.pfp" by renaming it to something else.
*ALWAYS BACKUP THE FILES YOU WANT TO MODIFY!*
rename assets.pfp assets.bak
Since i have backup, I can pack back the "
assets" directory to "
assets.pfp":
unpakke.exe upkk_pfp.dll pack assets assets.pfp
The game resources are packed and I no longer need the "
assets" directory, my "
loading.jpg", "
unpakke.exe", its module "
upkk_pfp.dll" and finally the "
updater.cmd", so I will delete them to free some space and get the things clean:
rd /S /Q assets
del unpakke.exe
del upkk_pfp.dll
del updater.cmd
The final "
updater.cmd" will look like this:
unpakke.exe upkk_pfp.dll unpack assets.pfp assets
move /Y loading.jpg assets/backgrounds/loading.jpg
rename assets.pfp assets.bak
unpakke.exe upkk_pfp.dll pack assets assets.pfp
rd /S /Q assets
del unpakke.exe
del upkk_pfp.dll
del updater.cmd
and if everything is done right, the game will now work with its new "
loading.jpg"!