VPT is a powerful scripting tool for creating and editing Volition Package archives (.VP). It is designed to be integrated into automated production environments, such as ours in the WCSD project. It does not have its own GUI, but is compatible with the Total Commander plugin "MultiArc". The combination VPT + MultiArc + Total Commander provides a comfortable interface for creating and editing VP archives in addition to the script functions. Thus VPT combined can be used as a script tool and as a GUI tool.

2. Field of application & Concept

2.1 Field of application / Target group

The domain of VPT is the script processing of files and VP archives. Especially with frequently recurring routine tasks, tools with a surface would be cumbersome, time-consuming and error-prone. It is therefore primarily suitable for mod and game developers looking for a way to automatically create VP archives.

For players who only want to change a few details of an existing mod, VPT is less suitable or not designed. In this case, rather a pure GUI solution should be considered. Although the combination VPT + MA + TC certainly offers a powerful and comfortable interface, but also needs to be set up. See 5.2.

2.2 The concept of VPT

Reliability and flexibilityReliability was at the forefront of VPT's development. It should be a robust tool that provides good error detection. There was also a focus on flexibility to adapt the tool to any production environment and situation. The predecessor VPU (used by us from 2014 to 2016) for displaying and unpacking VP archives was designed according to these principles. On this basis, VPT was created in 2016.

Syntax and functionsThe syntax and functions of VPT have been deliberately aligned with classic CLI packers. So if you work regularly with ZIP or RAR in the command line or use such packers in scripts, you will quickly get used to VPT. The commands of VPT are based on established standards. Only the switches of VPT differ mostly from the standards, also because the VP format has some peculiarities that, for example, ZIP or RAR does not have.

Hidden Text: An example and comparison with standard CLI-Packer  Show

It shows how the call would look at the individual packers. The folder "data" including all subfolders and files should be packed. In this example we assume that we are already in the parent folder in the shell, which contains the subfolder "data". Furthermore, the archive should be created in "z: \ temp \" and get the file name "test".

>vpt a -ndd "z:\temp\test" data\*From these examples it can be seen that VPT does not have exotic syntax, but provides a familiar interface. This is especially true if you already use one of the mentioned packers at the script level.

3. Functions and properties

Supports Create/Add/Move, List, Extract and Delete.

In the simplest case it can add a folder with all sub folders and files to a new VP archive (like VPMAKE).

Supports Regular Expression from AI3 so it can be flexible adapted to any development environment and situation.

Accepts multiple files via parameter for all functions.

Accepts simple file pattern (* and ?) for all functions.

Accepts a list file for all functions. Pattern (simple or RegEx) can also be used in this list.

Can extract files with or without paths.

Can simulate packing/deleting/extracting. Usefully for testing parameters like RegEx. On this function the most checks and calculation is working, so it's helpful to check the file structure and to get the several values for the finished VP before the VP is created.

Has several checks to ensure that the created archive is complete and intact: checks if there is enough free space for the VP, checks if the VP will not be too big, checks if the names of the files and folders are not too long and other things.

All operations for creating or change a VP archive will done in a temporary VP archive. Only if the complete operation is finished without errors the temporary archive will renamed to the destination VP archive.

If any critical problem occurs during packing then the process will immediately stopped, the temporary archive deleted and a error message shown. So there is a simple rule: If you see a VP after packing, it's intact.

Can show archive content (directory) in short, long or tech format (So you want to choose the red pill, right? ).

Show archive summary for any operation.

Recover the date and time from UTC timestamp and set it to extracted files, inclusive local timezone and DST. As far as I know, VPT is the only Windows tool that can restore the date and time when unpacking.

Also if empty files should not be included in a VP archive it's supported for packing and unpacking. As standard empty files are ignored.

Show extracting log with return codes for every file.

Set return code (errorlevel) for error handling in scripts.

Can generate checksum files (MD5, SHA256) for the VP archive.

Has lot of switches to adapt all operations flexible to any situation.

RAR-like syntax.

With the functions Add and Delete it's possible to use VPT as part of a update package for updating VP archives directly on the players computer. So patch-VP's are no longer needed.

