henry.jarske.net

Writings

Half-Life level design: Common errors and problems

Error messages from the compilers can be really cryptic at times. Here's a list of some of the most common errors and their causes.

The list of errors is in the same order as the compiling tools should be run. This order is CSG, BSP, VIS and finally RAD.

Note: This tutorial was written for and applies to Valve Hammer Editor 3.x with the popular ZHLT compiling tools.

CSG: Token too large

Token too large on line 5

Reason: A string in your .map file is too long.

The compile tools can't handle excessively long strings of text in .map files. This error is nearly always caused by a line that lists the WADs you're using in your map.

To fix this, you'll need to clean up your WAD list in the Options menu, Textures tab. Try to keep the list to a minimum for performance reasons, and don't add any WADs that aren't meant for mapping (such as cached.wad and pldecal.wad).

CSG: Outside world

Error: Entity 0, Brush 14: outside world(+/-4096): (-256,16,-64)-(-144,128,10032)

Reason: A brush is outside the allowed mapping area or it has an invalid structure.

There are two reasons for this error:

You'll be able to find the offending brush with the brush/entity number in the error message and the Go to brush tool. If it's an invalid brush, it's probably easier to just redo it.

CSG: Coplanar plane

Error: Entity 0, Brush 14, Side 6: has a coplanar plane at (-64, -64, -64), texture AS

Reason: A brush has more than one face on the same plane.

The Half-Life engine doesn't support a certain kind of brush structure, which ends up causing this error. An extra "edge" like in this example may look normal, but will stop the compiling process:

errors_coplanar.jpg

Find the invalid brush using the Go to brush tool using any brush/entity numbers from the error message. Use the Vertex Manipulation tool to move the offending vertices to either side, and answer Yes to the "Merge vertices?" prompt.

CSG: Plane with no normal

Error: Entity 0, Brush 14, Side 0: plane with no normal

Reason: One face of a brush doesn't have any surface area.

When you manipulate a brush and move a vertex on top of another one, the editor prompts you to merge them. Answering No is basically only good if that's a temporary position. If you don't merge them, you run the risk of getting errors such as this one.

Find the brush with the number in the error message. You can either redo the brush or use Vertex Manipulation to properly merge the vertices.

CSG: Missing '[' in texturedef

Error: Missing '[' in texturedef (U)

Reason: The compile tools couldn't read a texture name.

There are a couple of reasons why this is happening:

BSP: Leak

Warning: === LEAK in hull 0 ===
Entity light @ (   0,   0, 128)
Leak pointfile generated

Warning: === LEAK in hull 1 ===
Entity light @ (   0,   0, 128)
Leak pointfile generated

Error: Stopped by leak in hull 1

Reason: A point entity in your map can see into the void.

There are basically three different causes for a leak:

To figure out which of these is causing the leak, you need to think of any changes you've done since your last successful compile. If you can't figure out the reason, use the following commonly used methods to find what's causing the leak.

Pointfile

As you can see, the error says "Leak pointfile generated." That's an important file when looking for a leak.

  1. If the compiler script doesn't do it automatically, copy the pointfile called yourmapname.pts to the game's map directory. You should have the corresponding file yourmapname.bsp in there already.
  2. Run the game and load up your map in a single player game.
  3. Pull down the console and type "pointfile" (without the quotes) to load the pointfile. If the game complains about too few particles, add the parameter "-particles 100000" to your game's command line. Increase the number as necessary.
  4. You'll see a black-and-white line going around somewhere in your map. Fly around in noclip mode (type "noclip" in console) and try to find it. The start point of the line is at the coordinates shown in the error message.
  5. Follow the line and find the point where it jumps outside your map. If it seems to go through a wall, make sure that the wall isn't tied to an entity. If the line actually starts from the outside of your map, look for a point entity in the editor at those coordinates.

Big Block Method

This method is based on sealing the leak in order to find it. It's a brute force approach and can get confusing with multiple leaks, so using a pointfile could be much faster in many cases.

  1. Create a huge solid block to cover approximately half of the map and compile the map. For a faster and less cluttered result, try running BSP with the "-leakonly" parameter, and also skip both VIS and RAD.
  2. If the leak is still present, you'll know that your leak is in the other side of the map. If the leak is gone, scale the big block to cover only half of the previous area. Compile again.
  3. Repeat the process until you can pinpoint the leak. If I use this technique, I prefer to use the top viewport to scale the brush. I only start scaling on the Z-axis when the block is small enough.

VIS: Portal file does not exist

Error: Portal file 'mapname.prt' does not exist, cannot vis the map

Reason: VIS couldn't find the .prt file that's supposed to be generated by BSP.

This error can occur when BSP wasn't run at all, or the tools were run in the wrong order. Another common reason is an error in a previous part of the compiling process.

Look through your compiling log for the cause. If you have doubts about your compiling order, make sure the tools are run in this sequence: CSG, BSP, VIS, RAD.

The whole map is fullbright in-game

Reason: The RAD part of the compiling process wasn't successfully finished.

There are 2 very common reasons for this problem: