Batch Compiling

Batch compiling has to be the most effective way to get your map compiled. It's not a secret that people have always had extreme problems with the bsp commands run from Radiant. Everything to to with compiler paths, syntax, mysterious errors to the present situation of there being Windows XP (which is based on Windows NT and contains all those admin rights and shit) that
sometimes refuses altogether. Now all those things can be evened out but what the hell, why can't people concentrate on the actual map? I personally have never had any proplems with the compilers. But one thing I noticed is that on some systems or installs the compiler window doesn't display the output in real time and on others it does. By default it sends all the output to a file and then displays it in the console. I don't know about you but the Radiant console is deeply disliked by me.

Well I came across a post on Rust Forums once and it suggested that I use the command prompt to load the compilers. This turned out to be a great idea. On one hand you would be directly accessing the compilers, on the other you would be able co control what goes on and see the progress at any stage.

Batch files are executable files with the .bat extention that perform a batch job. A batch job is simply a set of commands (similar ones) performed automatically in succession

I. Preperation

First of all you must have all the compile tools (kpbsp.exe; kpvis.exe and kprad.exe)
in your
kingpin\main\maps directory. Take them from your kingpin\kprad directory.

Tbere is an issue with the file colormap.pcx which is used in some cases by KPRad. It is located in your pak0.pak file. For some reason KPRad does not accept it. So what I suggest is that you put it in all possible directories where it can look : kingpin/main ; kingpin/main/pics; kingpin/main/maps (If what I just said is a load of shit then write me)

I personally use a program called Windows Commander as a file manager. It's NC style - two windows but actually that is configurable. It also has a commnd line and shortcut bar so there are many ways to call the compile tools. I guess you could alternatively dump all of the batch files on the desktop and get to them quickly using Show Desktop on the Quick Launch bar. There are many ways other than these that a Windows wiz could master up (as just put the batch files on the QL altogether).

Now you can choose what kind of batch files to use. With one sort it has the name of the map embedded, the other requires the map name as a parameter. In any case the batch files here are with parameters and you will have to replace the %1 sign with the map name if you want the other way.

Example:
kpbsp %1

II. The Tools

1. Let's start with BSP

The syntax of BSP is simple. I won't go into the advanced commands as I don' t know 'em.

kpbsp [options] yourmap

If your map has a leak then all you have to do to get the red line in Radiant is click File|Pointfile... To update the pointfile then turn it off and then on again.

2. Visualisation

You can have fast vis or full vis. If your map is enormous you would like fastvis to have it additionally lit. Naturally this is ONLY for playtesting.

kpvis -fast yourmap

kpvis yourmap

3. Lighting

Arghrad is a nifty little program which has tonnes of options. Check out the Arghrad page (somewhere like http://www.planetquake.com/arghrad) for all the details and you can add them to the batch files below.

Unlike the previous two utilities KPRad requires a specified gamedir as it can support mods as well. You will most likely have to modify it yourself to suit.

kprad -gamedir c:\progra~1\kingpin\main mapname

kprad -gamedir c:\progra~1\kingpin\main -bounce 0 mapname

Both of the above are on one line for our low-res viewers:)

The second command is a sort of fast rad with the quality being not top notch. Here's the extra quality command.

kprad -gamedir c:\progra~1\kingpin\main -extra mapname

III. The Batch files themselves

The reason I haven't put them at the top is that I wanted to explain the concept first as writing batch files is not hard. Here's the list:

Just plain BSP
BSP and normal VIS
BSP and fast VIS
BSP with normal VIS and normal RAD
BSP with fast VIS and fast RAD
BSP with normal VIS and extra quality RAD