Skip to content

Debug Menu#

In addition to the console, the engine also includes a graphical debug menu which can be opened by pressing the Page Up key with the engine window focused. Upon doing so, you will be presented with a screen similar to the following:

Debug Menu Preview

Navigating the debug menu is done exclusively via the keyboard. The controls are as follows:

  • Move Up - Up Arrow
  • Move Down - Down Arrow
  • Select Current Item - Enter/Return
  • Return to Main Screen - Home
  • Show/Hide Menu - Page Up
  • Increment Global - Right Arrow OR Enter/Return
  • Decrement Global - Left Arrow

The highlighted item's background color is seen constantly cycling between black and gray:

Debug Menu Active Item Preview

The default menu includes many common commands and globals available and is generally sufficient for standard use. For advanced users who wish to alter or extend the menu, you may modify the menu contents by editing debug_menu_init.xml in the game data folder. There are several different kinds of menu items:

Command/Command Sequence#

Debug Menu Command Item Preview

Command items run a single command, and will execute the same command each time you select the item. The XML format for a command is as follows:

<item type="command" name="teleport to camera" variable="cheat_teleport_to_camera"/>

The node attributes are explained below: * type - The type of item. For command items, should be command. * name - The display name of the item in the menu. * variable - In the case of command items, the command to execute.

Command Sequences#

In addition to Command items, there are also Command Sequence items. Each time you select the item, the next command in the sequence is run. If the end of the sequence is reached, the sequence is restarted from the beginning and the first command is run. The XML format for a command sequence is as follows:

<item type="command_sequence" name="Sequence exec test">
    <sequence_item variable="print this is the first item!" />
    <sequence_item variable="print t w o" />
    <sequence_item variable="version" />
    <sequence_item variable="print 4" />
</item>

The node attributes are explained below: * type - The type of item. For command sequences, should be command_sequence. * name - The display name of the item in the menu.

Additionally, each command in the sequence is defined with a sequence_item node with the following attributes: * variable - The command to execute.

Script Global#

Debug Menu Global Preview

Script globals can also be linked to the debug menu. You can increment or decrement these values using the Left and Right arrow keys. The amount incremented is determined by the XML file. Certain types of globals cannot be modified through the debug menu - namely, strings. The XML format for a script global is as follows:

<item type="global" name="short increment test" variable="short_gvar_test" inc="2" min="-4" max="20"/>

The node attributes are explained below: * type - The type of item. For script global items, should be global. * name - The display name of the item in the menu. * variable - In the case of command items, the name of the global variable.

Additionally, the following optional attributes may be included: * inc - The amount to increment/decrement from the global. If excluded, defaults to 1. * min - The minimum value that the global can reach. * max - The maximum value that the global can reach.

Keep in mind, the min/max limits only affect modification through the menu and do not apply to other means of modification - such as through the console.

In the event that a global defined in the menu does not exist, the item will display as follows:

Debug Menu Undefined Global Preview

Note that, depending on your engine configuration, undefined globals may display differently.

Category/Submenu#

Debug Menu Submenu Preview

Having all menu items in a single, massive list would be downright insane. For organization, you can create an infinite number of submenus to keep things tidy. The XML format for a submenu is as follows:

<menu name="Cheats">
    ...
</menu>

The menu node has only a single attribute: name, which is the display name of the submenu. Within the menu node, you can place any number of other menu items (including additional submenus), and that list will be shown upon selecting a given menu.

Undefined Item#

Debug Menu Submenu Preview

Undefined items can be used as placeholders for future entries. They are technically unsupported and serve little to no real purpose. The XML format for an undefined is as follows:

<item type="undefined" name="Dummy item #3" />

The node attributes are explained below: * type - The type of item. For undefined items, should be undefined. * name - The display name of the item in the menu.