here is a batch file that I did some time ago, you can see how the
functionality is done pretty easily.
%1 %2 %3 are all the command line options passed through to the batch
file.
choice /c:1234 Choose one:
if errorlevel 4 goto end
if errorlevel 3 goto nummaps
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this stuff gives you ability to do a menu,
you have to do it 4, 3 ,2,1 in that order 🙂 I think 🙂
Then when you do goto, you put in a label, like goto end goes to :end, etc.
@echo off
if "%1"=="/?" goto help
if "%1"=="?" goto help
if "%1"=="-?" goto help
if "%1"=="/s" goto comsetup
if "%1"=="/d" goto comduke
if "%1"=="/n" goto nummaps
if "%1"=="/r" goto resmaps
if "%1"=="/nifty" goto menu
goto runduke
:menu
cls
echo Welcome to the Wild World of MoMaps!
echo.
echo 1. Run Duke3d using Momap's modified con file
echo 2. Run Setup (and from there multiplayer, m2m) using Momap's con file
echo 3. Copy maps to e1l1.map through e3l11.map
echo 4. Exit
echo.
echo - After duke3d has started, select episode 1, 2 or 3 to run Momaps
echo.
echo - This file will NOT modify any con files. It runs setup or
echo duke3d with the command line "/xmosimple.con"
echo.
echo - All command line parameters are passed through to setup
echo or duke3d. So you can type "mm /s3" to get to a higher skill level.
echo.
echo - Option #3 will copy all the map files to files of the form e1lx.map,
echo e2lx.map & e3lx.map. So you can run all the MoMaps without using ANY
echo con file change (or use your own con file mod) if you want to.
echo.
echo - To run MoMaps in a case where you can't run duke3d through setup,
echo (like if you are using a service like TEN), run mm2.bat. Read
echo momaps.txt first for more info.
echo.
choice /c:1234 Choose one:
if errorlevel 4 goto end
if errorlevel 3 goto nummaps
if errorlevel 2 goto runsetup
if errorlevel 1 goto runduke
goto end
:help
echo.
echo Usage: mm (options)
echo.
echo Options:
echo -------
echo /? = This menu
echo /s = Run setup with modified con file
echo /d = Run duke with modified con file
echo /n = Copy maps to files e1lx.map, e2lx.map and e3lx.map
echo /r = Restore backed up e2(3)(1)lx.maps and delete written
echo e2(3)(1)lx.maps
echo /nifty = Gives you a nifty menu with the above options
echo.
echo.
echo - "/d" is assumed when no other parameters are specified.
echo.
echo - All parameters are passed through to duke3d or setup
echo.
echo Example: "mm /v1 /l1 /s1" starts you at e1l1 at skill 1
echo.
echo - You can start modem and network games from setup using
echo "mm /s" and then the MoMaps maps will play when duke3d
echo starts.
echo.
goto end
:comsetup
shift
goto runsetup
goto end
:comduke
shift
goto runduke
goto end
:nummaps
call mm2 /nmaps
goto end
:resmaps
call mm2 /r
goto end
:runduke
echo.
echo MoMaps v1.01 for Duke3d v1.3d
call mm2 /v /q
duke3d /xmosimple.con %1 %2 %3 %4 %5 %6 %7 %8 %9
goto end
:runsetup
echo.
echo MoMaps v1.01 for Duke3d v1.3d
call mm2 /v
pause
setup /xmosimple.con %1 %2 %3 %4 %5 %6 %7 %8 %9
goto end
:runmm2
echo.
echo You can run this seperately at any time by typing "mm2"
echo.
pause
mm2
goto end
:end