Command — Dennispedia

Command

Runs an engine command. There's no equivalent to a developer console as far as I can tell, so I have no idea why this was done this way instead of defining a function for each one of these commands.

This function is not officially documented.

Arguments

  1. string: Command to execute
  2. vararg: Parameters (depends on command)

Return values

None.

Commands

Many of these commands will not work if run from an unprivileged script.

game.about
Enter about state, which runs data/ui/about.lua. Only used in perftest.
Removed in 0.5.0 (5943727).
game.applydisplay
Reads updated graphics settings from registry and applies them.
game.applygraphics
game.bakemission
Presumably bakes an XML level into a binary level (i.e. a TDBIN file). I have been unable to get this to do anything but crash the game.
Removed in 0.4.5 (5748542).
  1. string: Mission ID
  2. string: Path to level XML
  3. string: Layers, separated by spaces
game.clearbaked
Delete all binary levels, i.e. all files in data/bin/.
Removed in 0.4.5 (5748542).
game.exitlevel
Enter main menu. Obsoleted by Menu function.
Removed in 0.4.5 (5748542).
game.menu
Enter main menu. Obsoleted by Menu function.
Removed in 0.4.5 (5748542).
game.openfolder
Added in 0.5.0 (5943727).
game.openurl
Open URL. Unused by but present in perftest.
  1. string: URL
game.path.has
game.path.load
  1. string: Path ID. Will be loaded from %LOCALAPPDATA%/Teardown/path-${path_id}.pth where ${path_id} is this parameter
game.path.record
game.path.save
  1. string: Path ID. Will be saved to %LOCALAPPDATA%/Teardown/path-${path_id}.pth where ${path_id} is this parameter. May not contain slashes, backslashes, or colons
game.path.stop
game.pausemenu
Indicates to engine that specified pause menu button was pressed.
Added in 0.8.0 (7458793).
  1. string: Pause menu button ID
game.pause
Open pause menu. Obsoleted by SetPaused function.
Removed in 0.5.0 (5943727).
game.quickload
Load quicksave.
game.quicksave
Save quicksave.
game.quit
Fade to black and close game.
game.respawn
Respawn player. Obsoleted by RespawnPlayer function.
Removed in 0.4.5 (5748542).
game.restart
Reload level. Obsoleted by Restart function.
Removed in 0.4.5 (5748542).
game.screenrecord
Added in 0.9.3 (8199301).
  1. boolean: Whether to hide HUD
game.screenshot
Saves a screenshot.
Added in 0.7.0 (6551167).
game.selectmod
Has never existed, but nonetheless is run every time you select a mod in the mod manager in every version since 0.5.0 (5943727).
  1. string: Mod ID
game.startlevel
Enters level. Obsoleted by StartLevel function.
Removed in 0.5.0 (5943727).
  1. string: Path to level XML
game.startmission
Enters level. Obsoleted by StartLevel function.
Removed in 0.5.0 (5943727).
  1. string: Mission ID
  2. string: Path to level XML
  3. string or no value: Layers, separated by spaces
game.startui
Run a script in a way similar to the "Options" button for mods. Fades to black, enters the "UI" game state where only the specified script is running. Pressing escape will fade to black and return you to the main menu.
  1. string: Path to script
game.steam.showbindingpanel
Added in 0.7.1 (6627985).
game.unpause
Close pause menu. Obsoleted by SetPaused function.
Removed in 0.5.0 (5943727).
hydra.eventToolUpgrade
Send the parameters and your score, amount of money, number of total destroyed voxels, and some other information to a telemetry server.
Added in 1.3.0 (10148769).
  1. string: Tool ID
  2. string: Upgrade ID
  3. integer (number): Upgrade level
  4. integer (number): Upgrade price
hydra.eventSettings
Send your display mode (fullscreen, windowed, etc), game resolution, key bindings, graphics settings, audio settings, accessibility settings, and control preferences to a telemetry server.
Added in 1.3.0 (10148769).
hydra.eventTutorial
Send the parameter to a telemetry server.
Added in 1.3.0 (10148769).
  1. integer (number): Stage of progress of beginning of the game tutorial. Intended range 1 to 6.
mods.activate
Added in 0.5.0 (5943727).
  1. string: Mod ID
mods.browsesubscribed
Added in 0.7.0 (6551167).
  1. string: Mod ID
mods.browse
Added in 0.6.1 (6279809).
mods.deactivate
Added in 0.5.0 (5943727).
  1. string: Mod ID
mods.delete
Added in 0.6.1 (6279809).
  1. string: Mod ID
mods.edit
Added in 0.5.3 (6002263).
  1. string: Mod ID
mods.makelocalcopy
Added in 0.5.0 (5943727).
  1. string: Mod ID
mods.new
Added in 0.6.1 (6279809).
  1. string: Mod type, either global or content
mods.options
Added in 0.5.0 (5943727).
  1. string: Mod ID
mods.play
Added in 0.5.0 (5943727).
  1. string: Mod ID
mods.publishbegin
Added in 0.6.1 (6279809).
  1. string: Mod ID
mods.publishcancel
Added in 0.6.1 (6279809).
mods.publishend
Added in 0.6.1 (6279809).
mods.publishupload
Added in 0.6.1 (6279809).
mods.refresh
Added in 0.5.0 (5943727).
mods.sanitycheck
Added in 1.3.0 (10148769).
  1. string: Mod ID
mods.subscribe
Subscribe to specified Workshop mod.
Added in 1.1.0 (8942147).
  1. string: Mod ID, i.e. Workshop mod ID with steam- prepended
mods.unsubscribe
Unsubscribe from specified Workshop mod.
Added in 0.7.0 (6551167).
  1. string: Mod ID, i.e. Workshop mod ID with steam- prepended
mods.updateselecttime
Added in 0.8.0 (7458793).
  1. string: Mod ID
options.input.keymap.resettodefault
Overwrites keyboard controls in registry with default values.
Added in 0.7.1 (6627985).