I’ve have seen many tutorials on how to make light in a dark room. But how do I get a dark room in the first place?
compile.bat
When you compile your map, make sure you use an option with the -light switch. If you haven’t added any light to your map, everything will be black.
My Radiant software crashed when compiled with -light. It works sometimes so I do now know how this works. 
Compiling maps within the editor requires memory. If you don’t have alot of memory then it will crash and cause problems. This could also point to other problems with your PC but generally its safer to compile the map out side of the editor with batch files. In the Level Designer Reference (LDR) supplied with the SD editor is a section with a sample batch file. In the index on the left hand side of the HTML LDR is “Sample Compile Batch File”. You will need to modify the batch file to point to all the correct file locations so its not a simple case of drag batch out of manual and it will work. But overall the batch file method is a more reliable method of compiling maps.
Sock
:moo:
Now it works.
I had to change sdmap2.exe to q3map2.exe and I was not able to use drag and drop. Sems much faster too.
@rem to use this batch file, run it from a dos window:
@rem > compile <mapname> without the .map extension
@set Q3MAP_PATH="C:\Program Files\GtkRadiant-ET-1.3\q3map2.exe"
@set ET_PATH="C:/Program Files/Wolfenstein - Enemy Territory"
@set MAP_PATH="C:/Program Files/Wolfenstein - Enemy Territory/etmain/maps/%1.map"
@set GEN_OPTIONS=-fs_basepath "C:/Program Files/Wolfenstein - Enemy Territory" -game et
@rem
%Q3MAP_PATH% -meta -mv 1024 -mi 6144 %GEN_OPTIONS% -v %MAP_PATH%
@rem
%Q3MAP_PATH% -vis -saveprt %GEN_OPTIONS% %MAP_PATH%
@rem
%Q3MAP_PATH% -light -fast -samples 2 -filter -patchshadows -external -lightmapsize 256 -approx 8 %GEN_OPTIONS% -v %MAP_PATH%
@pause
this is not drag and drop, but it could be extended to that, well I dont use drag&drop, since I only compile one map…
also after compiling it loads et
@rem to use this batch file, run it from a dos window:
@rem > compile <mapname> without the .map extension
@set TIMENOW=%time%
@set DATENOW=%date%
@set TARGET=tutorial01
@set Q3MAP_PATH="C:\Programme\GtkRadiant 1.5.0\q3map2.exe"
@set ET_PATH="C:\mappers\wolfet"
@set MAP_PATH="C:\mappers\wolfet\etmain\maps\%TARGET%.map"
@set GEN_OPTIONS=-fs_basepath "C:\mappers\wolfet" -game et
@rem
%Q3MAP_PATH% -meta -mv 1024 -mi 6144 %GEN_OPTIONS% -v %MAP_PATH%
@rem
%Q3MAP_PATH% -vis -saveprt %GEN_OPTIONS% %MAP_PATH%
@rem
%Q3MAP_PATH% -light -super 2 -external -lightmapsize 256 %GEN_OPTIONS% -v %MAP_PATH%
@echo.
@echo Compiling started at: %DATENOW% %TIMENOW%
@echo finished at: %date% %time%
@echo.
@echo Close the window to exit, or press any key to start et...
@pause >nul
@set ETSWITCHES=+set r_mode 4 +set r_fullscreen 0 +set g_gametype 2 +set sv_pure 0
start "" /D%ET_PATH% %ET_PATH%\et.exe %ETSWITCHES% +devmap %TARGET%
@echo press any key to close this window..
@pause >nul
I found this compile.bat one day while searching. This is the last .bat you will ever create:
Author: Dany “MadJack” Rioux (thankyou)
From the start you only need to edit your path to ET.exe and q3map2.exe.
This has been faultless, and asks what to do every time. Do you want -meta(yes) choose your light options…(done). Do you want -vis? Would you like to output the data to .txt files to scrutanize?(hells yea!)
Drag and drop, choose your options on the fly.
You’ll never need another .bat, ever.
ECHO off
REM ------------------------------------------------------------------
REM ---- Author: Dany "MadJack" Rioux (danyrioux at vfemail.net)
REM ---- Date: April 14th 2004
REM ---- Subject: Automation to compile .map files (ET only!) asking
REM ---- questions etc... Try it! :D
REM ----
REM ---- Please if you modify it tell me so I can update the
REM ---- one I have locally.
REM ----
REM ---- Happy mapping!
REM ----
REM ---- Don't forget: You don't know what you have until you lose it.
REM ------------------------------------------------------------------
cls
REM ------------------------------------------------------------------
REM ---- Edit the first TWO lines to reflect your installation!!!
REM ------------------------------------------------------------------
set ET_PATH="C:/Program Files/Wolfenstein - Enemy Territory/"
set Q3MAP_PATH="C:/Program Files/Wolfenstein - Enemy Territory/etmain/maps/q3map_2.5.16/q3map2.exe"
REM ------------------------------------------------------------------
REM ---- Leave the rest alone if you are not sure of what you are doing
REM ------------------------------------------------------------------
set MAP="%~dp1%~nx1"
set GEN_OPTIONS=-fs_basepath %ET_PATH% -game et
REM ------------------------------------------------------------------
REM ---- Setting the vars up -----------------------------------------
REM ------------------------------------------------------------------
set light1=-light -fast -filter -thresh .5 -super 2
set light2=-light -fast -samples 2 -filter
set light3=-light -fast -lomem -external -lightmapsize 256
set light4=-light -fast -filter -samples 2 -bounce 8
set light5=-light -fast -filter -samples 2 -bounce 8 -patchshadows
set light6=-light -fast -lomem -samples 6 -external -lightmapsize 512
set light7=-light -sunonly
set BSP1=-meta
set BSP2=-debugportals -debugsurfaces
set BSP3=-meta -patchmeta
set vis1=-vis -saveprt
set vis2=-vis -fast -saveprt
set empty=
set LogFileName=empty
REM ------------------------------------------------------------------
REM ---- Getting inputs for BSP --------------------------------------
REM ------------------------------------------------------------------
:BSP_compile
cls
ECHO.
ECHO Please choose the number reflecting the BSP compile you want.
ECHO.
ECHO 1 %BSP1%
ECHO 2 %BSP2%
ECHO 3 %BSP3%
ECHO 4 No BSP compile.
ECHO.
set /p BSP_input=
if %BSP_input% LSS 5 (
goto gotBSP )
ELSE (
goto BSP_compile
)
REM ------------------------------------------------------------------
REM ---- Getting inputs for light compile ----------------------------
REM ------------------------------------------------------------------
:light_compile
cls
ECHO.
ECHO Please choose the number reflecting the LIGHT compile you want.
ECHO.
ECHO 1 %light1%
ECHO 2 %light2%
ECHO 3 %light3%
ECHO 4 %light4%
ECHO 5 %light5%
ECHO 6 %light6%
ECHO 7 %light7%
ECHO 8 No LIGHT compile.
ECHO.
set /p LIGHT_input=
if %LIGHT_input% LSS 9 (
goto gotlight )
ELSE (
goto light_compile
)
REM ------------------------------------------------------------------
REM ---- Getting inputs for vis --------------------------------------
REM ------------------------------------------------------------------
:vis_compile
cls
ECHO.
ECHO Please choose the number reflecting the VIS compile you want.
ECHO.
echo 1 %vis1%
echo 2 %vis2%
Echo 3 No VIS compile.
Echo.
set /p VIS_input=
if %VIS_input% LSS 4 (
goto gotvis )
ELSE (
goto vis_compile
)
REM ------------------------------------------------------------------
REM ---- Getting inputs for Logging ----------------------------------
REM ------------------------------------------------------------------
:logging
cls
echo.
echo Do you want to log the output to files?
Echo.
echo 1 Yes
echo 2 No
echo.
set /p Logging_input=
if %Logging_input% LSS 3 (
goto gotlogging )
ELSE (
goto logging
)
REM ---------------------------------------------------------------------
REM ---- Routines to handle the user inputs -----------------------------
REM ---------------------------------------------------------------------
:gotBSP
if %BSP_input% EQU 4 set BSP=None
if %BSP_input% EQU 3 set BSP=%BSP3%
if %BSP_input% EQU 2 set BSP=%BSP2%
if %BSP_input% EQU 1 set BSP=%BSP1%
goto light_compile
:gotlight
if %LIGHT_input% EQU 8 set Light=None
if %LIGHT_input% EQU 7 set Light=%light7%
if %LIGHT_input% EQU 6 set Light=%light6%
if %LIGHT_input% EQU 5 set Light=%light5%
if %LIGHT_input% EQU 4 set Light=%light4%
if %LIGHT_input% EQU 3 set Light=%light3%
if %LIGHT_input% EQU 2 set Light=%light2%
if %LIGHT_input% EQU 1 set Light=%light1%
goto vis_compile
:gotvis
if %VIS_input% EQU 3 set VIS=None
if %VIS_input% EQU 2 set VIS=%vis2%
if %VIS_input% EQU 1 set VIS=%vis1%
goto logging
:gotlogging
if %Logging_input% EQU 1 (
set LogFileName=compiled.txt
Echo Log files will be called
Echo.
Echo BSP_compiled.txt
Echo VIS_compiled.txt
Echo and LIGHT_compiled.txt
Echo.
Echo They will be placed in: "%~dp1"
Echo.
Echo Starting compiling process...
Echo.
)
REM ---------------------------------------------------------------------
REM ---- Compiling with the options given -------------------------------
REM ---------------------------------------------------------------------
:runcompile
if %BSP_input% EQU 4 goto runcompilevis
if %LogFileName%==empty %Q3MAP_PATH% %BSP% %GEN_OPTIONS% -v %MAP%
if not %LogFileName%==empty (
echo.
echo Running BSP...
%Q3MAP_PATH% %BSP% %GEN_OPTIONS% -v %MAP% >"%~dp1BSP_compiled.txt"
)
:runcompilevis
if %VIS_input% EQU 3 goto runcompilelight
if %LogFileName%==empty %Q3MAP_PATH% %VIS% %GEN_OPTIONS% -v %MAP%
if not %LogFileName%==empty (
echo.
Echo Running VIS...
%Q3MAP_PATH% %VIS% %GEN_OPTIONS% -v %MAP% >"%~dp1VIS_compiled.txt"
)
:runcompilelight
if %LIGHT_input% EQU 8 goto end (
if %LogFileName%==empty %Q3MAP_PATH% %LIGHT% %GEN_OPTIONS% -v %MAP%
if not %LogFileName%==empty (
echo.
Echo Running LIGHT...
%Q3MAP_PATH% %LIGHT% %GEN_OPTIONS% -v %MAP% >"%~dp1LIGHT_compiled.txt"
)
:end
REM ---------------------------------------------------------------------
REM ---- That's it! We're done. Leave here. -----------------------------
REM ---------------------------------------------------------------------
Echo.
Echo Done! :D
Echo.
if %Logging_input% EQU 2 (
pause
goto TheEnd
)
Echo.
Echo If you want to open those Logs hit 1 and ENTER.
Echo.
Echo Any other key will close that window.
set /p OpenTxtFiles=
if %OpenTxtFiles% EQU 1 (
"%~dp1BSP_compiled.txt"
"%~dp1VIS_compiled.txt"
"%~dp1light_compiled.txt"
)
:TheEnd
You will love this.
If you want/need to alter any setting, change it in these sections:
set light1=-light -fast -filter -thresh .5 -super 2
set light2=-light -fast -samples 2 -filter
set light3=-light -fast -lomem -external -lightmapsize 256
set light4=-light -fast -filter -samples 2 -bounce 8
set light5=-light -fast -filter -samples 2 -bounce 8 -patchshadows
set light6=-light -fast -lomem -samples 6 -external -lightmapsize 512
set light7=-light -sunonly
set BSP1=-meta
set BSP2=-debugportals -debugsurfaces
set BSP3=-meta -patchmeta
set vis1=-vis -saveprt
set vis2=-vis -fast -saveprt
[EDIT]AWW FAWKK!! Dam, I didn’t realise ailman necro’d this post from '03… oh well, this .bat will be the last you’ll ever need.
D’OH!!! :cyclops:
well, at least necroposting means they’re using search for a change :shock: :shock: