Useful Debugger Commands

Cajunwolf prompted me to start a list of useful debugger commands. There are many. I've enclosed optional parameters in square brackets. You enter these commands from the game console (press ~). There is also an autocomplete feature that is very useful. Once a command is started, pressing the tab key will finish the command as far as possible. If there is more than one possible completion, pressing tab twice will show a list of possible completions. Hitting tab one more time will show a list with parameters as well. A bool or boolean is a 0 or 1. The three I use the most are:

So I can move around freely and view the map clearly. Here are a few that display useful debugging information onscreen. To turn on AI deubugging:

Once AI debugging is on, you can selectively turn on or off certain debugging information with these:

Collision meshes are displayed with:

-1 turns it off, 0 & 1 render the different collision mesh lods. And you can view object portals with:

These commands are interactive and should not be used at the same time:

The AI sense debugging is useful to determine the exact coordingates of an object. Position an object in the center of the screen and click fire. With AI pathfinding debugging active, click the fire button to mark a starting position (a white circle) and again to mark the ending position of a path. Its also useful for determining the exact coordinate of a spot on the terrain, since the coordinates are displayed onscreen. Also, when AI pathfinding or senseing debugging is active, you can use these commands to tune the information displayed:

If you would like the camera to follow the bots around, use:

The debug logs may be huge, but here are a few commands that make them even larger:

Here are a few more console commands that provide onscreen information:

The first command, drawDebug, will eventually flood the screen with lines that do not get cleared. The second command, clearDebugLines, is needed to erase the existing lines.

This command is a cheat, since it displays both teams in the minimap, but might be useful while developing it:

These 2 commands provide performance information onscreen:

These can be used to turn different types of rendering on or off:

These commands dump files into various places off the game's root folder:

I'm still going thru them all looking for more goodies. I've been playing with the weather commands, but have had no luck with them yet. I did notice that when I entered:

Another group of commands appeared that go with it:

It appears that the weather was meant to be like an effect, but may never have been implimented in bf. It's not used anywhere in the game. If anybody has any luck with this, please let me know. I would love to see a battle in a rain storm.