From 7d7977d7f73a9b756f87db60e172f323384477f2 Mon Sep 17 00:00:00 2001 From: Alessio <148966056+alessio-locatelli@users.noreply.github.com> Date: Thu, 7 May 2026 12:10:43 +0300 Subject: [PATCH 1/2] docs: clarify how to run commands --- docs/debug.md | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/docs/debug.md b/docs/debug.md index a755e25b82e..5a01f23fa34 100644 --- a/docs/debug.md +++ b/docs/debug.md @@ -2,18 +2,34 @@ If you compile the game in debug, you have multiple debug features available. -## Debug commands +## Lua console -In-game you have the possibility to use the chat to trigger debug commands. -This is currently a replacement for a console. +Press **`` ` ``** (backtick) in-game to open the Lua console. All debug commands are run from there. +Tab-completion is available — type `dev.` and press Tab to browse available modules. + +### Common commands + +Tip: Debug commands are also supported in quick messages. If you need a debug command frequently, put it in a quick message. :wink: | Command | Description | | ------- | ----------- | -| `help` | Shows a list of all debug commands with descriptions. | -| `god` | Toggles godmode. | -| ... | For the other commands see `help` ingame and there are a lot. | +| `dev.player.god()` | Toggle god mode (invincible, infinite mana). Pass `true`/`false` to set explicitly. | +| `dev.player.invisible()` | Toggle invisibility (monsters ignore you). | +| `dev.player.gold.give()` | Fill inventory with gold. Pass an amount to give a specific value. | +| `dev.player.gold.take()` | Remove all gold. Pass an amount to remove a specific value. | +| `dev.player.info()` | Print player position, HP, mode, and other state. | +| `dev.items.spawn("name")` | Spawn an item by partial name match. | +| `dev.items.spawnUnique("name")` | Spawn a unique item by partial name match. | -Tip: Debug commands are also supported in quick messages. If you need a debug command frequently, put it in a quick message. :wink: +## Chat commands + +The chat box is only available in **multiplayer** (Enter opens it). It accepts a few commands: + +| Command | Description | +| ------- | ----------- | +| `/help` | Shows a list of all available chat commands. | +| `/seedinfo` | Show the seed info for the current level. | +| `/inspect ` | Inspect another player's stats and equipment (multiplayer). | ## Command-line parameters @@ -31,4 +47,5 @@ Tip: Debug commands are also supported in quick messages. If you need a debug co | `Shift` | While holding, you can use the mouse to scroll screen. | | `m` | Print debug monster info. | | `M` | Switch current debug monster. | +| `` ` `` | Open the Lua console. | | `x` | Toggles `DebugToggle` variable. `DebugToggle` is a generic solution for temporary toggles needed for debugging. | From 938fea0718358791074eb12e093d0ce3346d83cb Mon Sep 17 00:00:00 2001 From: Alessio <148966056+alessio-locatelli@users.noreply.github.com> Date: Thu, 7 May 2026 12:11:13 +0300 Subject: [PATCH 2/2] refactor(docs): auto-format via Prettier --- docs/debug.md | 52 +++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/debug.md b/docs/debug.md index 5a01f23fa34..bc4fc2ad94e 100644 --- a/docs/debug.md +++ b/docs/debug.md @@ -11,41 +11,41 @@ Tab-completion is available — type `dev.` and press Tab to browse available mo Tip: Debug commands are also supported in quick messages. If you need a debug command frequently, put it in a quick message. :wink: -| Command | Description | -| ------- | ----------- | -| `dev.player.god()` | Toggle god mode (invincible, infinite mana). Pass `true`/`false` to set explicitly. | -| `dev.player.invisible()` | Toggle invisibility (monsters ignore you). | -| `dev.player.gold.give()` | Fill inventory with gold. Pass an amount to give a specific value. | -| `dev.player.gold.take()` | Remove all gold. Pass an amount to remove a specific value. | -| `dev.player.info()` | Print player position, HP, mode, and other state. | -| `dev.items.spawn("name")` | Spawn an item by partial name match. | -| `dev.items.spawnUnique("name")` | Spawn a unique item by partial name match. | +| Command | Description | +| ------------------------------- | ----------------------------------------------------------------------------------- | +| `dev.player.god()` | Toggle god mode (invincible, infinite mana). Pass `true`/`false` to set explicitly. | +| `dev.player.invisible()` | Toggle invisibility (monsters ignore you). | +| `dev.player.gold.give()` | Fill inventory with gold. Pass an amount to give a specific value. | +| `dev.player.gold.take()` | Remove all gold. Pass an amount to remove a specific value. | +| `dev.player.info()` | Print player position, HP, mode, and other state. | +| `dev.items.spawn("name")` | Spawn an item by partial name match. | +| `dev.items.spawnUnique("name")` | Spawn a unique item by partial name match. | ## Chat commands The chat box is only available in **multiplayer** (Enter opens it). It accepts a few commands: -| Command | Description | -| ------- | ----------- | -| `/help` | Shows a list of all available chat commands. | -| `/seedinfo` | Show the seed info for the current level. | +| Command | Description | +| ----------------- | ----------------------------------------------------------- | +| `/help` | Shows a list of all available chat commands. | +| `/seedinfo` | Show the seed info for the current level. | | `/inspect ` | Inspect another player's stats and equipment (multiplayer). | ## Command-line parameters -| Command | Description | -| ------- | ----------- | -| `+` | Executes a debug command when loading the first game. For example `+god` or `+changelevel 1 +spawn 4 skeleton`. | -| `-f` | Display frames per second. | -| `-i` | Disable network timeout. | -| `-n` | Disable startup video. | +| Command | Description | +| ------- | --------------------------------------------------------------------------------------------------------------- | +| `+` | Executes a debug command when loading the first game. For example `+god` or `+changelevel 1 +spawn 4 skeleton`. | +| `-f` | Display frames per second. | +| `-i` | Disable network timeout. | +| `-n` | Disable startup video. | ## In-game hotkeys -| Hotkey | Description | -| ------ | ----------- | -| `Shift` | While holding, you can use the mouse to scroll screen. | -| `m` | Print debug monster info. | -| `M` | Switch current debug monster. | -| `` ` `` | Open the Lua console. | -| `x` | Toggles `DebugToggle` variable. `DebugToggle` is a generic solution for temporary toggles needed for debugging. | +| Hotkey | Description | +| ------- | --------------------------------------------------------------------------------------------------------------- | +| `Shift` | While holding, you can use the mouse to scroll screen. | +| `m` | Print debug monster info. | +| `M` | Switch current debug monster. | +| `` ` `` | Open the Lua console. | +| `x` | Toggles `DebugToggle` variable. `DebugToggle` is a generic solution for temporary toggles needed for debugging. |