02-05-2005, 04:43 PM | #1 | |||
Join Date: Dec 2004
Posts Rated Helpful 0 Times
|
Tutorial: Compiling Using Batch Files
BATCH FILES
Instead of using the Hammer built in compiler it is possible to compile using a batch file. Make a new txt file and put in the text as explained below, then save the file as "compile.bat". Now when you double click on the batch file it will compile. You dont need Hammer open to compile this way, freeing up resources on your computer. Quote:
Quote:
vbsp Code:
usage : vbsp [options...] mapfile example: vbsp -onlyents c:\hl2\hl2\maps\test -v (or -verbose): Turn on verbose output (also shows more command line options). -onlyents : This option causes vbsp only import the entities from the .vmf file. -onlyents won't reimport brush models. -onlyprops : Only update the static props and detail props. -glview : Writes .gl files in the current directory that can be viewed with glview.exe. If you use -tmpout, it will write the files into the \tmp folder. -nodetail : Get rid of all detail geometry. The geometry left over is what affects visibility. -nowater : Get rid of water brushes. -low : Run as an idle-priority process. -linuxdata : Force it to write physics data for linux multiplayer servers. It will automatically write this data if it finds certain entities like info_player_terrorist, info_player_deathmatch, info_player_teamspawn, info_player_axis, or info_player_coop. -vproject <directory> : Override the VPROJECT environment variable. -game <directory> : Same as -vproject. Other options (VERBOSE) : -novconfig : Don't bring up graphical UI on vproject errors. -threads : Control the number of threads vbsp uses (defaults to the # of processors on your machine). -verboseentities: If -v is on, this disables verbose output for submodels. -noweld : Don't join face vertices together. -nocsg : Don't chop out intersecting brush areas. -noshare : Emit unique face edges instead of sharing them. -notjunc : Don't fixup t-junctions. -noopt : By default, vbsp removes the 'outer shell' of the map, which are all the faces you can't see because you can never get outside the map. -noopt disables this behaviour. -noprune : Don't prune neighboring solid nodes. -nomerge : Don't merge together chopped faces on nodes. -nomergewater: Don't merge together chopped faces on water. -nosubdiv : Don't subdivide faces for lightmapping. -micro <#> : vbsp will warn when brushes are output with a volume less than this number (default: 1.0). -fulldetail : Mark all detail geometry as normal geometry (so all detail geometry will affect visibility). -leaktest : Stop processing the map if a leak is detected. Whether or not this flag is set, a leak file will be written out at <vmf filename>.lin, and it can be imported into Hammer. -nolinuxdata : Force it to not write physics data for linux multiplayer servers, even if there are multiplayer entities in the map. -bumpall : Force all surfaces to be bump mapped. -snapaxial : Snap axial planes to integer coordinates. -block # # : Control the grid size mins that vbsp chops the level on. -blocks # # # # : Enter the mins and maxs for the grid size vbsp uses. -dumpstaticprops: Dump static props to staticprop*.txt -dumpcollide : Write files with collision info. -luxelscale # : Scale all lightmaps by this amount (default: 1.0). -lightifmissing : Force lightmaps to be generated for all surfaces even if they don't need lightmaps. -keepstalezip : Keep the BSP's zip files intact but regenerate everything else. Code:
usage : vvis [options...] bspfile example: vvis -fast c:\hl2\hl2\maps\test Common options: -v (or -verbose): Turn on verbose output (also shows more command -fast : Only do first quick pass on vis calculations. -mpi : Use VMPI to distribute computations. -low : Run as an idle-priority process. env_fog_controller specifies one. -vproject <directory> : Override the VPROJECT environment variable. -game <directory> : Same as -vproject. Other options (VERBOSE): -novconfig : Don't bring up graphical UI on vproject errors. -radius_override: Force a vis radius, regardless of whether an -mpi_pw <pw> : Use a password to choose a specific set of VMPI workers. -threads : Control the number of threads vbsp uses (defaults to the # or processors on your machine). -nosort : Don't sort portals (sorting is an optimization). -tmpin : Make portals come from \tmp\<mapname>. -tmpout : Make portals come from \tmp\<mapname>. Code:
usage : vrad [options...] bspfile example: vrad c:\hl2\hl2\maps\test Common options: -v (or -verbose): Turn on verbose output (also shows more command -bounce # : Set max number of bounces (default: 100). -fast : Quick and dirty lighting. -low : Run as an idle-priority process. -mpi : Use VMPI to distribute computations. -rederror : Show errors in red. -vproject <directory> : Override the VPROJECT environment variable. -game <directory> : Same as -vproject. Other options (VERBOSE): -novconfig : Don't bring up graphical UI on vproject errors. -dump : Write debugging .txt files. -dumpnormals : Write normals to debug files. -threads : Control the number of threads vbsp uses (defaults to the # or processors on your machine). -lights <file> : Load a lights file in addition to lights.rad and the level lights file. -noextra : Disable supersampling. -debugextra : Places debugging data in lightmaps to visualize supersampling. -smooth # : Set the threshold for smoothing groups, in degrees (default 45). -dlightmap : Force direct lighting into different lightmap than radiosity. -stoponexit : Wait for a keypress on exit. -mpi_pw <pw> : Use a password to choose a specific set of VMPI workers. -nodetaillight : Don't light detail props. -centersamples : Move sample centers. -luxeldensity # : Rescale all luxels by the specified amount (default: 1.0). The number specified must be less than 1.0 or it will be ignored. -loghash : Log the sample hash table to samplehash.txt. -onlydetail : Only light detail props and per-leaf lighting. -maxdispsamplesize #: Set max displacement sample size (default: 512). Example: Quote:
It's also helpful to make variables for the paremeters, and paths, as it makes it easier should a situation present itself where you're having to change things. Such as: Code:
set MAP_NAME=the_name_of_your_map set VMF_PATH=\directory_for_vmf set BSP_PATH=*Steam Account*\half-life 2 deathmatch\hl2mp\maps set TOOLS_PATH=*Steam Account*\sourcesdk\bin set MOD_PATH=*Steam Account*\half-life 2 deathmatch\hl2mp set BSP_PARAMS=-yourparameters set VIS_PARAMS=-yourparameters set RAD_PARAMS=-yourparameters set SHARED_PARAMS=-yourparameters "%TOOLS_PATH%\vbsp.exe" -game "%MOD_PATH%" %SHARED_PARAMS% %BSP_PARAMS% "%VMF_PATH%\%MAP_NAME%" "%TOOLS_PATH%\vvis.exe" -game "%MOD_PATH%" %SHARED_PARAMS% %VIS_PARAMS% "%VMF_PATH%\%MAP_NAME%" "%TOOLS_PATH%\vrad.exe" -game "%MOD_PATH%" %SHARED_PARAMS% %RAD_PARAMS% "%VMF_PATH%\%MAP_NAME%" COPY "%VMF_PATH%\%MAP_NAME%.bsp" "%BSP_PATH%\%MAP_NAME%.bsp" |
|||
|
02-05-2005, 05:59 PM | #2 |
Join Date: Jan 2005
Location: Sheerness, Isle Of Sheppey Kent, England, UK.
Posts Rated Helpful 0 Times
|
Nice to see you ripping off a VERC tutorial
|
|
02-05-2005, 06:43 PM | #3 |
Retired FF Staff
Join Date: Dec 2004
Location: Scotland
Posts Rated Helpful 0 Times
|
Nice to see you're wrong. I wrote pretty much all of that (except the variables bit, which was written by either Jon or Jesse.. and I got the batch file from someone on Mapcore and modified it as it didn't work properly) and I can honestly say I've not looked at VERC other than for the SDK FAQ. Also these tutorials were written primarily for the dev team and haven't been altered for public consumption.
|
|
02-10-2005, 08:20 PM | #4 |
Join Date: Jan 2005
Posts Rated Helpful 0 Times
|
Cool Thanks. I've been wanting to set up a bat file.. Can't stand using Hammer to compile.
You may also want to add a command to the end that will copy the bsp into the maps folder of the game you will test it on. Something like.. Code:
Copy "E:\steam\steamApps\your@email.com\sourcesdk_content\hl2mp\mapsrc\latest.bsp" "e:\steam\steamapps\your@email.com\half-life 2 deathmatch\hl2mp\maps\latest.bsp" |
|
02-11-2005, 02:22 AM | #5 |
Fortress Forever Staff
Join Date: Jan 2005
Location: Texas
Posts Rated Helpful 0 Times
|
That's what the last line of what I had talked about with the variable creation, Axl. It's the last line of code in the intial post.
Code:
COPY "%VMF_PATH%\%MAP_NAME%.bsp" "%BSP_PATH%\%MAP_NAME%.bsp" |
|
02-11-2005, 09:28 AM | #6 |
Join Date: Jan 2005
Posts Rated Helpful 0 Times
|
Or you could use Nem's Batch Compiler and save yourelf a bit of trouble as its a GUI frontend for creating just the same sort of batch files and running them all at a couple mouse clicks. Running the same map over and over with the same parameters it wouldn't matter much, but compiling different maps, with sometimes different parameters, it will save you a good bit of time. And thats handy for example tweaking lighting settings into the RAD executable, just a few clicks and you can just rerun RAD with some new settings.
|
|
02-11-2005, 09:57 AM | #7 | |
Join Date: Jan 2005
Location: Arkansas
Posts Rated Helpful 0 Times
|
Quote:
|
|
|
02-11-2005, 11:14 AM | #8 |
Join Date: Jan 2005
Location: Sheerness, Isle Of Sheppey Kent, England, UK.
Posts Rated Helpful 0 Times
|
Nems batch compiler doesn't do HL2 does it? I use it, only works for HL1 as far as I know.
ZHLT GUI for HL2 should be released soon, check out the website hosted by PHL. |
|
02-11-2005, 04:52 PM | #9 |
Retired FF Staff
Join Date: Dec 2004
Location: Scotland
Posts Rated Helpful 0 Times
|
I would've tried nem's batch tool but his website has been non-working for as long as I can remember.
|
|
02-11-2005, 05:04 PM | #10 |
Join Date: Jan 2005
Posts Rated Helpful 0 Times
|
Yes it does hl2.
|
|
02-11-2005, 07:20 PM | #11 | |
Join Date: Jan 2005
Location: Sheerness, Isle Of Sheppey Kent, England, UK.
Posts Rated Helpful 0 Times
|
Quote:
http://nemesis.thewavelength.net/ |
|
|
08-29-2005, 05:22 PM | #12 |
Join Date: May 2005
Location: Changes every few months
Posts Rated Helpful 0 Times
|
I highly recommend that everyone who maps for HL2 uses batch compiling. It is faster (from my expierience), but more importantly it also frees up Hammer so you can keep mapping or work on another map while you're compiling a map. It's easy and quick and more informative.
Huzzah! |
|
03-04-2008, 12:32 PM | #13 | ||
Join Date: May 2007
Posts Rated Helpful 0 Times
|
Help my Batch Compile
I took a break from mapping and I'm back but my compiler no longer works... which pisses me off cause it took me weeks to get it working last time. Any help would be appreciated. This is my batch compiler:
Quote:
Quote:
|
||
|
03-04-2008, 12:41 PM | #14 |
Lua Team
Join Date: Mar 2007
Posts Rated Helpful 1 Times
|
It can't find vbsp.exe, vvis.exe, and vrad.exe, because they've moved to \sourcesdk\bin\ep1\bin\
Just change your first line to cd "C:\Program Files\Steam\SteamApps\mrforgetfulness@yahoo.com\so urcesdk\bin\ep1\bin" |
|
04-15-2008, 02:40 AM | #15 |
Wiki Team
Fortress Forever Staff Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly Gametype: PAYLOAD Affiliations: DET- Posts Rated Helpful 19 Times
|
So yeah...anyone who doesn't use this really should...hammer's been acting up during my compiles of late so I made this and it's not only faster, but really simple.
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf (Beta) alchimy_b1 (Lua) base_payload_2015 (Models) props_trainyard |
|
04-16-2008, 10:04 PM | #16 | |
Banned
|
Quote:
:: Satan steam friends suck. gg steam friends. when i run it i get C:\Documents and Settings\VJ\Desktop>cd "D:\Program Files\Steam\SteamApps\nukem3 73@hotmail.com\sourcesdk\bin\ep1\bin\" C:\Documents and Settings\VJ\Desktop>vbsp.exe "D:\ff_murderball_a14.vmf" 'vbsp.exe' is not recognized as an internal or external command, operable program or batch file. C:\Documents and Settings\VJ\Desktop>vvis.exe "D:\ff_murderball_a14.bsp" 'vvis.exe' is not recognized as an internal or external command, operable program or batch file. C:\Documents and Settings\VJ\Desktop>vrad.exe -smooth 85 "D:\ff_murderball_a14.b sp" 'vrad.exe' is not recognized as an internal or external command, operable program or batch file. C:\Documents and Settings\VJ\Desktop>pause Press any key to continue . . . |
|
|
04-16-2008, 10:18 PM | #17 |
Wiki Team
Fortress Forever Staff Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly Gametype: PAYLOAD Affiliations: DET- Posts Rated Helpful 19 Times
|
yeah...that was pretty lame lol.
I'll look at my batch file and let you know what you should have when I get home, if no one else does by then.
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf (Beta) alchimy_b1 (Lua) base_payload_2015 (Models) props_trainyard |
|
04-17-2008, 04:06 AM | #18 |
D&A Member
Wiki Team Fortress Forever Staff Join Date: Apr 2007
Posts Rated Helpful 31 Times
|
The cd didn't work because it started in C drive and for some reason it won't just cd between drives. See how the prompt didn't change? If you save the bat file in your D: drive it should work. I have my bat file in the bin folder anyway so I don't need a cd command.
Alternately you can just put the full path in the command: Code:
D:\Program Files\Steam\SteamApps\nukem3 73@hotmail.com\sourcesdk\bin\ep1\bin\vbsp -game "D:\Program Files\Steam\SteamApps\SourceMods\FortressForever" "D:\ff_murderball_a14.vmf" Code:
copy /Y "D:\Program Files\Steam\SteamApps\nukem3 73@hotmail.com\sourcesdk_content\hl2\mapsrc\banderas.bsp" "D:\Program Files\Steam\SteamApps\SourceMods\FortressForever\maps\ff_banderas.bsp" |
|
04-17-2008, 06:52 AM | #19 |
Banned
|
im still confused...
EDIT: nevermind i just put it in the ep1/bin folder. |
|
04-17-2008, 06:53 AM | #20 |
FF God
|
I've never done it this way so I can't really put my input .
__________________
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|