CSLA Studio releases
Total Commander©'s pluggin (ofppbo.wcx)
for un/packing and de/compressing PBO files
and decoding BIN files of  Operation Flashpoint© and Armed Assault© games


Table of contents:
  1. Common informations.
  2. System requirements.
  3. Installation.
  4. Settings.
  5. Pluggin description.
  6. Pluggin's control.

Common informations
Author: Ruprt (ruprt@atlas.cz), CSLA Studio member
Download link: http://ofp.ruprt.cz/download/ofppbo_v141.zip
CSLA Studio home page: http://games.tiscali.cz/flashpoint/
Total Commander© home page: http://www.ghisler.com/

Created for OFP community. Freeware.
This pluggin is not a product of Bohemia Interactive Studio© nor C.Ghisler & Co.©. Although this plugin has been fully tested, its author doesn't take any responsibility for using it, that means... use it at your own risk :-).
Total Commander© is Copyright © 1995-2005 by Christian Ghisler, C. Ghisler & Co., Switzerland.

Back to table of contents
System requirements
This pluggin has been made for using with Total Commander© version 5.51 or greater running on Microsoft Windows 98, Microsoft Windows Millenium, Microsoft Windows 2000, Microsoft Windows XP, Microsoft Windows Vista© operation systems.

Back to table of contents
Installation
The installation of this pluggin is automatic if the Total Commander© is of a version 6.5 or greater. In such a case the installation starts automatically if you double-click the ofppbo.zip file from within the Total Commander or you try to open the ofppbo.zip archive pressing the Enter key.
If you need to install the pluggin to a Total Commander© of a lower version than 6.5, perform these steps :
  1. In the Total Commander©'s installation folder (usually C:\TotalCmd\) create these three subfolders: Plugins\wcx\ofppbo.
  2. Copy the ofppbo.wcx file included in the ofppbo.zip archive into the newly created subfolder (C:\TotalCmd\Plugins\wcx\ofppbo\).
  3. Choose the Configuration->Options item of the Total Commander's main menu. In the "Configuration" dialog window, that has appeared, select the "Packer" tab.
  4. Click the "Configure packer extension WCX's" button in the "Additional packers" frame. An "Associate" window will appear.
  5. In the "All files with extension (ending with):" combo box enter the following text : .pbo
  6. Click the "New type" button, than select the C:\TotalCmd\Plugins\wcx\ofppbo\ofppbo.wcx from the "Browse" dialog window that has appeared.
  7. Confirm your new setting by clicking the OK button.
  8. Restart the Total Commander. The pluggin is ready to use now.
Back to table of contents
Settings
There are 8 settings of this pluggin which can be set up through the "OFPPBO plugin options" dialog window accessible by pressing Alt+F5 -> "Configure" button (recommended way). If you want to change some setting manually you have to edit the pkplugin.ini file located in the Total Commander's installation folder (usually C:\TotalCmd) (in some older versions of TC it can be the system folder - C:\Windows, C:\Winnt). Be extremelly carefull while you are doing that, because of this file contains initialization settings for all other packer pluggins (if any).
Actions to take when changing ofppbo pluggin's settings via the "OFPPBO plugin options" dialog window :
  1. Select the file you want to pack up.
  2. Press Alt+F5 and TC's "Pack files" dialog window appears.
  3. In this window click "Configure" button located in the "Packer" group box and the "OFPPBO plugin options" dialog window appears.
  4. There are 8 controls located in 3 group boxes in the "OFPPBO plugin options" dialog window that can be used to change the plugin's behaviour :
  5. UseCompression checkbox (Compression settings group box) : determines if a compression should be used during packing (checked means Yes; otherwise No). If you uncheck this this option the remaining two options will be ignored. Default is checked.
  6. CompressAll checkbox (Compression settings group box) : determines if the compression should be performed on all packed files regardless of their extensions (checked means Yes; otherwise No). If you check this option the remaining option (CompressFormats) will be ignored. Default is unchecked.
  7. CompressFormats textbox (Compression settings group box) : Determines the file types (file extensions) that will be compressed during packing (UseCompression must be cheked; CompressAll must be unchecked). Default extensions : sqs,sqf,sqm,ext,csv,txt,htm,html,cpp,bin,p3d.
  8. ForcePboSignature checkbox (PBO signature settings group box) : If checked the plugin will write the PboSignatureSuffixKey and PboSignatureSuffixValue settings' values as a signature into the PBO archive(just beyond the PBO's header). If unchecked no signature will be written down. Default is unchecked. NOTE : PBO signature suffix is an optional key-value pair (strings) beyond the optional PBO signature(first 21 bytes of PBO archive) that appears usefull to authorize PBO archives (sign up the author of an addon i.e. : Suffix key = Author; suffix value = CSLA Studio ) or shortly describe the content of the archive.
  9. KeepOriginalSignatureSuffix checkbox (PBO signature settings group box) : If checked the cusstom settings of a signature will be ignored. This option takes effect only when you manipulate an already existing PBO archive (i.e. while adding a new file to or deleting a packed file from an existing archive). To enable this option the ForcePboSignature must be turned on.
  10. PboSignatureSuffixKey textbox (PBO signature settings group box) : The custom key of the key-value pair of the PBO signature suffix. To enable this option the ForcePboSignature must be turned on.
  11. PboSignatureSuffixValue textbox (PBO signature settings group box) : The custom value of the key-value pair of the PBO signature suffix. To enable this option the ForcePboSignature must be turned on.
  12. WriteCppComments checkbox (BIN decoding settings group box) : If checked all decoded BIN-based files will be commented. These comments describe objects after they were streamed out (such as the name of arrays and their sizes beyond their body ends etc.). Default is checked.

Actions to take when changing ofppbo pluggin's settings manually :
  1. Open (display content) at least of one *.PBO file in the Total Commander. This action is neccessary because of the appropriate section of the pkplugin.ini file for the ofppbo pluggin is created after its first use.
  2. Open the C:\TotalCmd\pkplugin.ini file (i.e. in Windows NotePad).
  3. Locate the [OFPPBO_RUP] section, where you find 8 following configuration variables.
  4. UseCompression : determines if a compression should be used during packing (1 means Yes; 0 means No). If you set this variable to 0(No) the remaining two options will be ignored. Default setting : 1.
  5. CompressAll : determines if the compression should be performed on all packed files regardless of their extensions (1 means Yes; 0 means No). If you set this variable to 1(Yes) the remaining option (CompressFormats) will be ignored. Default setting : 0.
  6. CompressFormats : Determines the file types (file extensions) that will be compressed during packing (UseCompression must be set to 1; CompressAll to 0). Default extensions : sqs,sqf,sqm,ext,csv,txt,htm,html,cpp,bin,p3d.
  7. ForcePboSignature : If set to 1 the plugin will write the PboSignatureSuffixKey and PboSignatureSuffixValue settings' values as a signature into the PBO archive(just beyond the PBO's header). If set to zero no signature will be written down. Default value is 0. NOTE : PBO signature suffix is an optional key-value pair (strings) beyond the optional PBO signature(first 21 bytes of PBO archive) that appears usefull to authorize PBO archives (sign up the author of an addon i.e. : Suffix key = Author; suffix value = CSLA Studio ) or shortly describe the content of the archive.
  8. KeepOriginalSignatureSuffix : If set to 1 the cusstom settings of a signature will be ignored. This option takes effect only when you manipulate an already existing PBO archive (i.e. while adding a new file to or deleting a packed file from an existing archive). To enable this option the ForcePboSignature must be turned on.
  9. PboSignatureSuffixKey : The custom key of the key-value pair of the PBO signature suffix. To enable this option the ForcePboSignature must be turned on.
  10. PboSignatureSuffixValue : The custom value of the key-value pair of the PBO signature suffix. To enable this option the ForcePboSignature must be turned on.
  11. WriteCppComments : If set to 1 all decoded BIN-based files will be commented. These comments describe objects after they were streamed out (such as the name of arrays and their sizes beyond their body ends etc.). Default value is 1.
Back to table of contents
Pluggin description
The ofppbo pluggin allows you through the Total Commander© to pack, unpack, compress, decompress PBO files and to decode BIN files (or encoded SQM, FPS, CFG, ArmASave etc.) of the Operation Flashpoint© and ArmedAssault© games. The pluggin has been tested on all available PBO files as well as BIN files (packed using StuffPBO, MakePBO, CPP2BIN, PBO Manager, OFP engine etc.). No bug has been found. Nevertheless, in case of any error let the pluggin's author know via email please.
During the pluggin's beta testing a non-standard behaviour of the Total Commander© has been encountered. In case of you open any PBO file (or its subfolder), than you delete all its files at once, the content of the file (or subfolder) remains visually unchanged (the original content is still shown), but the real content is correct (it doesn't contain the recently deleted files). This behaviour has been consulted with the Total Commander's author with a conclusion that it's not a bug but an effort to keep up a compatibility with other packer pluggins. To workaround this behaviour, simply close and reopen the PBO file.

Notes for external tools developers :
The pluggin can be used as a part of other applications because it exports functions (OpenArchive, CloseArchive, ProcessFile, ReadHeader, PackFiles a DeleteFiles) needed for un/packing and de/compressing. The logic and signatures of these functions can be found in the WCX Writer's Reference located at http://www.totalcmd.net/plugring/packer_interface.html.
The following conditions must be kept to use the pluggin as a part of an other application:
  1. In the release version of the application the unchanged ReadMe file (in both language mutations - Czech, English) must be included.
  2. The pluggin's author must be informed by the applicaton's author(via email) about using the pluggin as a part of the application.
Back to table of contents
Pluggin's control
The ofppbo pluggin's control completelly depends on the Total Commander©'s user interface that means its the same as for all other packer pluggins. Therefor I describe here only the basic UI actions :
Opening PBO file : double-click a PBO file or press Enter key while the file pointer is on the PBO file.
Extracion from PBO file : press F5 key (Copy) or drag and drop an archived file from one TC pane to the second one where the target folder should be opened.
Creating a new PBO file : right-click the file you want to archive. From the context menu, that appears, select the "Pack files" item. In the "Pack files" window select the ".pbo" packer from the combo box than click OK button. The key shortcut for this operation is Alt+F5.
Add a file to an existing PBO archive : open an existing PBO archive in one TC pane. From the second pane copy the desired file to the PBO archive using F5 or drag and drop operation.
Decoding and displaying BIN file (or encoded SQM, FPS, CFG etc.) : OFP BIN file (or any other OFP encoded file) can be displayed by pressing Ctrl+PgDown key combination. While doing this the BIN file is automatically decoded to CPP. Note: The BIN file must have the OFP signature (there are other BIN files than only OFP BINs). When a CPP file is adding to an existing archive no encoding is made (the CPP file is not converted to its BINary representation).
Date and time of extracted files : when a file is extracted from a PBO archive it is saved with the current date and time rather than with the date and time stored in the archive. This approach has been chosen to keep better lucidity between extracted and archived files. The user can better monitor changes made to the extracted files since they have been extracted. Note : Some PBO archivers, such as StuffPBO, don't save the date and time (it's an error, even when the archiver's signature is appended to the end of an archive). In such a case files in the archive are shown with the time the archive has been opened.

Back to table of contents