Needs Windows XP SP3 as minimum and has otherwise no dependency.

Compatible with Total Commander plugin "MultiArc". With this plugin the following standard functions are possible in Total Commander: Create, Add, Move, List, Extract, Delete. Furthermore, the combination of VPT and TC results in some special functions and features:

A VP archive can be synchronized with a normal directory (in both directions). The sync function allows a very simple updating of an already existing VP archive, ideal for updates.

Multiple VP archives can be unpacked at once. You can also specify whether each VP archive is to be unpacked into a separate subdirectory. Ideally if you unpack the complete contents of a Freespace Mod and want to preserve the original structures.

Any file can be changed directly in the VP without having to unpack the archive manually and have to pack it again after the change. Thus, e.g. a text file can be modified directly with an editor. After the change you are asked if the changed file is to be packed again into the archive.

Files and/or folders can be copied to a non existing path inside an archive. This can be specified directly during the packing process. The path may also contain a plurality of subfolders, that is to say e.g. "Folder1\Folder2\ ...".

Within a single VP, the file search can be performed. The files in the result list can then be called up directly, which changes the directory in the VP and the focus is set to the relevant file.

In a folder with several VPs or in a whole drive, the file search can also be searched globally in all VP archives. The files in the result list can then be called directly, which opens the relevant VP, changes the directory in the VP, and sets the focus to the relevant file.

4. Syntax and examples

Hidden Text: 4.1 Help - Syntax, inclusive special commands and switches.  Show

<switches> - general -re Use Regular Expression instead of simple pattern -nh Show no header (not for command 'lb') -na Show no actions (not for command 'lb') -nl Show no file list (not for command 'lb') -nt Show no table structure (not for command 'lb') -ns Show no summary (not for command 'lb') -nvp Add no .VP suffix if missing -sim Simulate the operation (not for list commands) Note: useful for testing parameters like RegEx* -nvc No VP validity check (not recommended) Note: for all operations which reads an existing archive* -pt Print the current time with milliseconds at the begin of any line Note: useful for debugging/testing -nop No operation - this switch does simply nothing Note: useful as placeholder in scripts

<switches> - Add/Move (a,m) -ndd Add no top level directory 'data' Note: useful if 'data' is already added by file pattern/RegEx -o Overwrite existing files -ovp Overwrite VP - delete an existing archive before packing -nr No recursion - add only files from source dir without subfolders Note: works only with file pattern/RegEx -cl Convert folder and file names to lower case Note: on existing archives it converts the complete directory to lower case, not only the added files. -cu Convert folder and file names to upper case Note: on existing archives it converts the complete directory to upper case, not only the added files. -ih Include hidden files Note: works only with file pattern/RegEx -is Include system files Note: works only with file pattern/RegEx -il Include link/junction files Note: works only with file pattern/RegEx* -ie Include empty files (not recommended) Note: most other VP tools doesn't support empty files* -ndc No file date check Note: if set then an invalid file date will change to timestamp 1 instead of stopping the process.* -md5 Generate a MD5 checksum file for the archive* -sha Generate a SHA256 checksum file for the archive

<archive> Path and filename of the archive. The suffix '.vp' will added automatically if it's not set. This behavior can be disabled by using the -nvp switch. Path is created if not exists.

<files> Multiple files can used with | as separator and all files must enclosed in quotes like "file1|file2|file3". Simple file pattern allowed with ? and * or use RegEx (-re switch). It will automatically set to * if it's empty.

Hint: The fastest way to list/extract a whole archive or to add a complete directory to a new archive is to use * as file pattern without -re switch. This disables all filter mechanism.

<@list> A file which contains all files wanted to add/list/extract/delete. It must have the same format like the list from command 'lb' (bare format). Simple file pattern and RegEx (use -re switch) can also be used in this list.

<source dir> Path from where files will be added recursively. It will automatically set to current work dir if it's empty.

<output dir> Path where files will be extracted. It will automatically set to current work dir if it's empty. Path is created if it doesn't exists.

<path inside> It's needed for adding files to an existing archive to put the files in an existing folder inside the archive or to create this folder. This path can contain multiple folders like "folder1\folder2\folder3...".

