Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: HLD_Prophecy on January 21, 2018, 03:21:40 pm

Title: How to make a VP file?
Post by: HLD_Prophecy on January 21, 2018, 03:21:40 pm
Hey all!

I'm trying to package the working copy of my mod into a vp file for distribution. I used to use VPMage over a year ago, but it no longer works for me (it fails to recognize any of the files as "valid vp files")

What do you guys use to set up vp's, and how do I use them?

Thanks!
Title: Re: How to make a VP file?
Post by: Colonol Dekker on January 21, 2018, 07:01:34 pm
Have you checked http://wiki.hard-light.net/index.php/Portal:Modding ?
Title: Re: How to make a VP file?
Post by: HLD_Prophecy on January 21, 2018, 08:23:38 pm
Yes, I looked at the page on VP files. (http://wiki.hard-light.net/index.php/*.VP)

VPCS produces a vp file that did not work properly. I can't figure out how to use QuickVP, VPMage, or Maja. VPGUI would not install.

Basically I need an explanation of how to use VPMage, QuickVP, or Maja.
Title: Re: How to make a VP file?
Post by: mjn.mixael on January 21, 2018, 08:31:07 pm
If you're looking to release something, Knossos will take care of packing your mod into VPs automatically upon upload/release.
Title: Re: How to make a VP file?
Post by: HLD_Prophecy on January 21, 2018, 09:28:01 pm
If you're looking to release something, Knossos will take care of packing your mod into VPs automatically upon upload/release.

That would be nice, but I'd like the mod to be available for people who don't use the Knossos launcher... Could I use the launcher to package it once and then redistribute the package in my release topic?
Title: Re: How to make a VP file?
Post by: krevett62 on January 22, 2018, 12:13:59 am
I'm on windows and I use VPT (volition package tool) by luke of wcsaga.org it's a command line packer/unpacker really easy to use and fast!
Title: Re: How to make a VP file?
Post by: HLD_Prophecy on January 22, 2018, 01:58:21 pm
I'm on windows and I use VPT (volition package tool) by luke of wcsaga.org it's a command line packer/unpacker really easy to use and fast!

Sounds great, could you please give me a link and instructions on how to use it?
Title: Re: How to make a VP file?
Post by: ngld on January 22, 2018, 03:03:03 pm
Here you go: https://www.hard-light.net/forums/index.php?topic=93339.0
Title: Re: How to make a VP file?
Post by: HLD_Prophecy on January 22, 2018, 09:10:34 pm
Thanks a bunch! I will get back to this thread when I test it out.
Title: Re: How to make a VP file?
Post by: HLD_Prophecy on January 23, 2018, 05:18:55 pm
I'm not actually sure how to run this. I open the .exe and the window just appears for a split second and disappears.
Title: Re: How to make a VP file?
Post by: HLD_Prophecy on January 23, 2018, 05:25:02 pm
Okay, I opened it by typing the exe's path into the command line, but now the program won't follow commands. I typed in the create command exactly how it was in the example, with my own file path substituted, and it said that "VPT" was not a valid command.
Title: Re: How to make a VP file?
Post by: krevett62 on January 24, 2018, 12:11:44 am
The best way to use it is to create a batch command file  (there's examples with the download).

For example this will pack everything from "src_folder" to the "vp_name" file

Code: [Select]
@echo off

rem -------------- SETUP BEGIN --------------
set src_folder="e:\Freespace 2\custom_mod\data"
set vp_name="e:\core.vp"
rem -------------- SETUP END --------------

set start_time=%time%

VPT.exe a %vp_name% * %src_folder%

echo.
echo Start: %start_time%
echo Stop : %time%

:end
echo.
pause
exit /b
Title: Re: How to make a VP file?
Post by: krevett62 on January 24, 2018, 01:02:25 am
I forgot to add, if you want a GUI it is compatible with Total Commander plugin "Multiarc" but I can't help how to setup this as I don't own Total Commander.
Title: Re: How to make a VP file?
Post by: Colonol Dekker on January 24, 2018, 05:18:21 am
Command line driven are best used at the command prompt or using batch files
Title: Re: How to make a VP file?
Post by: HLD_Prophecy on January 24, 2018, 03:59:24 pm
The best way to use it is to create a batch command file  (there's examples with the download).

For example this will pack everything from "src_folder" to the "vp_name" file

Code: [Select]
@echo off

rem -------------- SETUP BEGIN --------------
set src_folder="e:\Freespace 2\custom_mod\data"
set vp_name="e:\core.vp"
rem -------------- SETUP END --------------

set start_time=%time%

VPT.exe a %vp_name% * %src_folder%

echo.
echo Start: %start_time%
echo Stop : %time%

:end
echo.
pause
exit /b

Thanks! Call me silly but I just want to make sure thatI do this right. So I open the VPT.exe in the command line, then type this "batch" in and go?
Title: Re: How to make a VP file?
Post by: krevett62 on January 24, 2018, 11:36:09 pm
No, you just create a text file with notepad and type this batch, then rename it *.cmd and run this cmd file.
Title: Re: How to make a VP file?
Post by: HLD_Prophecy on January 25, 2018, 03:21:52 pm
So I've got this:

Code: [Select]
@echo off

rem -------------- SETUP BEGIN --------------
set src_folder="e:\Games\Freespace 2\Lost\data"
set vp_name="e:\Lost.vp"
rem -------------- SETUP END --------------

set start_time=%time%

%VPT.exe_path% a %Lost.vp% * %e:\Games\Freespace 2\Lost\data%

echo.
echo Start: %start_time%
echo Stop : %time%

:end
echo.
pause
exit /b

But the program looks for the source folder in an entirely different location than the path specified - it looks for "data" in a folder on my desktop, and says that it can't be found. What's going on?

Title: Re: How to make a VP file?
Post by: ngld on January 25, 2018, 06:09:53 pm
Try this:

Code: [Select]
@echo off

rem -------------- SETUP BEGIN --------------
set src_folder="e:\Games\Freespace 2\Lost\data"
set vp_name="e:\Lost.vp"
rem -------------- SETUP END --------------

set start_time=%time%

VPT.exe a %vp_name% %src_folder%

echo.
echo Start: %start_time%
echo Stop : %time%

:end
echo.
pause
exit /b
Title: Re: How to make a VP file?
Post by: krevett62 on January 26, 2018, 02:34:41 am
Yes indeed I should have added that ^^
The only lines you need to change in the batch are:

set src_folder="e:\Games\Freespace 2\Lost\data"
set vp_name="e:\Lost.vp"

other lines must remain untouched ;)

Edit: If you want I attached two simple batch files, one for packing and the other for extracting vp files. Just edit with notepad the lines between "Setup begin" and "Setup end" and leave the rest as is! Of course these batch files must be in the same folder as VPT.exe when you run them.

[attachment stolen by Russian hackers]
Title: Re: How to make a VP file?
Post by: HLD_Prophecy on January 26, 2018, 03:26:32 pm
Quote
Of course these batch files must be in the same folder as VPT.exe when you run them.

There. That's why it wasn't working this whole time, the batch was in a different folder than the .exe.

The revised version handed to me by ngld did not work, but the original batch from krevett does! Thanks guys!
Title: Re: How to make a VP file?
Post by: HLD_Prophecy on January 26, 2018, 03:29:31 pm
But where does the vp files get saved to? I can't find it.
Title: Re: How to make a VP file?
Post by: krevett62 on January 26, 2018, 04:22:50 pm
You'll find the vp file in the path specified with vp_name in my batch  file it's in the root of my e:/ hdd for example
Title: Re: How to make a VP file?
Post by: HLD_Prophecy on January 26, 2018, 08:47:47 pm
Found it, thanks very much!
Title: Re: How to make a VP file?
Post by: Luke on August 10, 2018, 11:15:39 pm
@krevett62

Thank you for helping users with the use of VPT. :) In the new version I have added a very simple script example for packing a complete folder.