Console

From Blue Mars Developer Guidebook

Jump to: navigation, search
There are security restrictions on this article

Contents

Using the Console

The City Editor features a command-line console attached to the bottom of the window.

Image:Console.PNG

The console output area above the one-line type-in field can be expanded. For the most part, the console output will display the same information recorded in the log file.

Image:Consoleexpanded.PNG

To see the documentation for a console variable, type in the variable name followed by a space and a question mark.

Here we see the values for log_Verbosity, which controls log output to the console display.

Image:Consolevarparams.PNG

In the console type-in field, you can examine and set console variables. Enter the name of the console variable and the current value will be displayed in the output area. To set the variable, type the variable name followed by a space and the new value.

For example, here we entered "log_Verbosity" to see its current value is 3, then we entered "log_Verbosity 2" to change it's value to 2.

Image:Consolevarexample.PNG

You can find a list of available console variables by right-clicking in the type-in field.

Image:Consolevarlist.PNG

In the console, you can also execute console commands. Here we execute the command "lua_debugger_show", which brings up the Lua debugger.

Image:Consolecommandexample.PNG

Some console variables can also be set from the Tools->User Commands menu, which can dragged off as a separate window for convenience.

Image:Consolevarmenu.PNG

Console Commands and Variables

Blue Mars features the following console functions and variables. Each variable is prefixed according to its system, e.g. "log_" for the logging system, "p_" for physics, etc.


Some frequently used CVars include:

  • e_debug_draw - Draw helpers with information for each object
  • lua_debugger_show - Brings up the CryEngine lua debugger
  • mfx_Debug - Turns on MaterialEffects debug messages
  • p_draw_helpers - Toggles display of various physical helpers (e.g., collision proxy)
  • r_DisplayInfo - Toggles debugging information display in upper right corner of screen
  • s_DebugSound (Toggles sound debugging mode) and s_DrawSounds (Toggles drawing of a small red ball at the sound's position and additional information)


Help tips can be brought up from the Console by typing the CVar name followed by "?"

Some of these are automatically available via links in the ToolBox (View>Show ToolBox) and are configurable via Tools>Configure User Commands. For example, p_draw_helpers appears in this list and you can click it to toggle visible physics proxies on and off.

A complete list of console functions and variables can be dumped to the log with the console command DumpCommandsVars.

Lua

Console variables can be queried and set in Lua scripts via System/GetCVar and System/SetCVar.

The Set Level CVars Example explains how to set various CVars upon loading a level.


References

There is also some documentation on http://wiki.crymod.com/index.php/Console_Commands_and_CVars

Problems with this wiki page? Contact us either by: Support Email or Support Ticket System

Blue Mars Guidebook Privacy Policy
Blue Mars Guidebook Community Guidelines

Personal tools