Type 'VPT -h' for helpType 'VPT -h*' for help inclusive special commands/switchesType 'VPT -hh' for examplesType 'VPT -hh*' for examples inclusive special ones for advanced users

Create example 1:VPT a new_core.vp Add all files and folders from current directory with their relative paths to the new archive 'new_core.vp'. The top level directory 'data' will automatically added.

Create example 2:VPT a -ih new_core.vp * d:\game\data Add all files with their relative paths from 'd:\game\data' inclusive hidden files to the new archive 'new_core.vp'. The top level directory 'data' will automatically added.

* Create example 3:VPT a -re-sim new_core.vp "movies\\(?!prologue.*)" d:\game\data Add all movies from 'd:\game\data\movies' with their relative paths but exclude all movies beginning with 'prologue' in filename. The top level directory 'data' will automatically added. Packing is only simulated without any write access.

* Create example 4:VPT a -re-ndd new_core.vp "data\\(?!(cbanims|hud|maps|movies)\\)" d:\game Add all files from 'd:\game\data' to the new archive 'new_core.vp' but exclude the subfolders 'cbanims', 'hud', 'maps' and 'movies' and supress the top level directory 'data'. The switch '-ndd' is needed here because 'data' will added already by file pattern.

Creating a new VP archive with selected folders. The top level folder "data" will created automatically.

Adding a folder to the created VP archive.

Adding selected files to a non existing folder. This folder name can defined directly in the input box, here "\tables".

Any file in an existing archive can be edited without manually unpack/pack the VP archive.

Synchronizing a folder with a VP archive.

Hidden Text: 5.2 Integration into Total Commander using MultiArc  Show

Here is the complete way to install MultiArc and VPT in Total Commander. The interface of VPT was designed for MA version 1.4.2.144. Older versions of MA may cause problems with VPT. During the development of VPT, Total Commander Version 9.0a was used.

1. Total Commander absolutely "Run as administrator", as it would lead to problems during the installation and especially configuration of MultiArc.

3. Double-click on the downloaded MultiArc archive in the TC or press <Enter> and the following window appears. Confirm this with <Yes> and accept the suggested installation path in the next window.

4. Once MA is installed, two files must be copied to the MultiArc directory. If MA is installed in the proposed default folder, the easiest way to reach this folder is to insert the following command into the TC command line and press <Enter>.

5. In this folder, VPT.exe and Volition Package.addon must be copied from the VPT archive.

6. Now select any file in the TC - e.g. the newly copied file VPT.exe - and start the packing process. Either from the menu, toolbar or simply with <Alt> + <F5>. Then the following window should appear. On the right, select "MultiArc" from the drop-down list at "->". Then click <Configure> directly below.

My first attempts at game-modding in general and Modding of Wing Commander Saga in particular, I did in 2012. At that time I had to do for the first time with VP archives and sat mainly VPVIEW. At the end of 2013, when our own project Wing Commander Saga German was started, a script-capable tool was needed to create VP archives. The only suitable tool that was available for Windows back then was VPMAKE, which we then used throughout the development and beta test. All other tools were useless for our project because they were not scriptable and also had some serious bugs.

Also after the release (end of 2015) the tool VPMAKE was used for all updates of WCSD (up to and including Service Pack 1, end of 2016). However, VPMAKE can only generate VPs but not unpack. So in 2014 I developed my own VP function library (VPU UDF) for List and Extract for the programming language AutoIt3. This library was then used by several - mostly internal - tools, including "WCS Base Auto Extract" and "VPU" (never published), a script-capable tool for listing and unpacking VP archives. We also integrated VPU into TC by means of MA. So you could open VP's in the TC, list and unpack. {Note: TC is the default file manager of our team's two programmers.} Already at that time (2014), VPU mastered unpacking with a file list as a parameter, file list from a file, file patterns, and RegEx. With the combination of VPMAKE and VPU I had all the essential functions to be able to handle script-controlled with VP archives. However, the functionality of VPMAKE was too limited for me and I wanted to combine all the functions in just one tool. So at the end of 2016 I started to expand the function library and VPU so that VP's could be created, like with VPMAKE. However, with the advantages of VPU (file pattern and RegEx). The tool was renamed to "VPT" and the function library (UDF) to "VPPU". At the beginning of 2017, the Add and Delete functions were also added to allow the subsequent addition and deletion of files.

Thus, VPT now offers (2017) more than the combination VPMAKE and VPU. VPT has become a universal VP Tool and will replace VPMAKE in our production system.

Derek Meek - for VPMAKE which inspires me to create VPU and then VPTRob Saunders - for his UnixTime UDFMalkey - for his ArrayMultiSort UDFHarold Siebenküttel - for testingJonathan Bennett - for AutoItMy wife - for her incredible patience ^^

Re: [Windows] Public Beta: VPT (CLI) with MultiArc Addon for Total Commander

Well, VPT is written in a language that exists only on Windows, so the source would not help. And i am working and developing only in the Windows environment, i gave up all other platforms long long ago. With other words: i have no time for other platforms. In my sparse free time i write tools only in Windows. Sorry. :-(

Re: [Windows] Public Beta: VPT (CLI) with MultiArc Addon for Total Commander

Yeah, well, as i know is that under Linux the users have access to several Volition Package CLI tools. The Windows users have much less CLI tools for that duty, the most Windows tools are GUI tools. So i simply fill this gap a bit.

Re: [Windows] Public Beta: VPT (CLI) with MultiArc Addon for Total Commander

Hmm, I only knew of one CLI-based VP editor and I thought the code was cross-platform or Windows-specific already. But, with Total Commander, I don't know of another tool on any platform that could be this easy to use and functional. It's awesome. Have to try it out this weekend.

Re: [Windows] Public Beta: VPT (CLI) with MultiArc Addon for Total Commander

And there is one or two more VP tools i found in Google i think. But i forgot the URLs.

You are also a TC user then? Yes, TC is extremely powerful and flexible, i work with it since more than 20 years. And so i made VPT fully compatible to MultiArc to get the best possible functionality. I made a howto for VPT+MA+TC but it's currently only in german available. But if you are a TC user you will understand what is to do if you see the pictures. Look in my german topic at point 5.2.

A question about the forum here: is there a design element to hide text so the user can open the text separately? Like the special spoiler BBcode i built in on our own forum? If you have a look at my german topic you can see what i mean. The spoiler BBcode here is not suited for that what i want to do. That's was the cause why i created a second post to keep the main post compact.

Sticky it!I use Total Commander too from long ago, from the times it was Windows Commander, and before it, Norton Commander Luke: If you want you could release the code anyway and wait for others to adapt it to Linux and MacOS, for greater good.I suppose this only works on 32-bit TC, I can't register the .vp extension, always got the Not Registered in TC, I can get inside the .vp file with Ctrl+PgDwn tho

I use Total Commander too from long ago, from the times it was Windows Commander, and before it, Norton Commander

Same here ^^

Quote

I suppose this only works on 32-bit TC, I can't register the .vp extension, always got the Not Registered in TC, I can get inside the .vp file with Ctrl+PgDwn tho

It works with both TCMD 32 and TCMD 64. My colleague and main betatester (Harold Siebenküttel) works only with TCMD 64. Personally i use mainly TCMD 32 because there are several extensions i need but they exist only as 32 bit. Two things:

Have you followed exactly the installation process in appendix B.2? For VPT MultiArc MVV is needed. VPT don't work with the original MultiArc, it is designed for MultiArc MVV. And especially the point with "Run as Administrator" on installation is important.

If you use both, TCMD 64 and TCMD 32 you must install MA+VPT with TCMD 32. If you use only TCMD 64 then install MA+VPT with TCMD 64.

Much has happened in the last 14 months since release. All changes are listed as usual in the attached changelog.

The article in the starting post has been extensively revised. Among other things, the subsection 2.2 has been added and 4 more points in section 4.

Note: In order to keep content differences of the forum article in the three forums HLP, FSG and WCSD as small as possible, the starting post has now been replaced completely by the translation of the german forum article in the WCSD Forum. The most part was translated by google, sorry for that.