Skip to content

Add /help in-game chat command for discoverability#44

Merged
AdaInTheLab merged 1 commit into
mainfrom
feat/in-game-help-command
Apr 29, 2026
Merged

Add /help in-game chat command for discoverability#44
AdaInTheLab merged 1 commit into
mainfrom
feat/in-game-help-command

Conversation

@AdaInTheLab
Copy link
Copy Markdown
Collaborator

Why

Players couldn't discover KC's chat commands without out-of-band docs (a server MOTD, a Discord channel, a friend telling them). Default-case-returns-false in the dispatcher means an unknown `/foo` just goes through as normal chat with no hint that there are commands. This adds the obvious missing affordance.

What

`/help` (also `/commands` and `/?`) lists every enabled chat-command group, one line per group, in PM:

```
Available commands:
HOME: /home [name], /sethome , /delhome , /homes
TELEPORT: /tp , /cities
POINTS: /points, /signin
STORE: /shop, /buy
VIP: /vip
TICKETS: /ticket , /ticket , /tickets
BLOOD MOON: /skipbm (alias: /voteskip)
```

Each group line only renders if that group's `*Enabled` flag in `ChatCommandSettings` is `true`. A server with the store turned off doesn't tell its players to try `/buy`.

If every optional group is disabled, the help reply collapses to:

```
Available commands:
BLOOD MOON: /skipbm (alias: /voteskip)
(All optional feature groups are currently disabled on this server.)
```

Three small design notes

  • Help has no enable toggle. It's always on. Disabling discovery on a server with active chat commands would be a footgun.
  • Blood Moon Vote shows unconditionally. That feature gates itself inside its own handler rather than via a `ChatCommandSettings` flag here, so the line in `/help` matches existing dispatch behavior — if the player runs it while disabled, the feature itself replies with the configured "disabled" message.
  • Uses `settings.Prefix` so servers running with non-default prefixes (`!`, `.`, etc.) get correct render. Bootstrapping is still on the operator though — a player who doesn't know the prefix can't reach `/help`.

Test plan

  • `pwsh tools/build.ps1 -Platform linux` clean
  • In-game on a dev server: `/help` prints the full list with default settings
  • Toggle `StoreEnabled` off in Settings → Chat Commands, save, run `/help` again → STORE line absent
  • `/commands` and `/?` produce identical output to `/help`

🤖 Generated with Claude Code

Players had no way to discover what KC's chat commands were on a given
server — defaulting to /home or /shop only worked if someone told them
the commands existed first. Adds /help (also /commands and /?) which
lists every chat-command group enabled on this server, formatted one
line per group:

  Available commands:
    HOME: /home [name], /sethome <name>, /delhome <name>, /homes
    TELEPORT: /tp <city>, /cities
    POINTS: /points, /signin
    STORE: /shop, /buy <item>
    VIP: /vip
    TICKETS: /ticket <message>, /ticket <id>, /tickets
    BLOOD MOON: /skipbm (alias: /voteskip)

Two design decisions worth flagging:

  - Help itself has no enable toggle. Even if every optional group is
    turned off, /help still works and surfaces 'all groups disabled' —
    which is itself useful info for the player and the admin.

  - Group lines respect each feature's own enable flag, so a server
    running without the store doesn't tell players to try /buy.

  - Uses settings.Prefix so non-default prefixes ('!', '.', etc.)
    render correctly. (Bootstrapping is still on the operator: a
    player who doesn't know the prefix can't reach /help in the first
    place. Server MOTD or welcome message handles that.)

Three aliases (help / commands / ?) so different player muscle memory
all hits the same handler.
@AdaInTheLab AdaInTheLab merged commit 8e34bca into main Apr 29, 2026
2 checks passed
@AdaInTheLab AdaInTheLab deleted the feat/in-game-help-command branch April 29, 2026 22:04
@AdaInTheLab AdaInTheLab mentioned this pull request Apr 30, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant