@echo off
rem
rem THIS FILE IS DUPLICATED IN THE MAIN DATA FILE.
rem THIS VERSION IS USED FOR THE DOSINSTALLATION AND
rem FIRST TIME BOOT ONLY.
rem
rem ===================================================
rem BGAME PRODUCTION TC BAT INSTALLER AND LAUNCHER v3.0
rem COPYRIGHT MOLOCH, BGAME PRODUCTIONS,     1998-2000.
rem ===================================================
rem        STARSHIP TROOPERS TOTAL CONVERSION
rem ===================================================
:startup
cls
if "%1"=="" goto inilogic
if "%1"=="/uninst" goto uninst
if "%1"=="/XVGA.CON" goto vgacall
if "%1"=="/XCTF.CON" goto ctfcall
goto runduke

:inilogic
if exist sst_full.ins goto bmainmen

:inisetup
if not exist duke3d.exe goto snoduke
if not exist duke3d.grp goto snoduke
if not exist sst_full.dat goto swiped
if exist sst_demo.ins goto demohere

:setupgo
cls
echo =============================================================================
echo        STARSHIP TROOPERS TOTAL CONVERSION SETUP, BGAME PRODUCTIONS 2000.
echo =============================================================================
echo DISCLAIMER:
echo.
echo "Starship Troopers" (tm) TC is a freeware, non-commercial fan project, not an
echo official Starship Troopers game. All included Starship Troopers material 
echo (except for original Bgame material) was gathered from public domain and is 
echo under public domain copyright license agreement. You may NOT sell this
echo software to gain profit. This project was not sponsored by any parties that
echo are in any way related or affiliated with the "Starhip Troopers" logo or
echo indicia.  
echo All original Bgame material (c) Bgame 2000. Duke Nukem 3D (c) 3DRealms.
echo.
echo Released as FREEWARE, but not public domain! Use, but don't abuse!
echo.
echo By installing this TC, you hereby agree with the terms and you are installing
echo this software at your own risk. Starship Troopers TC is provided "as-is" and
echo and there are no guarantees of any kind.
echo. 
echo Press CTRL+BREAK to cancel the installation, or any other key to continue...
pause > nul
:secpage
cls
echo =============================================================================
echo        STARSHIP TROOPERS TOTAL CONVERSION SETUP, BGAME PRODUCTIONS 2000.
echo =============================================================================
echo INSTALLATION:
echo.
echo There are two installations of the Starship Troopers TC. One is for version
echo v1.3D, and the other for Duke Nukem v1.4 (Atomic).
echo.
echo Disk space required: 80 mbytes during the installation, 60 mbytes will be used.
echo.
echo Starship Troopers TC is not installed.
echo.
echo 1. Install Starship Troopers TC for Duke Nukem v1.3D
echo 2. Install Starship Troopers TC ATOMIC (v1.4, v1.5)
echo 3. Help with the Install program and procedure
echo 4. All this is great, but I don't have a clue which version I have. ;)
echo 5. Exit
echo.
echo.
echo.
echo.
choice /n /c:12345 Choose an option:
if errorlevel 5 goto exit
if errorlevel 4 goto dversion
if errorlevel 3 goto insthelp
if errorlevel 2 goto dukev14
if errorlevel 1 goto dukev13

:dversion
cls
echo =============================================================================
echo        STARSHIP TROOPERS TOTAL CONVERSION SETUP, BGAME PRODUCTIONS 2000.
echo =============================================================================
echo.
echo DETECTING DUKE NUKEM VERSION
echo.
echo This wizzard will now attempt to identify your version of Duke Nukem.
echo Version number will be written on the screen.
echo.
echo Hit any key.
pause > nul
duke3d /j
echo.
echo The above line should contain the version identification. Focus on the last
echo string, at the end of the line -- that's the data you need. Remember this
echo number (either v1.3D, v1.4 or v1.5) and select the appropriate installation
echo option (at the main menu of the SST TC setup) according to it.
echo.
echo Hit any key to return to the main menu.
pause > nul
goto secpage


:dukev13
cls
echo =============================================================================
echo        STARSHIP TROOPERS TOTAL CONVERSION SETUP, BGAME PRODUCTIONS 2000.
echo =============================================================================
echo.
echo To abort the installation press CTRL+BREAK.
echo.
echo Press a key to start the installation.
pause >nul
echo.
echo Backing up Duke Nukem files...
md Stbackup
if exist logo.anm move logo.anm stbackup\logo.anm
if exist cineov2.anm move cineov2.anm stbackup\cineov2.anm
if exist cineov3.anm move cineov3.anm stbackup\cineov3.anm
if exist radlogo.anm move radlogo.anm stbackup\radlogo.anm
if exist duketeam.anm move duketeam.anm stbackup\duketeam.anm
if exist game.con move game.con stbackup\game.con
if exist user.con move user.con stbackup\defs.con
if exist defs.con move defs.con stbackup\game.con
if exist demo1.dmo move demo1.dmo stbackup\demo1.dmo
if exist demo2.dmo move demo2.dmo stbackup\demo2.dmo
if exist demo3.dmo move demo3.dmo stbackup\demo3.dmo
if exist demo4.dmo move demo4.dmo stbackup\demo4.dmo
if exist duke3d.bin move duke3d.bin stbackup\duke3d.bin
if exist palette.dat move palette.dat stbackup\palette.dat
if exist lookup.dat move lookup.dat stbackup\lookup.dat
if exist tiles000.art move tiles000.art stbackup\tiles000.art
if exist tiles001.art move tiles001.art stbackup\tiles001.art
if exist tiles002.art move tiles002.art stbackup\tiles002.art
if exist tiles003.art move tiles003.art stbackup\tiles003.art
if exist tiles004.art move tiles004.art stbackup\tiles004.art
if exist tiles005.art move tiles005.art stbackup\tiles005.art
if exist tiles006.art move tiles006.art stbackup\tiles006.art
if exist tiles007.art move tiles007.art stbackup\tiles007.art
if exist tiles008.art move tiles008.art stbackup\tiles008.art
if exist tiles009.art move tiles009.art stbackup\tiles009.art
if exist tiles010.art move tiles010.art stbackup\tiles010.art
if exist tiles011.art move tiles011.art stbackup\tiles011.art
if exist tiles012.art move tiles012.art stbackup\tiles012.art
if exist tiles013.art move tiles013.art stbackup\tiles013.art
if exist tiles014.art move tiles014.art stbackup\tiles014.art
if exist tiles015.art move tiles015.art stbackup\tiles015.art
echo.
if exist setup.wmf del setup.wmf
echo Exploding Starship Troopers TC v1.3 files...
copy sst_full.dat sst_full.exe >nul
sst_full.exe
del sst_full.exe
goto endsetup

:dukev14
cls
echo =============================================================================
echo        STARSHIP TROOPERS TOTAL CONVERSION SETUP, BGAME PRODUCTIONS 2000.
echo =============================================================================
echo.
echo To abort the installation press CTRL+BREAK.
echo.
echo Press a key to start the installation.
pause >nul
echo.
echo Backing up Duke Nukem files...
md Stbackup
if exist logo.anm move logo.anm stbackup\logo.anm
if exist cineov2.anm move cineov2.anm stbackup\cineov2.anm
if exist cineov3.anm move cineov3.anm stbackup\cineov3.anm
if exist radlogo.anm move radlogo.anm stbackup\radlogo.anm
if exist duketeam.anm move duketeam.anm stbackup\duketeam.anm
if exist game.con move game.con stbackup\game.con
if exist user.con move user.con stbackup\defs.con
if exist defs.con move defs.con stbackup\game.con
if exist demo1.dmo move demo1.dmo stbackup\demo1.dmo
if exist demo2.dmo move demo2.dmo stbackup\demo2.dmo
if exist demo3.dmo move demo3.dmo stbackup\demo3.dmo
if exist demo4.dmo move demo4.dmo stbackup\demo4.dmo
if exist duke3d.bin move duke3d.bin stbackup\duke3d.bin
if exist palette.dat move palette.dat stbackup\palette.dat
if exist lookup.dat move lookup.dat stbackup\lookup.dat
if exist tiles000.art move tiles000.art stbackup\tiles000.art
if exist tiles001.art move tiles001.art stbackup\tiles001.art
if exist tiles002.art move tiles002.art stbackup\tiles002.art
if exist tiles003.art move tiles003.art stbackup\tiles003.art
if exist tiles004.art move tiles004.art stbackup\tiles004.art
if exist tiles005.art move tiles005.art stbackup\tiles005.art
if exist tiles006.art move tiles006.art stbackup\tiles006.art
if exist tiles007.art move tiles007.art stbackup\tiles007.art
if exist tiles008.art move tiles008.art stbackup\tiles008.art
if exist tiles009.art move tiles009.art stbackup\tiles009.art
if exist tiles010.art move tiles010.art stbackup\tiles010.art
if exist tiles011.art move tiles011.art stbackup\tiles011.art
if exist tiles012.art move tiles012.art stbackup\tiles012.art
if exist tiles013.art move tiles013.art stbackup\tiles013.art
if exist tiles014.art move tiles014.art stbackup\tiles014.art
if exist tiles015.art move tiles015.art stbackup\tiles015.art
echo.
if exist setup.wmf del setup.wmf
echo Exploding Starship Troopers TC files...
copy sst_full.dat sst_full.exe >nul
sst_full.exe
del sst_full.exe
echo.
echo Applying Starship Troopers TC ATOMIC overhead patch...
del game.con
del boot.con
del ctf.con
del vga.con
del tiles009.art
copy sst_atom.dat sst_atom.exe >nul
sst_atom.exe
del sst_atom.exe

:endsetup
cls
echo DELETING THIS FILE WILL CAUSE ERRORS IN SST TC SETUP >sst_full.ins
echo DELETING THIS FILE WILL CAUSE ERRORS IN SST TC SETUP >sst_tc.ins
echo.
echo MAIN INSTALLATION COMPLETE
echo.
echo Press a key for the next step...
pause >nul
if exist winsetup.exe copy winsetup.exe SST_TC.exe >nul
del ssttemp.ini


:vgacheck
cls
echo =============================================================================
echo        STARSHIP TROOPERS TOTAL CONVERSION SETUP, BGAME PRODUCTIONS 2000.
echo =============================================================================
echo.
echo It is essential that you always choose the same resolution (SVGA high-res or
echo VGA low-res) in this launcher and in the game setup.
echo.
echo Make sure that you always have the correct mode sellected in the TC launcher.
echo NEVER use high res setting with VGA resolution chosen in game setup or two
echo foes will be invisible during gameplay due to Build limitations.
echo.
echo PLEASE NOTE THAT THIS TC WAS DESIGNED FOR 640x480 RESOLUTION!
echo Lower resolutions are not supported officialy and you may have problems.
echo.
echo.
echo What screen resolution you play on and have configured in Duke's Setup
echo Program?
echo.
echo 1. 320x200 or 320x400
echo 2. 640x480 or 800x600
choice /n /c:12
if errorlevel 2 goto 640res
if errorlevel 1 goto 320res

:320res
echo LOWRES >sst320.ini
goto bw

:640res
if exist sst320.ini del sst320.ini
goto bw


:insthelp
cls
echo =============================================================================
echo        STARSHIP TROOPERS TOTAL CONVERSION SETUP, BGAME PRODUCTIONS 2000.
echo =============================================================================
echo INSTALLATION HELP
echo.
echo Starship Troopers TC Setup Wizard requires almost no input from the user.
echo It is highly recommended to have a fresh, DEDICATED copy of Duke Nukem 3D for
echo this TC. Dedicated copy guarantes secure and trouble-free installation.
echo.
echo DO NOT INSTALL THE STARSHIP TROOPERS TC OVER ANY OTHER TC OR ADD-ON!
echo.
echo If you have Starship Troopers TC DEMO installed, Setup will detect that and
echo uninstall the demo accordingly, as long as the DEMO files and SST_DEMO.BAT
echo are present and were not modified.
echo.
echo Help files, HTML Manual and other goodies will be available after the TC is
echo installed. A special Windows Launcher is also provided (SST_TC.EXE).
echo. 
echo. 
echo.
echo More help on http://www.dukeworld.com/starshiptroopers (click on Forum).
echo.
echo Press a key to return to the main menu.
pause >nul
goto secpage

:demohere
echo =============================================================================
echo        STARSHIP TROOPERS TOTAL CONVERSION SETUP, BGAME PRODUCTIONS 2000.
echo =============================================================================
echo.
echo  WARNING: Demo version of SST TC is already installed in this directory.
echo.
if not exist sst_demo.bat goto ndmobat
echo  The demo has to be uninstalled before the installation can proceed. This
echo  Wizard will now attempt uninstall the SST TC demo.
echo.
echo  Hit a key to continue...
pause >nul
call sst_demo.bat /uninst
goto inilogic

