22
33If you compile the game in debug, you have multiple debug features available.
44
5- ## Debug commands
5+ ## Lua console
66
7- In-game you have the possibility to use the chat to trigger debug commands.
8- This is currently a replacement for a console.
7+ Press ** `` ` `` ** (backtick) in-game to open the Lua console. All debug commands are run from there.
8+ Tab-completion is available — type ` dev. ` and press Tab to browse available modules.
9+
10+ ### Common commands
911
1012| Command | Description |
1113| ------- | ----------- |
12- | ` help ` | Shows a list of all debug commands with descriptions. |
13- | ` god ` | Toggles godmode. |
14- | ... | For the other commands see ` help ` ingame and there are a lot. |
14+ | ` dev.player.god() ` | Toggle god mode (invincible, infinite mana). Pass ` true ` /` false ` to set explicitly. |
15+ | ` dev.player.invisible() ` | Toggle invisibility (monsters ignore you). |
16+ | ` dev.player.gold.give() ` | Fill inventory with gold. Pass an amount to give a specific value. |
17+ | ` dev.player.gold.take() ` | Remove all gold. Pass an amount to remove a specific value. |
18+ | ` dev.player.info() ` | Print player position, HP, mode, and other state. |
19+ | ` dev.items.spawn("name") ` | Spawn an item by partial name match. |
20+ | ` dev.items.spawnUnique("name") ` | Spawn a unique item by partial name match. |
21+
22+ ## Chat commands
23+
24+ The chat box is only available in ** multiplayer** (Enter opens it). It accepts a few commands:
1525
16- Tip: Debug commands are also supported in quick messages. If you need a debug command frequently, put it in a quick message. :wink :
26+ | Command | Description |
27+ | ------- | ----------- |
28+ | ` /help ` | Shows a list of all available chat commands. |
29+ | ` /seedinfo ` | Show the seed info for the current level. |
30+ | ` /inspect <name> ` | Inspect another player's stats and equipment (multiplayer). |
1731
1832## Command-line parameters
1933
@@ -31,4 +45,5 @@ Tip: Debug commands are also supported in quick messages. If you need a debug co
3145| ` Shift ` | While holding, you can use the mouse to scroll screen. |
3246| ` m ` | Print debug monster info. |
3347| ` M ` | Switch current debug monster. |
48+ | `` ` `` | Open the Lua console. |
3449| ` x ` | Toggles ` DebugToggle ` variable. ` DebugToggle ` is a generic solution for temporary toggles needed for debugging. |
0 commit comments