Console
From Blue Mars Developer Guidebook
|
|
Contents |
Using the Console
The City Editor features a command-line console attached to the bottom of the window.
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.
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.
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.
You can find a list of available console variables by right-clicking in the type-in field.
In the console, you can also execute console commands. Here we execute the command "lua_debugger_show", which brings up the Lua debugger.
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.
- Screen Capture (prefixed by "capture_")
- Character Animation (prefixed by "ca_")
- Engine (prefixed by "e_")
- Entity System (prefixed by "es_")
- Physics (prefixed by "p_")
- System (prefixed by "sys_")
- Flash (prefixed by "sys_flash", "ar_flash", and "r_flash")
- Lua (prefixed by "lua_")
- Logging System (prefixed by "log_")
- AI (prefixed by "ai_")
- Action Map
- Material Effects (prefixed by "mfx_")
- Particles (prefixed by "e_particles")
- Profiler (prefixed by "profile_")
- Quality (prefixed by "q_")
- Renderer (prefixed by "r_")
- Sound (prefixed by "s_")
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 "?"
A complete list of console functions and variables can be dumped to the log with the console command DumpCommandsVars.
Note that only a subset of the original CryEngine console will eventually be available to City Developers (see this forum thread - http://dev.bluemars.com/forum/viewtopic.php?f=122&t=819&p=4710#p4710)
Lua
Console variables can be queried in Lua scripts via System/GetCVar.
References
There is also some documentation on http://wiki.crymod.com/index.php/Console_Commands_and_CVars