:ndmobat
echo  Unfortunately, this Wizard was unable to found SST_DEMO.BAT. This means the
echo  demo installation files were damaged and/or the TC demo was not uninstalled
echo  properly. To fix this problem, delete this copy of Duke Nukem and install a
echo  fresh version.
echo.
echo  Hit a key to exit...
goto exit

:snoduke
cls
echo =============================================================================
echo        STARSHIP TROOPERS TOTAL CONVERSION SETUP, BGAME PRODUCTIONS 2000.
echo =============================================================================
echo.
echo  ERROR: Setup files are not in the right directory.
echo.
echo  Please copy ALL SST TC setup files (all files distributed in the archive)
echo  into your Duke Nukem directory (where DUKE3D.EXE and DUKE3D.GRP are).
echo  A dedicated copy of Duke Nukem is recommended.
echo.
echo  Hit a key to exit...
pause>nul
goto exit

:swiped
cls
echo =============================================================================
echo        STARSHIP TROOPERS TOTAL CONVERSION SETUP, BGAME PRODUCTIONS 2000.
echo =============================================================================
echo.
echo  ERROR: Data file not found.
echo.
echo  Could not find SST_FULL.DAT. Please make sure that all of the files
echo  distributed in SSTTC.EXE are extracted into the same directory.
echo.
echo  Hit a key to exit...
pause>nul
goto exit

:uninst
cls
echo =============================================================================
echo        STARSHIP TROOPERS TOTAL CONVERSION SETUP, BGAME PRODUCTIONS 2000.
echo =============================================================================
echo.
echo  Uninstall really?
choice /n   [Y]ES [N]O:
if errorlevel 2 goto bmainmen
if errorlevel 1 goto unin


:unin
cls
echo =============================================================================
echo        STARSHIP TROOPERS TOTAL CONVERSION SETUP, BGAME PRODUCTIONS 2000.
echo =============================================================================
echo.
echo Starship Troopers TC Uninstall Wizard Launched...
echo.
echo Deleting SST TC files...
del DUKETEAM.ANM
del CINEOV3.ANM
del CINEOV2.ANM
del LOGO.ANM
del RADLOGO.ANM
del TILES000.ART
del TILES001.ART
del TILES003.ART
del TILES004.ART
del TILES005.ART
del TILES006.ART
del TILES007.ART
del TILES008.ART
del TILES009.ART
del TILES010.ART
del TILES011.ART
del TILES012.ART
del TILES013.ART
del TILES014.ART
del TILES015.ART
del DUKE3D.BIN
del BOOT.CON
del ctf.con
del game.con
del VGA.CON
del LOOKUP.DAT
del PALETTE.DAT
del demo1.dmo
del demo2.dmo
del demo3.dmo
del demo4.dmo
del uninst.lst
del SSTB4.sst
del SstB6.sst
del SstCTF01.sst
del SstCTF09.sst
del SstCTF05.sst
del SstCTF07.sst
del SstCTF08.sst
del SstE1L4.sst
del Sstdm5.sst
del Sstdm6.sst
del Sstdm7.sst
del SstE1L1.sst
del SstE1L5.sst
del SstE2L3.sst
del Sste3l1.sst
del Sste3l2.sst
del Sste3l3.sst
del SstB1.sst
del SstB2.sst
del SstB3.sst
del SstB5.sst
del SstE2L1.sst
del SstCTF02.sst
del SstCTF03.sst
del SstCTF04.sst
del SstCTF06.sst
del SstDM1.sst
del SstDM2.sst
del SstDM3.sst
del Sstdm4.sst
del SstE1L2.sst
del SstE1L3.sst
del SstE2L2.sst
del SstE2L4.sst
del README!.TXT
del SstM01.WAV
del Sst002.WAV
del Sst003.WAV
del Sst004.wav
del Sst005.WAV
del Sst006.WAV
del Sst007.WAV
del Sst008.WAV
del Sst009.WAV
del Sst010.WAV
del Sst011.WAV
del Sst012.WAV
del Sst013.WAV
del Sst014.wav
del Sst015.WAV
del Sst016.WAV
del Sst017.WAV
del Sst018.wav
del Sst019.WAV
del Sst020.WAV
del Sst021.WAV
del Sst023.WAV
del Sst024.wav
del Sst025.WAV
del Sst026.WAV
del Sst027.WAV
del Sst028.WAV
del Sst029.WAV
del Sst030.WAV
del Sst031.WAV
del Sst032.WAV
del Sst033.WAV
del Sst034.WAV
del Sst035.WAV
del Sst036.WAV
del Sst037.WAV
del Sst038.WAV
del Sst039.WAV
del Sst040.WAV
del Sst041.WAV
del Sst042.wav
del Sst043.WAV
del Sst044.WAV
del Sst045.WAV
del Sst046.WAV
del Sst047.WAV
del Sst048.WAV
del Sst049.WAV
del Sst050.WAV
del Sst051.WAV
del Sst052.WAV
del Sst053.WAV
del Sst054.WAV
del Sst055.WAV
del Sst056.WAV
del Sst057.WAV
del Sst058.wav
del Sst059.wav
del Sst060.WAV
del Sst061.WAV
del Sst062.WAV
del Sst063.WAV
del Sst064.WAV
del Sst065.wav
del Sst066.WAV
del Sst067.WAV
del Sst068.WAV
del Sst069.wav
del Sst070.wav
del Sst071.wav
del Sst072.wav
del Ssttrk10.wav
del SstB01.WAV
del SstB02.WAV
del SstB03.WAV
del SstB04.WAV
del SstB05.WAV
del Sstb06.wav
del SstB07.WAV
del SstB08.WAV
del SstB09.WAV
del Sstb10.wav
del Sstb11.wav
del Sstb12.wav
del Sstb13.wav
del SstB14.WAV
del SstB15.WAV
del Sstb16.wav
del Sstb17.wav
del SstB18.WAV
del SstB19.WAV
del SstB20.WAV
del SstB21.WAV
del SstB22.WAV
del SstB23.WAV
del SstB24.WAV
del SstB25.WAV
del SstBT01.WAV
del SstBT02.WAV
del SstBT03.WAV
del Sstbt04.wav
del SstBT05.WAV
del SstBT06.WAV
del SstBT07.WAV
del Sstbt08.wav
del Sstbt09.wav
del Sstbt10.wav
del SstC01.WAV
del SstC02.WAV
del SstC03.WAV
del SstC04.WAV
del SstC05.WAV
del SstC06.WAV
del SstC07.WAV
del SstC08.WAV
del Sste01.wav
del Sste02.wav
del SstM09.WAV
del Sst001.wav
del Sstmdy1.wav
del SstSS01.WAV
del SstSS02.WAV
del SstSS03.WAV
del SstSS04.WAV
del SstSS05.WAV
del SstSS06.WAV
del SstSS07.WAV
del SstSS08.WAV
del SstSS09.WAV
del SstSS10.WAV
del Sstss11.wav
del Sstss12.wav
del Sstss13.wav
del Sstss14.wav
del Sstss15.wav
del SstTK02.WAV
del Ssttk03.wav
del Ssttk08.wav
del Ssttk09.wav
del Ssttk10.wav
del Ssttk11.wav
del Ssttk12.wav
del Ssttk13.wav
del Ssttk14.wav
del SstTRK01.WAV
del Ssttrk03.wav
del SstTRK05.WAV
del SstTRK11.WAV
del SstTRK13.WAV
del Ssttrk14.wav
del Ssttrk16.wav
del NULL.WAV
del BUTTON.WAV
del SETUP.WMF
del Sst.WMF
del sst_tc.ins
del sst_full.ins
del sst_tc.pif
if exist sst_full.dat del sst_full.dat
del sst_atom.dat
if exist sst_v14e.ins del sst_v14e.ins
if exist sst320.ini del sst320.ini
if exist sst.ini del sst.ini
deltree /Y manual
echo.
echo Recovering backup files...
if exist stbackup\logo.anm move stbackup\logo.anm logo.anm
if exist stbackup\cineov2.anm move stbackup\cineov2.anm cineov2.anm
if exist stbackup\cineov3.anm move stbackup\cineov3.anm cineov3.anm
if exist stbackup\radlogo.anm move stbackup\radlogo.anm radlogo.anm
if exist stbackup\duketeam.anm move stbackup\duketeam.anm duketeam.anm
if exist stbackup\game.con move stbackup\game.con game.con
if exist stbackup\user.con move stbackup\user.con defs.con
if exist stbackup\defs.con move stbackup\defs.con game.con
if exist stbackup\demo1.dmo move stbackup\demo1.dmo demo1.dmo
if exist stbackup\demo2.dmo move stbackup\demo2.dmo demo2.dmo
if exist stbackup\demo3.dmo move stbackup\demo3.dmo demo3.dmo
if exist stbackup\demo4.dmo move stbackup\demo4.dmo demo4.dmo
if exist stbackup\demo5.dmo move stbackup\demo5.dmo demo5.dmo
if exist stbackup\duke3d.bin move stbackup\duke3d.bin duke3d.bin
if exist stbackup\palette.dat move stbackup\palette.dat palette.dat
if exist stbackup\lookup.dat move stbackup\lookup.dat lookup.dat
if exist stbackup\tiles000.art move stbackup\tiles000.art tiles000.art
if exist stbackup\tiles001.art move stbackup\tiles001.art tiles001.art
if exist stbackup\tiles002.art move stbackup\tiles002.art tiles002.art
if exist stbackup\tiles003.art move stbackup\tiles003.art tiles003.art
if exist stbackup\tiles004.art move stbackup\tiles004.art tiles004.art
if exist stbackup\tiles005.art move stbackup\tiles005.art tiles005.art
if exist stbackup\tiles006.art move stbackup\tiles006.art tiles006.art
if exist stbackup\tiles007.art move stbackup\tiles007.art tiles007.art
if exist stbackup\tiles008.art move stbackup\tiles008.art tiles008.art
if exist stbackup\tiles009.art move stbackup\tiles009.art tiles009.art
if exist stbackup\tiles010.art move stbackup\tiles010.art tiles010.art
if exist stbackup\tiles011.art move stbackup\tiles011.art tiles011.art
if exist stbackup\tiles012.art move stbackup\tiles012.art tiles012.art
if exist stbackup\tiles013.art move stbackup\tiles013.art tiles013.art
if exist stbackup\tiles014.art move stbackup\tiles014.art tiles014.art
if exist stbackup\tiles015.art move stbackup\tiles015.art tiles015.art


