Fortress Forever

Go Back   Fortress Forever > Editing > Mapping

Reply
 
Thread Tools Display Modes
Old 02-05-2005, 04:43 PM   #1
o_eat
 
o_eat's Avatar
 
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:
cd *Steam Account*\steamapps\your@email.com\sourcesdk\bin"

vbsp.exe *Steam Account*\steamapps\your@email.com\sourcesdk\cstrik e_sample_content\maps\**MAPFILE.vmf**"

vvis.exe *Steam Account*\steamapps\your@email.com\sourcesdk\cstrik e_sample_content\maps\**MAPFILE.bsp**"

vrad.exe -smooth 85 *Steam Account*\steamapps\your@email.com\sourcesdk\cstrik e_sample_content\maps\**MAPFILE.bsp**"

pause
I've edited mine to look like this, for example:

Quote:
cd "E:\steam\steamApps\your@email.com\sourcesdk\b in"

vbsp.exe "E:\Steam\steamapps\your@email.com\sourcesdk_conte nt\FortressForever\mapsrc\latest.vmf"

vvis.exe "E:\Steam\steamapps\your@email.com\sourcesdk_conte nt\FortressForever\mapsrc\latest.bsp"

vrad.exe -smooth 85 "E:\Steam\steamapps\your@email.com\sourcesdk_conte nt\FortressForever\mapsrc\latest.bsp"

pause
Here is the present (09/01/05) compile tool options for each tool. If you ever need to get this list it's easy to do; simply run the tool you need the parameters for with the -v switch as well as a bogus parameter (e.g. vrad.exe -v -urface "blah")

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.
vvis

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>.
vrad

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).
As you should all know, to use a compile option all you do is change the parameters used to call the tool in the batch file.

Example:
Quote:
vrad.exe -bounce 10 -smooth 85 "E:\Steam\steamapps\your@email.com\sourcesdk_conte nt\FortressForever\mapsrc\latest.bsp"

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"
So, now, when you make another map you can just create a template batch file, and just change the variables as needed.
o_eat is offline   Reply With Quote


Old 02-05-2005, 05:59 PM   #2
o__thursday_
 
o__thursday_'s Avatar
 
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
o__thursday_ is offline   Reply With Quote


Old 02-05-2005, 06:43 PM   #3
Defrag
Retired FF Staff
 
Defrag's Avatar
 
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.
__________________
Fortress Forever.
Level Designer, Gameplay Dude and whatnot.
Defrag is offline   Reply With Quote


Old 02-10-2005, 08:20 PM   #4
o_axl
 
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"
o_axl is offline   Reply With Quote


Old 02-11-2005, 02:22 AM   #5
trepid_jesse
Fortress Forever Staff
 
trepid_jesse's Avatar
 
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"
__________________
Support FF:

Trepid, what?
trepid_jesse is offline   Reply With Quote


Old 02-11-2005, 09:28 AM   #6
o_saintgreg
 
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.
o_saintgreg is offline   Reply With Quote


Old 02-11-2005, 09:57 AM   #7
o_sobe green
 
o_sobe green's Avatar
 
Join Date: Jan 2005
Location: Arkansas
Posts Rated Helpful 0 Times
Quote:
Originally Posted by SaintGreg
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.
I've not done much mapping in the Source engine. But when I did map for the HL engine I had never seen a GUI I was comfortable with. There is something more satisfying about knowing exactly what was included in the batch. If you put it there yourself, you know its there so if an error comes up you can go straight to it. But then I guess its all a matter of personal preference.
o_sobe green is offline   Reply With Quote


Old 02-11-2005, 11:14 AM   #8
o__thursday_
 
o__thursday_'s Avatar
 
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.
o__thursday_ is offline   Reply With Quote


Old 02-11-2005, 04:52 PM   #9
Defrag
Retired FF Staff
 
Defrag's Avatar
 
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.
__________________
Fortress Forever.
Level Designer, Gameplay Dude and whatnot.
Defrag is offline   Reply With Quote


Old 02-11-2005, 05:04 PM   #10
o_saintgreg
 
Join Date: Jan 2005
Posts Rated Helpful 0 Times
Yes it does hl2.
o_saintgreg is offline   Reply With Quote


Old 02-11-2005, 07:20 PM   #11
o__thursday_
 
o__thursday_'s Avatar
 
