Choosing a BAT fileIf you are looking to simply unpack the complete game or one of the campaigns then choose one of these files:
- unpack_all.bat - unpacks the main game
- unpack_americas.bat - unpacks the individual campaign
- unpack_britannia.bat - unpacks the individual campaign
- unpack_crusades.bat - unpacks the individual campaign
- unpack_teutonic.bat - unpacks the individual campaign
Restricted unpackingThe unpacker cannot handle the extracting of complete folders, but it is possible to restrict unpacking to individual files or types of files.
Individual FilesThe files_individual BAT file contains as example the export_descr_units.txt file of the main game. This can be altered to extract other individual files from other packs as well.
Example provided:
Code:
unpacker.exe --source=..\..\packs\*.pack --destination=/home/user/unpack --filter=export_descr_unit.txt
Other file from Americas campaign:
Code:
unpacker.exe --source=..\..\mods\americas\packs\*.pack--destination=/home/user/unpack --filter= battle_models.modeldb
File TypesThe files_types BAT file contains as example the TXT files of the main game. As discussed in the ’Individual Files’ section this can be changed to different types and from different packs.
Example provided:
Code:
unpacker.exe --source=..\..\packs\*.pack--destination=/home/user/unpack --filter=*.txt
Other file type from Americas campaign:
Code:
unpacker.exe --source=..\..\mods\americas\packs\*.pack --destination=/home/user/unpack --filter= *.TGA
Editing the BAT FilesNow is when the text editor comes into play. Before running the .bat file we first have to edit it to suit our needs. The reason for this is that the destination folder of the .bat file had to be written with the placeholder user folder.
● Open the .bat file by right clicking and "Open with geany (or gedit)"
● This is just an example, but generally you will see this:
Code:
@echo off
unpacker.exe --source=..\..\packs\*.pack --destination=/home/user/unpack --verbosity=1
pause
● The placeholder user is actually you, your name, the one who is reading this, so replace it with your username. The unpack folder will be created, you don't have to create it beforehand. You now have a folder named unpack in you main home folder.
Running the BAT FilesFinally, we are ready to give the order. Unpack! Although, you will notice that simply double-clicking the .bat file will simply open it with a text editor. Trying to execute the file with WINE bears the same results. So, this is how to run a .bat file in Linux:
- Open a terminal. In Ubuntu this done by pressing Ctrl + LAlt + T.
- First, go to WINE environment by typing
- Then, go to the folder we created in Getting the Download into place. You can do this by using the command cd:
Code:
cd .../Medieval II Total War/share/data/tools/unpacker
- Now we are in the folder. So, it's time to execute the .bat file. You can do this by typing: The asterisk stands for the name of whatever .bat file you want the unpacker.exe to run, depending on what exactly you want to unpack as explained in the Choosing a BAT file section.
- Yes, you have to accept three times for the unpacking to begin, but as always read everything in the window that appears.
- Depending on which file you are using the unpacking process can take some time. Do not close the window until you see the ‘Successfully extracted all pack files’ message.
- After the unpacking process ends, don't close the Terminal right away because you are still in WINE environment and closing it may cause problems with the unpacking. The chances are small, but just to be sure, type the command exit, and then close the Terminal.