echo.
echo  Starship Troopers TC was uninstalled.
echo.
echo  Hit a key...
pause >nul
del sst_tc.bat
goto exit

:ctf
cls
echo MAKE SURE MONSTERS ARE NOT SET TO "NONE" IN THE LEVEL CONFIGURATION MENU!
echo CAPTURE THE FLAG CODE REQUIRES MONSTERS ENABLED!
echo.
echo Hit a key...
pause >nul
setup.exe /xCTF.CON
goto exit

:mp
cls
echo MAKE SURE MONSTERS ARE NOT SET TO "NONE" IN THE LEVEL CONFIGURATION MENU!
echo DUKEMATCH CODE REQUIRES MONSTERS ENABLED!
echo.
echo Hit a key...
pause >nul
setup.exe
goto exit

:bw
cls
if not exist duke3d.exe goto failed
if exist sst.ini goto pass
goto first

:failed
echo =============================================================================
echo           STARSHIP TROOPERS TOTAL CONVERSION, BGAME PRODUCTIONS 2000.
echo =============================================================================
echo.
echo UNRECOVERABLE ERROR: NO DUKE3D.EXE
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo The game cannot start, Duke Nukem executable not find. 
echo Starship Troopers was either not installed correctly or the files were
echo modified. Please reinstall the SST TC.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.                                
echo.
echo.
echo.
echo.
echo.
echo.
echo [KEY TO EXIT]
pause >nul
goto exit

:pass
goto ok

