why isn't my .bat file not working


(pigg221462) #1

this is my .bat file

@rem to use this batch file, drop a .map file on it or run it from a dos window:
@rem > compile <mapname>

@rem change the paths below to reflect your ET installation.
@set ET_PATH=“C:\Program Files\Wolfenstein - Enemy Territory” @set COMP_PATH=“C:\Program Files\Wolfenstein - Enemy Territory\etmain\maps\q3map\q3map2.exe”
@set MAP_PATH=“C:\Program Files\Wolfenstein - Enemy Territory\etmain\maps\lori.map”

@set GEN_OPTIONS=-fs_basepath %ET_PATH% -game et

%COMP_PATH% -meta -mv 1024 -mi 6144 %GEN_OPTIONS% -v %MAP_PATH%
%COMP_PATH% -vis -saveprt %GEN_OPTIONS% %MAP_PATH%
%COMP_PATH% -light -samples 2 -filter -patchshadows -external -lightmapsize 256 -approx 8 %GEN_OPTIONS% -v %MAP_PATH%

It does nothing but flash on the screen one way to fast to see what it is telling me
the only reason i’m doing this is because my radiant 1.4 uses .11 q3map2 and i got the .16 new one and want to try it out is there a way to upgrade my .11 q3map2 in my radient to this new one


(nUllSkillZ) #2

Try to use slashes “/” instead of back-slashes “”.


(pigg221462) #3

i tried that it did nothing still can’t figure this out it’s got to be something easy


(nUllSkillZ) #4

Where is your q3map2.exe located?
May be this path isn’t correct.


(SCDS_reyalP) #5

run your batch file from the command prompt, so you can see what output it gives.

As an aside, if you want to use the new q3map2 from the menu, you should be able to just replace your old q3map2.exe (the one that came with radiant) with the new one. There have been cases where the two required different .dll files, but AFAIK the most recent q3map2 works fine with 1.4.


(Q.) #6

Vis phase does not look into *.map though I’m not quite sure whether q3map2 automatically interprets or not.


(nUllSkillZ) #7

One of ydnar’s batch files that I’ve changed to match my pathes.
It’s located in the maps directory.
Just drag a mapfile and drop it on this batch in the Windows explorer (note: ET.exe is located in c : \programme\Wolfenstein - Enemy Territory\mapping):


@echo off

rem edit to taste for each compile.
rem note: -v (verbose) is preset in general options, and is applied globally.
set LIGHT_VAR=-light -fast -samples 2
set VIS_VAR=-vis
set BSP_VAR=-meta

rem edit this if you change your mod. this is the name of your mod’s subdirectory.
rem q3f2 for q3f 2.0 (beta), wfa for Weapons Factory Arena, q3ut2 for Urban Terror…
set MOD_DIR=etmain

rem edit once. note the use of / slashes, and the lack of a trailing / at the end of the path.
rem c:/progra~1/quakei~1 = “c:/program files/quake iii arena�
set QUAKE_PATH="c:/Programme/Wolfenstein - Enemy Territory/mapping"
set Q3MAP_PATH="c:/q3map_2.5.16_win32_x86/q3map2.exe"

rem these are general options that will be applied to all 3 command lines. you don’t need to touch.
set GEN_OPTIONS=-fs_basepath %QUAKE_PATH% -fs_game %MOD_DIR% -v -game et

rem this is the “program�. don’t touch.
set MAP_PATH=%1
%Q3MAP_PATH% %BSP_VAR% %GEN_OPTIONS% %MAP_PATH%
%Q3MAP_PATH% %VIS_VAR% %GEN_OPTIONS% %MAP_PATH%
%Q3MAP_PATH% %LIGHT_VAR% %GEN_OPTIONS% %MAP_PATH%

pause

rem there are other options, but pause is here so you can examine the output. Press any key to continue . . .


(obsidian) #8

You can output to a log file by adding:

>“path o\mylog.log”

My batch file:

@echo off
@echo Q3Map2 Batch Compiler 3.1 - 10.05.04
@echo Obsidian
@echo.

set MAPNAME=layout01
set BSPPARM=-meta -patchmeta 8
set VISPARM=-vis -fast -saveprt
set RADPARM=-light -fast -patchshadows -samples 2 -bounce 1 -dirty -gamma 2 -compensate 4 -nocollapse
set AASPARM=-forcesidesvisible -optimize
set GENPARM=-v

@echo -----------------------------------------------------------
@echo MAP: %MAPNAME%
@echo BSP: %BSPPARM%
@echo VIS: %VISPARM%
@echo RAD: %RADPARM%
@echo AAS: %AASPARM%
@echo -----------------------------------------------------------
@echo.
@echo Ready to run Q3Map2 . . .
PAUSE

set FS_GAME=purity
set GAMEDIR=C:\Games\Quake III Arena
set LOGDUMP=%GAMEDIR%\%FS_GAME%\batch compilers\logdump
set Q3MAP2=C:\Program Files\GtkRadiant\Compilers\Q3Map2\q3map2.exe
set BSPC=C:\Program Files\GtkRadiant\Compilers\BSPC\bspc.exe


@echo.

@echo Compiling BSP . . .
"%Q3MAP2%" %BSPPARM% %GENPARM% -fs_game %FS_GAME% "%GAMEDIR%\%FS_GAME%\maps\%MAPNAME%.map" >"%LOGDUMP%\1bsp.log"

@echo Compiling VIS . . .
"%Q3MAP2%" %VISPARM% %GENPARM% -fs_game %FS_GAME% "%GAMEDIR%\%FS_GAME%\maps\%MAPNAME%.map" >"%LOGDUMP%\2vis.log"

@echo Compiling LIGHT . . .
"%Q3MAP2%" %RADPARM% %GENPARM% -fs_game %FS_GAME% "%GAMEDIR%\%FS_GAME%\maps\%MAPNAME%.map" >"%LOGDUMP%\3rad.log"

@echo Q3Map2 compile complete
@echo.

@echo Ready to run BSPC . . .
PAUSE

@echo.

@echo Compiling AAS . . .
del "%LOGDUMP%\4aas.log"
"%BSPC%" -bsp2aas "%GAMEDIR%\%FS_GAME%\maps\%MAPNAME%.bsp" %AASPARM% >>"%LOGDUMP%"\4aas.log"
del bspc.log

@echo BSPC compile complete
@echo.

@echo Finished
PAUSE

BTW, if writing batch files aren’t your specialty, Q3Map2Toolz will do the job for you. Nice Q3Map2 frontend:
http://hro.planetquake.gamespy.com/webs/q3map2toolz.htm