Cheats and Hotkeys

Cheats are console commands that players can execute in your game using the in-game console. You can create new console commands directly in Daslang by using the [cheat] annotation. For example, let’s write a command that allows you to start a specific level in the game:

[cheat(name="game.start_level")]
def start_level(num : int) {
    set_current_level(num)
}

This command will be available in the console as game.start_level. Note that the name parameter of the [cheat] annotation specifies the name of the command in the console. This parameter is optional; if it is not specified, the function name will be used as the command name.

You can add a hint parameter to provide a detailed description of what the command does. This is especially useful for AI agents (e.g. Claude Code via MCP) that can discover and use your commands automatically:

[cheat(name="game.start_level", hint="Start a specific game level by its number. Level 0 is the tutorial, levels 1-10 are campaign missions.")]
def start_level(num : int) {
    set_current_level(num)
}

All user defined console commands are available in the editor mode only. Add allow_in_release annotation argument to make the command available in release builds as well ([cheat(allow_in_release)]).

Cheat Commands Window

You can quickly run any no-argument cheat command from the Cheat Commands window. Open it via Window > Cheat Commands… in the main menu. The window displays a grid of buttons for all registered zero-parameter [cheat] commands; clicking a button executes the command immediately.

Console Commands

Press ` to open the in-game console. The console supports auto-completion (Tab) and command history (Up / Down).

Here is a list of all the console commands that are available by default:

Application

app.play (hotkey: Ctrl+P or F5) - start/stop the game

app.pause (hotkey: Ctrl+Shift+P) - pause/unpause the game

app.next_frame (hotkey: Ctrl+Alt+P) - advance the game by one frame

app.editor (hotkey: F10) - open/close the editor

app.game_reload (hotkey: Ctrl+Shift+R) - reload the game (restores the game state)

app.hard_reload (hotkey: Ctrl+Shift+X) - hard reload the game (reloads all modules and restarts the game)

app.auto_restore_global_state - if true, the global state will be restored after a game reload (enabled by default)

app.set_target_fps - set an upper limit for the game’s frame rate; use 0 to disable the limit

app.set_time_scale - set the scale for game time (default is 1.)

app.inc_speed (hotkey: Ctrl+Shift+=) - increase the time scale

app.dec_speed (hotkey: Ctrl+Shift+-) - decrease the time scale

app.take_screenshot (hotkey: F11) - take a screenshot (saved to the game/.project/screenshots folder)

app.get_locale_name - print the current and system (actual) locale names

app.set_locale_name - override the locale name (use an empty string to reset)

app.listen_editor_shortcuts - enable/disable listening to editor shortcuts when the editor is open (enabled by default)

Garbage Collector

gc.collect_strings - collect unused strings; all unused heap objects will be collected too

gc.collect_heap - collect unused objects in the heap

gc.collect_all - collect both unused strings and objects in the heap (default strategy)

gc.enabled - enable/disable the garbage collector

gc.validate - validate the heap and report any issues. Useful for debugging memory-related problems

gc.report - print a report of the current memory usage. Very verbose output, prints only in text log, can freeze the game for a long time

MCP Server

app.mcp_status - show MCP server status and registered tools

app.mcp_start - start MCP server on specified port

app.mcp_stop - stop MCP server

app.mcp_call - call an MCP tool: app.mcp_call tool_name [val1] [val2] ...

Hotkeys

Game Control

Ctrl+P or F5 - start/stop the game

Ctrl+Shift+P - pause/unpause the game

Ctrl+Alt+P - advance the game by one frame

Ctrl+Shift+R - reload code (hot-reload user scripts, restores game state)

Ctrl+Shift+X - hard reload code (full re-init)

Ctrl+Shift+= - increase the time scale

Ctrl+Shift+- - decrease the time scale

Ctrl+Shift+0 - reset the time scale to 1

F10 - toggle fullscreen/editor modes

F11 - take a screenshot

Scene Node Operations

Ctrl+D - duplicate the selected node

Ctrl+C - copy the selected node

Ctrl+V - paste as sibling

Ctrl+Shift+V - paste as child

F2 - rename the selected node

Delete - remove the selected node

F - focus on the selected node

Undo / Redo

Ctrl+Z - undo

Ctrl+Shift+Z - redo

Gizmo Operations

W - translate (move) mode

E - rotate mode

R - scale mode

T - bounds mode

Y - universal (translate + rotate + scale) mode

X - toggle world/local gizmo mode

Hold Ctrl to enable snapping for translation, rotation, and scaling with gizmos.

Hold Ctrl while creating a new node to place it at the origin.

Camera Controls

RMB (right mouse button) - rotate the camera

W / A / S / D + RMB - move the camera (forward / left / backward / right)

E / C + RMB - move the camera up or down

Shift + movement - speed up camera movement

Mouse wheel + RMB - change camera speed

Mouse wheel - move forward/backward (perspective camera) or zoom in/out (orthographic camera)

MMB (middle mouse button) - pan the camera in screen space

Alt + drag - orbit the camera

Shift+Esc - unlock mouse cursor when it’s captured by the game

Editor Window Navigation

Ctrl+1 - focus the Scene viewport

Ctrl+2 - focus the Game viewport

Ctrl+S - save (prefab, text file)

Ctrl+Shift+T - re-open last closed file tab

Escape - close current overlay or open the User Menu (in game viewport)