Advertisement
Level design
Batch Compile Scripts
Currently the only way to do a complete map compile of BSP, VIS, Light, Surface sounds and Bots is with a batch script. The best way to start a batch script is to copy the command lines from q3map2toolz, after you've finished tweaking the settings, into a .bat file; then add the surface sounds between the light and bot compiles.
Note: The bot compile (aas) must be run after the surface sounds have been imported.
If you've already made a surface file (see this tutorial), then you only need to import the surface back into the map. I do this in three steps:
The /wait option tells the batch script to wait for that command to finish before executing the next line.
The /B option instructs the program being launched to not run in a new window.

If you've already made a surface file (see this tutorial), then you only need to import the surface back into the map. I do this in three steps:
1. | Set the drive to the drive with my mapping install. (G drive for me) You may not need this if everything is on the c: drive. | |
g: | ||
2. | Change to the map directory: | |
cd g:games\urbanterror\q3ut4\maps | ||
3. | Import the surfaces: | |
bsp -si %map%.bsp null_c22.surface |
Example Batch Script
full screen DOS code
@echo off
set map=null_c22
echo Compiling: %map%
start "BSP: %map%" /low /B /wait "G:\\Games\\utils\\Q3map2\\q3map2_fs_20g\\FS_q3map_Radbump_2a.exe" -meta -fs_basepath "G:\\Games\\UrbanTerror" -fs_game q3ut4 "G:\\Games\\UrbanTerror\\q3ut4\\maps\\%map%.map"
start "VIS: %map%" /low /B /wait "G:\\Games\\utils\\Q3map2\\q3map2_fs_20g\\FS_q3map_Radbump_2a.exe" -vis -saveprt -fs_basepath "G:\\Games\\UrbanTerror" -fs_game q3ut4 "G:\\Games\\UrbanTerror\\q3ut4\\maps\\%map%.bsp"
start "RAD: %map%" /low /B /wait "G:\\Games\\utils\\Q3map2\\q3map2_fs_20g\\FS_q3map_Radbump_2a.exe" -light -bounce 9 -fast -patchshadows -samples 2 -radbump -shade -fs_basepath "G:\\Games\\UrbanTerror" -fs_game q3ut4 "G:\\Games\\UrbanTerror\\q3ut4\\maps\\%map%.bsp"
g:
cd g:games\\urbanterror\\q3ut4\\maps
bsp -si %map%.bsp null_c22.surface
start "BSPC: Compiling %map%.aas" /low /B /wait "G:\\Games\\quake3\\Tools\\bspc.exe" -forcesidesvisible -optimize -bsp2aas "G:\\Games\\UrbanTerror\\q3ut4\\maps\\%map%.bsp"
The Start Command
The start command allows you to start a program with a custom cpu priority; here I start all the compiles on low priority, using the /low option.The /wait option tells the batch script to wait for that command to finish before executing the next line.
The /B option instructs the program being launched to not run in a new window.
Region Compiles
If you often do region compiles (File->Save Region) for quick tests of small areas and want to add the ability to switch between a full compile and region compile in your batch file, swap out the 'set map=xxxx' line for all this:full screen DOS code
set map1=ut4_mandolin
set map2=mando_region
ECHO.
ECHO 1. FULL Compile
ECHO 2. REGION Compile
ECHO.
set choice=
set /p choice=Choose a number:
if '%choice%'=='2' goto REGION
set map=%map1%
goto START
:REGION
set map=%map2%
:START
Complete Cascade Example
full screen DOS code
@echo off
set map1=ut4_cascade
set map2=casc_region
ECHO.
ECHO 1. FULL Compile
ECHO 2. REGION Compile
ECHO 3. EDIT Batch Script
ECHO.
set choice=
set /p choice=Choose a number:
if '%choice%'=='3' goto EDIT
if '%choice%'=='2' goto REGION
set map=%map1%
goto START
:REGION
set map=%map2%
goto START
:EDIT
start notepad "null_crate RADBUMP.bat"
goto ENDSCRIPT
:START
echo.
echo Compiling: %map%
echo.
time /T
echo STARTING BSP:
start "BSP: %map%" /low /B /wait "G:\\Games\\utils\\Q3map2\\q3map2_fs_20g\\q3map2_fs_20g.exe" -meta -fs_basepath "G:\\Games\\UrbanTerror" -fs_game q3ut4 "G:\\Games\\UrbanTerror\\q3ut4\\maps\\%map%.map" >> %map%_BSP.txt
time /T
echo STARTING VIS:
start "VIS: %map%" /low /B /wait "G:\\Games\\utils\\Q3map2\\q3map2_fs_20g\\q3map2_fs_20g.exe" -vis -saveprt -fs_basepath "G:\\Games\\UrbanTerror" -fs_game q3ut4 "G:\\Games\\UrbanTerror\\q3ut4\\maps\\%map%.bsp" >> %map%_VIS.txt
time /T
echo STARTING RAD:
start "RAD: %map%" /low /B /wait "G:\\Games\\utils\\Q3map2\\q3map2_fs_20g\\FS_q3map_Radbump_2a.exe" -light -bounce 9 -fast -patchshadows -samples 2 -radbump -shade -fs_basepath "G:\\Games\\UrbanTerror" -fs_game q3ut4 "G:\\Games\\UrbanTerror\\q3ut4\\maps\\%map%.bsp" >> %map%_RAD.txt
g:
cd games\\urbanterror\\q3ut4\\maps
bsp -si %map%.bsp null_c22.surface
echo start "BSPC: Compiling %map%.aas" /low /wait "G:\\Games\\quake3\\Tools\\bspc.exe" -forcesidesvisible -optimize -bsp2aas "G:\\Games\\UrbanTerror\\q3ut4\\maps\\%map%.bsp"
:ENDSCRIPT
By NulL - Sunday, 29 May 2011 - Last edit Wednesday, 08 June 2011 - viewed by 1554 members and 31001 visitors