Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Kagemaru_H

Batch File help?

Recommended Posts

I made a batch file for Chocolate Doom to be able to run Ultimate Doom, Doom II, and Final Doom, but it kept closing down when I tried to run it. I'm very inexperienced when it comes to batch files, so I'm sure someone could point out something missing here.

echo off
cls
ECHO Welcome to Chocolate doom. Select the game you would like to play.
ECHO.
ECHO.
ECHO 1=Doom II: Hell on Earth
ECHO 2=The Ultimate Doom
ECHO 3=Final Doom - TNT Evilution
ECHO 4=Final Doom - The Plutonia Experiment
ECHO 5=Quit
ECHO.
If ERRORLEVEL=5 GOTO WUSS
If ERRORLEVEL=4 GOTO PLUTONIA
IF ERRORLEVEL=3 GOTO TNT
IF ERRORLEVEL=2 GOTO DOOM
IF ERRORLEVEL=1 GOTO DOOM2
GOTO END
:DOOM2
chocolate-doom -iwad doom2.wad
:DOOM
chocolate-doom -iwad doom.wad
:TNT
chocolate-doom -iwad tnt.wad
:PLUTONIA
chocolate-doom -iwad plutonia.wad
:WUSS
ECHO Bye-bye!
exit

Share this post


Link to post

You are missing the CHOICE command - without it, errorlevel never gets set and therefore quits...

Insert "choice /C 12345" below "ECHO." and it should work.

Share this post


Link to post

Nevermind, I have this all figured out.

@echo off
cls
ECHO Welcome to Chocolate doom. Select the game you would like to play.
ECHO.
ECHO.
ECHO 1 = Doom II: Hell on Earth
ECHO 2 = The Ultimate Doom
ECHO 3 = Final Doom - TNT Evilution
ECHO 4 = Final Doom - The Plutonia Experiment
ECHO 5 = Setup
ECHO 6 = Quit
ECHO.

:choice
set /P C=[1,2,3,4,5,6]?
if "%C%"=="6" goto END
if "%C%"=="5" goto SETUP
if "%C%"=="4" goto PLUTONIA
if "%C%"=="3" goto TNT
if "%C%"=="2" goto DOOM
if "%C%"=="1" goto DOOM2
goto choice

:DOOM2
chocolate-doom -iwad doom2.wad
goto END

:DOOM
chocolate-doom -iwad doom.wad
goto END

:TNT
chocolate-doom -iwad tnt.wad
goto END

:PLUTONIA
chocolate-doom -iwad plutonia.wad
goto END

:SETUP
chocolate-setup

:END
exit
Chocolate Doom users, take my cue. This would make use of this port easier and less bulky than individualizing games into batches.

Also, I made a thread with an improved version of my Frontend batch (ability to load a PWAD of the user's choice for all games) in the Source Ports section, so mods, this thread can be done away with.

Share this post


Link to post

Ahh, batch files. I ought to spend a bit of time with those one day. I'm surprisingly ignorant of what you can use in a batch file. For this kind of thing I'd probably write a launcher with a GUI.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×