VPA and Ufo4VPA for Dosplan users

This forum is for discussion of the VPA client.

Moderators: BitMask, Havok

User avatar
FireAge
Posts: 424

VPA and Ufo4VPA for Dosplan users

Post#1 » Sun Nov 23, 2014 4:43 pm

WARNING
This setup below only works if you receive a 3.5 RST from the host. Otherwise UFO4VPA will not accept it. That means you can use the very first RST you receive from the host. Otherwise you need to manually change one TRN file to 3.5 format using c2mktrn or PCC2. Once you submit that to the host, the next turn you receive will be 3.5 format, and everything should work out. Thanks to James T. Plagerism for finding that out.
/WARNING

I finalized setting up a nice combo package which can get players into using VPA and Ufo4VPA together, without the hassle of having to configure everything (ok, it's still some work...). It's aimed at users of Dosplan with Dosplan registration as I do not have any experience with Winplan.

Using Ufo4VPA with VPA, a Dosplan registered version and with PCC2 tools in this package will give you:
- 50+ target support using Dosplan registry value (KoreX.DAT)
- The awesomeness of the newest VPA with accurate minefields, teleport support etc:
http://www.circus-maximus.com/forums/vi ... 382&t=5199
- The additional awesomeness of Ufo4VPA, support for Jupiter, data from allied RST, ion storm prediction:
http://www.webring.org/l/rd?ring=vgap;i ... ufo4vpa%2F
- Turn based backup, so you can always go back easily if something goes wrong

It's available here: http://www.tinyupload.org/q4tkftrvh7r
It should be extracted to the root on your C drive.
Once extracted you will have:

Main Folder:
C:\Games\VGAPlan\

Subfolders:
7ZIP - Contains 7za.exe, which is usefull for command line zip activites, used in my package for game backups
DosBox - Contains the DosBox 0.74 package, used to run VPA and Ufo4VPA in
PCC2 - Contains PCC2 from 20140217, used to unpack and pack turns.
Planets - Dosplan 320 (shareware), VPA 3.67, Ufo4VPA, PVCR

Subfolders of planets:
Game1 - Contains a Game1.bat, a Game1.conf and VGAPlan.map
BACKUP - Location where backups will be placed.

Steps to use this package
- Install Dosplan somewhere else (not in any location mentioned above), using the Dosbox command shell.
- Copy all files from the instal directory to C:\Games\VGAPlan\Planets
- Copy FIZZ.BIN to the Game1 directory
- Edit Game1.bat and set the parameters under "USER SETTINGS", this will allow you to select your race and allies if needed.
- Edit Game1.conf and scroll to the bottom, to the autoexec.bat section and change it to suit your race and allies.
- Now put your RST file, and possible other files received from the host, like xyplan.dat, into the Game1 directory.
- Start the game by running Game1.bat

The batch file will do the following steps:
- Backup your complete game folder into the BACKUP folder, with extension 001 (and subsequent numbers for subsequent turns)
- Unpack the RST with c2unpack from PCC2 (and allied RST if so configured)
- Delete the RST files which were unpacked
- Call DosBox which will then:
- Run Ufo4VPA and VPA subsequently to provide the maximum amount of data to VPA and then start VPA
- Make the TRN file with c2mkturn from PCC2 (and allied TRN)

The next time you run the batch file, no RST will be present, so it will just run VPA and make the TRN afterwards.

Credits:
DosBox - To whoever made DosBox... ;-)
7ZIP - To whoever...
PCC2 tools - Streu
VPA and Ufo4VPA - Quapla for upgrading and synchronizing the last versions.


I open to hear about any improvements that could be made.

Batch file content for reference:

Code: Select all

@ECHO OFF
REM -----------------------------
REM USER SETTINGS
REM -----------------------------

REM Set Game name and Race Number
SET GAME_NAM=Game1
SET RACE_NUM=1

REM Set Allied Race Numbers and whether they are enabled (up to 3 for now)
SET ALY1_NUM=2
SET ALY1_ENA=N
SET ALY2_NUM=4
SET ALY2_ENA=N
SET ALY3_NUM=6
SET ALY3_ENA=N

REM -----------------------------
REM INITIALIZE
REM -----------------------------

REM Set Location of the required software packages
SET VGAP_DIR=C:\games\VGAPlan\planets
SET C2UN_EXE=C:\games\VGAPlan\PCC2\c2unpack.exe
SET C2MK_EXE=C:\games\VGAPlan\PCC2\c2mkturn.exe
SET ZIP7_EXE=C:\games\VGAPlan\7ZIP\7za.exe
SET DOSB_EXE=C:\games\VGAPlan\DosBox\DOSBox.exe

REM Set Location of the dosbox conf file
SET DOSB_CNF=%VGAP_DIR%\%GAME_NAM%\%GAME_NAM%.conf

REM Set variables for the MOVE_ZIP routine
SET BACK_DIR=%VGAP_DIR%\BACKUP\%GAME_NAM%
SET DONE=N
SET NZIP=1

REM -----------------------------
REM BACKUP GAME DIRECTORY
REM -----------------------------

REM GO TO Planets folder
CD /D %VGAP_DIR%

REM Check if RST file exists and if not goto RUN_TURN
IF NOT EXIST %GAME_NAM%\player%RACE_NUM%.rst GOTO RUN_TURN
  REM First ZIP the current game folder
  %ZIP7_EXE% a -t7z %GAME_NAM%.7z %GAME_NAM%
  REM Call MOVE_ZIP to put it in the backup location with an incremental file extension
:while1
  IF %NZIP% LSS 1000 (
    IF %DONE%==N (
      CALL :MOVE_ZIP %NZIP%  
      SET /A "NZIP=NZIP+1"
      GOTO while1
    )
  )

REM -----------------------------
REM UNPACK RST
REM -----------------------------

REM Check if RST file exists and if not goto RUN_TURN
IF NOT EXIST %VGAP_DIR%\%GAME_NAM%\player%RACE_NUM%.rst GOTO RUN_TURN
  REM Unpack with c2unpack the main RST then delete it
  %C2UN_EXE% -w %RACE_NUM% %VGAP_DIR%\%GAME_NAM%
  DEL %VGAP_DIR%\%GAME_NAM%\player%RACE_NUM%.rst
  REM Unpack the allied RST if enabled and then delete them
  IF %ALY1_ENA%==Y %C2UN_EXE% -w %ALY1_NUM% %VGAP_DIR%\%GAME_NAM%
  IF %ALY1_ENA%==Y DEL %VGAP_DIR%\%GAME_NAM%\player%ALY1_NUM%.rst
  IF %ALY2_ENA%==Y %C2UN_EXE% -w %ALY2_NUM% %VGAP_DIR%\%GAME_NAM%
  IF %ALY2_ENA%==Y DEL %VGAP_DIR%\%GAME_NAM%\player%ALY2_NUM%.rst
  IF %ALY3_ENA%==Y %C2UN_EXE% -w %ALY3_NUM% %VGAP_DIR%\%GAME_NAM%
  IF %ALY3_ENA%==Y DEL %VGAP_DIR%\%GAME_NAM%\player%ALY3_NUM%.rst

REM -----------------------------
REM RUN TURN
REM -----------------------------
:RUN_TURN
  REM Call DosBox with the proper conf file
  %DOSB_EXE% -conf %DOSB_CNF% -noconsole -exit 

REM -----------------------------
REM MAKE TURN
REM -----------------------------
  REM Call C2mkturn to make the turn in 3.5 format with 50+ target support
  %C2MK_EXE% %VGAP_DIR%\%GAME_NAM%
  PAUSE
  GOTO End


REM -----------------------------
REM Move ZIP Routine, takes a number from 0 to 999 as parameter
REM -----------------------------
:MOVE_ZIP
  REM If DONE is set to Y the routine does not need to do anyting anymore
  IF %DONE%==Y GOTO :EOF
  REM Create the extension with the parameter, 1 becomes 001, 91 becomes 0091, 234 becomes 00234
  SET FEXT=00%1
  REM Take the last 3 characters from FEXT
  SET FEXT=%FEXT:~-3%
  REM Look if file exists and if so, skip the routine
  IF EXIST %BACK_DIR%\%GAME_NAM%.%FEXT% GOTO :EOF
  REM The file did not exist, so move it
  MOVE %VGAP_DIR%\%GAME_NAM%.7z %BACK_DIR%\%GAME_NAM%.%FEXT%
  REM Set Done to Y so the routine will not run again
  SET DONE=Y
GOTO :EOF
:End
Last edited by FireAge on Wed Dec 03, 2014 2:06 pm, edited 3 times in total.

User avatar
casebolt
Posts: 1589

Re: VPA and Ufo4VPA for Dosplan users

Post#2 » Mon Nov 24, 2014 4:02 pm

Tx for the work

User avatar
FireAge
Posts: 424

Re: VPA and Ufo4VPA for Dosplan users

Post#3 » Mon Nov 24, 2014 4:13 pm

You're welcome :)

If you use it and have ideas let me know if I can improve upon it.

April76
Posts: 16

Re: VPA and Ufo4VPA for Dosplan users

Post#4 » Tue Sep 27, 2016 1:43 pm

FireAge wrote:
Using Ufo4VPA with VPA, a Dosplan registered version and with PCC2 tools in this package will give you:
- 50+ target support using Dosplan registry value (KoreX.DAT)
- The awesomeness of the newest VPA with accurate minefields, teleport support etc:
http://www.circus-maximus.com/forums/vi ... 382&t=5199
- The additional awesomeness of Ufo4VPA, support for Jupiter, data from allied RST, ion storm prediction:
http://www.webring.org/l/rd?ring=vgap;i ... ufo4vpa%2F
- Turn based backup, so you can always go back easily if something goes wrong
it's really cool

but:
FireAge wrote: It's available here: http://www.tinyupload.org/q4tkftrvh7r
now it's not available here ((
can you reload somewhere or place it on circus host in collection like that
http://www.circus-maximus.com/albsaddons.htm

i just wanna use ufo4vpa in my dos box and asking some help

regards
max

Return to “Project 7: VPA”

Who is online

Users browsing this forum: No registered users and 1 guest

cron