What is "Play Deathball.cmd" All About
Moderators: Jay2k1, DavidM, The_One
What is "Play Deathball.cmd" All About
Just curiosu but why does deathball use a *.cmd file to startup and then does some kind of online check. What is it checking for exactly and why the need for a *.cmd?
Thanks.
Thanks.
Well, for those of us with windows 98, the CMD file won't work.
Following is the PlayDeathball.bat file, which does everything the CMD does.
The BAT will be in all future deathball versions.
Note how useful it is (verifies install, sets up UCL file, updates, launches deathball correctly):
Following is the PlayDeathball.bat file, which does everything the CMD does.
The BAT will be in all future deathball versions.
Note how useful it is (verifies install, sets up UCL file, updates, launches deathball correctly):
Code: Select all
@echo off
@echo ===----------------------------------------------
@echo === Deathball Launcher
@echo ===----------------------------------------------
@echo === Environment Check ===
if exist ..\Deathball\PlayDeathball.bat goto Defcheck
echo 'PlayDeathball.bat' is missing from your UT2004\Deathball Deathball folder. Please reinstall Deathball.
pause
goto end
:Defcheck
IF EXIST ..\System\Default.ini goto DBUCheck
echo 'UT2004\System\Default.ini' is missing! Please reinstall UT2004!
pause
goto end
:DBUCheck
IF EXIST System\Deathball.u goto DBAICheck
echo 'Deathball.u' Package missing! Please reinstall Deathball.
pause
goto end
:DBAICheck
IF EXIST System\DeathballAI.u goto DBRCCheck
echo 'DeathballAI.u' Package missing! Please reinstall Deathball.
pause
goto end
:DBRCCheck
IF EXIST System\Deathball_rc.u goto EntryCheck
echo 'Deathball_rc.u' Package missing! Please reinstall Deathball.
pause
goto end
:EntryCheck
IF EXIST Maps\Entry.ut2 goto UCLProcess
echo 'Deathball\Maps\Entry.ut2' missing. Using UT2k4 default Entry map.
copy ..\Maps\Entry.ut2 Maps\Entry.ut2 > NUL
:UCLProcess
IF EXIST System\Deathball.ucl goto AutoUpdate
echo === Exporting Deathball.ucl ===
..\System\ucc exportcache -Mod=Deathball -v Deathball.u Deathball_rc.u DeathballAI.u Deathball.ucl
IF NOT errorlevel 1 goto UCLPostCheck
echo ERROR! Unable to run UCC.
pause
goto end
:UCLPostCheck
IF EXIST System\Deathball.ucl goto AutoUpdate
echo ERROR! Unable to export Deathball.ucl!
pause
goto end
:AutoUpdate
AutoUpdate.exe /S /D=%CD%
@echo === Starting Deathball ===
@REM Use START always when possible!
IF NOT "%OS%" == "Windows_NT" goto LNormal
REM START /B ..\System\ut2004.exe -Mod=Deathball
START /B c:\windows\notepad.exe
IF errorlevel 1 goto LNormal
exit
goto end
:LNormal
..\System\ut2004.exe -Mod=Deathball
:end