Join Date: Jan 2005
Location: Sheerness, Isle Of Sheppey Kent, England, UK.
Posts Rated Helpful 0 Times
Quote:
Originally Posted by Defrag
I would've tried nem's batch tool but his website has been non-working for as long as I can remember.
It came online at the beginning of the week, hes now hosted at The Wavelength.

http://nemesis.thewavelength.net/
o__thursday_ is offline   Reply With Quote


Old 08-29-2005, 05:22 PM   #12
o_imbrifer
 
o_imbrifer's Avatar
 
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!
o_imbrifer is offline   Reply With Quote


Old 03-04-2008, 12:32 PM   #13
Doughnut-4|4-
 
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:
cd "C:\Program Files\Steam\SteamApps\mrforgetfulness@yahoo.com\so urcesdk\bin"

vbsp.exe "C:\Program Files\Steam\SteamApps\mrforgetfulness@yahoo.com\so urcesdk_content\FortressForever\mapsrc\beta.vmf"

vvis.exe "C:\Program Files\Steam\SteamApps\mrforgetfulness@yahoo.com\so urcesdk_content\FortressForever\mapsrc\beta.bsp"

vrad.exe -smooth 85 "C:\Program Files\Steam\SteamApps\mrforgetfulness@yahoo.com\so urcesdk_content\FortressForever\mapsrc\beta.bsp"

pause
After attempting a compile I get the following message. I'll just post the first part as it gets redundant.
Quote:
C:\Program Files\Steam\steamapps\mrforgetfulness@yahoo.com\so urcedk_content\FortressForever\mapsrc>cd "C:\Program Files\Steam\SteamApps\mrforgetfulness@yahoo.com\so urcesdk\bin"

C:\Program Files\Steam\SteamApps\mrforgetfulness@yahoo.com\so urcedk\bin>vbsp.exe "C:\Program Files\Steam\steamapps\mrforgetfulness@yahoo.com\so urcedk_content\FortressForever\mapsrc\beta.vmf"
'vbsp.exe' is not recognized as an internal or external command, operable program or batch file.
Doughnut-4|4- is offline   Reply With Quote


Old 03-04-2008, 12:41 PM   #14
Sidd
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"
Sidd is offline   Reply With Quote


Old 04-15-2008, 02:40 AM   #15
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
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
Support FF:
Dr.Satan is offline   Reply With Quote


Old 04-16-2008, 10:04 PM   #16
Nuk3m
Banned
 
Join Date: Mar 2007
Location: New Jersey, USA!
Class/Position: Scout / Offense
Gametype: Capture the Flag
Affiliations: :e0: Founder
Posts Rated Helpful 0 Times
Send a message via AIM to Nuk3m
Quote:
cd "D:\Program Files\Steam\SteamApps\nukem373@hotmail.com\sources dk\bin\ep1\bin\"

vbsp.exe "D:\ff_murderball_a14.vmf"

vvis.exe "D:\ff_murderball_a14.bsp"

vrad.exe -smooth 85 "D:\ff_murderball_a14.bsp"

pause
is this correct?

:: 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 . . .
Nuk3m is offline   Reply With Quote


Old 04-16-2008, 10:18 PM   #17
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
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
Support FF:
Dr.Satan is offline   Reply With Quote


Old 04-17-2008, 04:06 AM   #18
Crazycarl
D&A Member
Wiki Team
Fortress Forever Staff
 
Crazycarl's Avatar
 
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"
Also after vis is done you'll want to copy the BSP into your FF folder:
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"
__________________
Support FF:
Crazycarl is offline   Reply With Quote


Old 04-17-2008, 06:52 AM   #19
Nuk3m
Banned
 
Join Date: Mar 2007
Location: New Jersey, USA!
Class/Position: Scout / Offense
Gametype: Capture the Flag
Affiliations: :e0: Founder
Posts Rated Helpful 0 Times
Send a message via AIM to Nuk3m
im still confused...

EDIT: nevermind i just put it in the ep1/bin folder.
Nuk3m is offline   Reply With Quote


Old 04-17-2008, 06:53 AM   #20
Gator-
FF God
 
Gator-'s Avatar
 
Join Date: May 2007
Location: TX
Class/Position: Scout O, Medic O, Demo D/O, Soldier D
Gametype: CTF 4v4
Affiliations: [milkwood] ( GoodFellas )
Posts Rated Helpful 1 Times
Send a message via AIM to Gator- Send a message via MSN to Gator- Send a message via Yahoo to Gator-
I've never done it this way so I can't really put my input .
Gator- is offline   Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:45 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.