:first
echo =============================================================================
echo           STARSHIP TROOPERS TOTAL CONVERSION, BGAME PRODUCTIONS 2000.
echo =============================================================================
echo.
echo FIRST TIME GREETING
echo ~~~~~~~~~~~~~~~~~~~
echo Welcome to Starship Troopers, a Total Conversion add-on for Duke Nukem 3D!
echo I hope you will enjoy playing our game. We would like to hear what you think
echo about it; so please e-mail (moloch@3dportal.com) your comments and thoughts
echo regarding the SST TC.
echo.
echo.
echo                                Sincerely, SST TC leader and creator, Moloch
echo                                              E-mail:    moloch@3dportal.com
echo                                              My ICQ UIN:           33932713
echo.                                              
echo.                                              
echo.                                             
echo.                                           
echo.
echo.
echo.
echo.
echo [KEY TO CONTINUE]
pause >nul
cls
echo =============================================================================
echo           STARSHIP TROOPERS TOTAL CONVERSION, BGAME PRODUCTIONS 2000.
echo =============================================================================
echo. 
echo A NOTE ABOUT BUILD, WEBSITE, UPDATES...:
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo If you want to build your own maps for SST you will need the latest Usermap
echo Build Package, containing MapFAQ, names.h, special art and instructions on
echo setting up Build with your copy of Starship Troopers TC.
echo.
echo I encourage all potential mappers; all maps will be published on SST TC
echo Website, and the very best maps could enter our Top 10 list.
echo. 
echo Latest updates, add-ons, usermaps and Usermap Build Package can be found on
echo the SST website ( http://www.dukeworld.com/starshiptroopers ).
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo [KEY TO CONTINUE]
pause >nul

:setup
cls
echo =============================================================================
echo           STARSHIP TROOPERS TOTAL CONVERSION, BGAME PRODUCTIONS 2000.
echo =============================================================================
echo.
echo Would you like to re-run setup of Duke Nukem (mouse aiming recommended)?
choice /n [Y]ES [N]O:    
if errorlevel 2 goto launch
if errorlevel 1 goto runsetup

:runsetup
echo.
echo NOTE: Do not select "Save and launch Duke Nukem3D" option or the game will
echo fail to load properly. Exit the Setup program with [ESC].
echo Press any key to launch Setup.exe.
pause > nul
echo.
setup.exe
goto vgacheck
if exist sst.ini goto bmainmen

:launch
cls
echo INTERNAL SST STARTUP CONFIGURATION FILE. DO NOT DELETE. > sst.ini
echo =============================================================================
echo           STARSHIP TROOPERS TOTAL CONVERSION, BGAME PRODUCTIONS 2000.
echo =============================================================================
echo.
echo CONGRATULATIONS
echo ~~~~~~~~~~~~~~~
echo Starship Troopers TC Launcher will start now. Remember, to get more help   
echo consult the Help... Menu option, or visit the SST website.                  
echo.                                                                             
echo To run Duke Nukem 3D using switches (-map, /l##, /r), use the wanted switch 
echo with the SST_TC.BAT file exactly the same as you would use it with the      
echo normal Duke3D executable, and the Launcher will be overriden.               
echo.                                                                            
echo.                                                                            
echo.                                                                            
echo. 
echo.      
echo.                                                                    
echo.                                                                           
echo.                        
echo.
echo.
echo.
echo [KEY TO START]
pause > nul

:ok

:bmainmen
cls
echo ===============================================================================
echo           STARSHIP TROOPERS TOTAL CONVERSION, BGAME PRODUCTIONS 2000.
echo ===============================================================================
echo.
echo MAIN MENU
echo ~~~~~~~~~
echo.
echo 1. Play Single Player Starship Troopers TC
echo 2. BootCamp Drill Run
echo 3. Multiplayer Game over IPX, Serial or Modem
echo 4. Capture the Flag game over IPX, Serial or Modem
echo 5. Setup Starship Troopers TC
echo 6. Options...
echo 7. Help Files...
if exist sst320.ini echo 8. Change the TC resolution setting. Currently 320x200 or 320x400 (low res).
if not exist sst320.ini echo 8. Change the TC resolution setting. Currently 640x480 or 800x600 (high res).
echo. 
echo.
echo 9. EXIT
echo.
echo.
echo.
echo.
echo [CHOOSE AN OPTION]
choice /n /c:123456789
if errorlevel 9 goto exit
if errorlevel 8 goto vgacheck
if errorlevel 7 goto bhelp
if errorlevel 6 goto boptions
if errorlevel 5 goto bsetmain
if errorlevel 4 goto ctf
if errorlevel 3 goto mp
if errorlevel 2 goto bootcamp
if errorlevel 1 goto runduke

:bhelp
cls
echo ===============================================================================
echo           STARSHIP TROOPERS TOTAL CONVERSION, BGAME PRODUCTIONS 2000.
echo ===============================================================================
echo.
echo HELP FILES
echo ~~~~~~~~~~
echo.
echo 1. Starship Troopers TC Release Notes (README!.TXT)
echo 2. Starship Troopers TC HTML Manual (Windows only)
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo 9. RETURN TO MAIN
echo.
echo.
echo.
echo.
echo.
echo [CHOOSE AN OPTION]
choice /n /c:129
if errorlevel 3 goto bmainmen
if errorlevel 2 goto bhtml
if errorlevel 1 goto btxt

:bhtml
cls
start stmanual.html
goto bhelp


:btxt
cls
edit readme!.txt
goto bhelp


:boptions
cls
echo ===============================================================================
echo           STARSHIP TROOPERS TOTAL CONVERSION, BGAME PRODUCTIONS 2000.
echo ===============================================================================
echo.
echo LAUNCHER OPTIONS
echo ~~~~~~~~~~~~~~~~
echo.
echo 1. Uninstall Starship Troopers TC
if exist sst320.ini echo 2. Change the TC resolution setting. Currently 320x200 or 320x400 (low res).
if not exist sst320.ini echo 2. Change the TC resolution setting. Currently 640x480 or 800x600 (high res).
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo 9. RETURN TO MAIN
echo.
echo.
echo.
echo.
echo.
echo [CHOOSE AN OPTION]
choice /n /c:129
if errorlevel 3 goto bmainmen
if errorlevel 2 goto vgacheck
if errorlevel 1 goto uninst

:bsetmain
cls
goto runsetup

:ump
cls
echo.
echo It appears you have SST TC UserMap Package installed, and BUILD has crashed.
echo This means that the incorrect art files are in use for the game. This program
echo will now attempt to fix the problem.
echo.
echo  Hit a key to continue...
pause>nul
if not exist ump.bat goto noump else goto yesump

:yesump
call ump.bat /tcdetect
goto umpfix

:noump
echo.
echo Error, UMP.BAT not found. This probably means UMP was uninstalled incorrectly.
echo Proceeding with an alternate fix for this problem - reinstalling the original
echo SST TC files from SST_FULL.DAT.
echo.
echo  Hit a key to continue...
pause>nul
copy sst_full.dat sst_data.exe >nul
sst_data.exe
del sst_data.exe

:umpfix
cls
echo Problem fixed. Proceeding with the normal TC start...
echo.
echo  Hit a key to continue...
pause>nul
goto runduke

:nocfg
cls
echo.
echo DUKE3D.CFG not found. Launching Setup.exe.
echo.
echo NOTE: Do not select "Save and launch Duke Nukem3D" option or the game will
echo fail to load properly. Exit the Setup program with [ESC].
echo Press any key to start the setup program.
echo.
pause > nul
echo.
if not exist setup.exe goto nosetup 
setup.exe
goto vgacheck

:vgacall
cls
echo All OK. Launching Starship Troopers Total Conversion...
echo.
echo Bgame Productions 2000.
echo.
echo INTERNAL SST CONFIGURATION FILE. DO NOT MODIFY OR DELETE. > status.ini
duke3d.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
del status.ini
goto exit

:ctfcall
cls
echo All OK. Launching Starship Troopers Total Conversion...
echo.
echo Bgame Productions 2000.
echo.
echo INTERNAL SST CONFIGURATION FILE. DO NOT MODIFY OR DELETE. > status.ini
duke3d.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
del status.ini
goto exit
  
:runduke
if not exist duke3d.cfg goto nocfg
if exist sstbuild.tmp goto ump
cls
echo All OK. Launching Starship Troopers Total Conversion...
echo.
echo Bgame Productions 2000.
echo.
echo INTERNAL SST CONFIGURATION FILE. DO NOT MODIFY OR DELETE. > status.ini
if exist sst320.ini duke3d.exe /XVGA.CON %1 %2 %3 %4 %5 %6 %7 %8 %9
if not exist sst320.ini duke3d.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
del status.ini
goto exit

:bootcamp
duke3d.exe /xBOOT.CON /v1 /l1
goto exit

:nosetup
echo Could not find SETUP.EXE.

:exit
