Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ECHO OFF
- REM If you're reading this online, usage is simple.
- REM 1) Create a new file in notepad.
- REM 2) Paste everything here, from the "@ECHO OFF" to the last "EXIT". All of it.
- REM 3) Change any variables below as required.
- REM 4) Click "Save As"
- REM 5) Change the "Save As Type" dropdown to all files
- REM 6) Save as "MOHARC.bat"
- REM 7) When you need it, run it! Just type in the filename (including the .map extension) of your map file, and away you go!
- REM Note: You will still need to manually move yourmapname.bsp from the MoHAAMap directory below into MoHAA\main\Maps.
- REM I didn't automate this, just in case you realise there's been a problem...
- REM ALSO you may need to run this as an administrator for it to actively write the BSP, or it will just look like it did it and not do it.
- REM [Set the below to your Medal of Honor Allied Assault directory.]
- SET "MoHAADir=c:\Program Files (x86)\EA Games\MOHAA"
- REM [Set the below to your MoHRadiant Directory.]
- SET "MoHAARadiant=c:\Program Files (x86)\MOHAATools"
- REM [Set the below to the location where you save your MoHRadiant maps to.]
- SET "MoHAAMap=c:\Program Files (x86)\EA Games\MOHAA\maps"
- ECHO ---------------------------
- ECHO - -
- ECHO - MoHAA Automated Radiant -
- ECHO - Converter -
- ECHO - -
- ECHO ---------------------------
- ECHO - -
- ECHO - Written by Wigifer -
- ECHO - -
- ECHO ---------------------------
- ECHO.
- ECHO.
- ECHO This batch file will automate the map making process.
- ECHO Note that this file assumes your default directories are as follows:
- ECHO - Medal of Honor Allied Assault: %MoHAADir%
- ECHO - MoHRadiant: %MoHAARadiant%
- ECHO - Your MoHRadiant Saved Map Directory: %MoHAAMap%
- ECHO.
- ECHO If you need to change these settings, please edit this batch file directly.
- ECHO The variables can be found at the top of this batch file.
- ECHO.
- ECHO Checking for MoHRadiant tools...
- IF NOT EXIST "%MoHAARadiant%\q3map.exe" GOTO MissingQ3map
- IF NOT EXIST "%MoHAARadiant%\MOHlight.exe" GOTO MissingMOHLight
- ECHO MoHRadiant Tools found!
- ECHO.
- :SelectMap
- SET /P "MapName=What is the name of the map file you wish to convert? "
- ECHO.
- ECHO Checking for "%MoHAAMap%\%MapName%"...
- IF NOT EXIST "%MoHAAMap%\%MapName%" GOTO DoNotConvert
- GOTO Convert
- :Convert
- ECHO File found! Running tools...
- ECHO.
- ECHO [RUNNING Q3MAP BSP]
- CD "%MoHAARadiant%"
- q3map.exe -gamedir "%MoHAADir%" "%MoHAAMap%\%MapName%"
- ECHO.
- ECHO [RUNNING Q3MAP VIS]
- q3map.exe -vis -gamedir "%MoHAADir%" "%MoHAAMap%\%MapName%"
- ECHO.
- ECHO [RUNNING MOHLIGHT VIS]
- mohlight.exe -gamedir "%MoHAADir%" "%MoHAAMap%\%MapName%"
- ECHO.
- ECHO.
- ECHO [PROCESSES COMPLETE]
- ECHO.
- ECHO Thank you for using this conversion tool! Good luck in your map making!
- ECHO - Wigifer
- ECHO.
- ECHO Exiting application...
- PAUSE
- EXIT
- :DoNotConvert
- ECHO [ERROR] Sorry, but %MoHAAMap%\%MapName% was not found.
- CHOICE /M "Do you want to input the file name again?"
- IF ERRORLEVEL 2 GOTO NoConvertQuit
- IF ERRORLEVEL 1 GOTO SelectMap
- :NoConvertQuit
- ECHO Exiting application.
- PAUSE
- EXIT
- :MissingQ3map
- IF NOT EXIST "%MoHAARadiant%\MOHlight.exe" GOTO MissingBoth
- ECHO [ERROR] You appear to be missing Q3Map.exe from %MoHAARadiant%.
- ECHO Please reinstall your map tools before using this batch file again.
- PAUSE
- EXIT
- :MissingMOHLight
- ECHO [ERROR] You appear to be missing MOHlight.exe from %MoHAARadiant%.
- ECHO Please reinstall your map tools before using this batch file again.
- PAUSE
- EXIT
- :MissingBoth
- ECHO [ERROR] You do not appear to have your tools installed in %MoHAARadiant%.
- ECHO Please edit this batch file with the correct path before continuing...
- PAUSE
- EXIT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement