From 43f21aabae8924f35c12c8485e690aeefe0089fb Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Tue, 16 Jun 2026 01:59:27 -0400 Subject: feat: overhauled ansi color, added prompt options --- data/help/color.yaml | 101 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 73 insertions(+), 28 deletions(-) (limited to 'data/help/color.yaml') diff --git a/data/help/color.yaml b/data/help/color.yaml index e56512a..1d5ba54 100644 --- a/data/help/color.yaml +++ b/data/help/color.yaml @@ -1,31 +1,76 @@ name: "color" category: "Options" description: | - Color output mode. - - Type: string - Default: none - Values: none, ansi, xterm256 - - Controls the color output format used by the game. - none - No color output, tags are stripped. - ansi - Standard 16-color ANSI (works in most telnet clients + web client). - xterm256 - 256-color xterm codes (works in PuTTY, iTerm, Kitty, etc., - but not in the web client). - - You can embed color tags in your prompt string, character description, - and other free-text fields: text text - Tags are stripped if color mode is "none". - - Available foreground colors: - black, red, green, yellow, blue, magenta, cyan, white, - bright_black, bright_red, bright_green, bright_yellow, - bright_blue, bright_magenta, bright_cyan, bright_white - - Available styles: - bold, dim, italic, underline - - Examples: - option color ansi - option prompt Ready> - description A tall warrior with golden hair. + Color output customization. + + The "color" command lets you customize the color of various game + elements on an account-wide basis. Colors are shared by all + characters on the same account. + + Usage: + color List all targets and their current values + color Show current color for a target + color Set a custom color + color reset Reset to server default + color off Disable color for this target entirely + + Color string format (space-separated tokens): + fg= Foreground color + bg= Background color + bold Bold text + dim Dim text + italic Italic text + underline Underlined text + + Example: fg=green bg=black bold + + Available color names: + black, red, green, yellow, blue, magenta, cyan, white, + bright_black, bright_red, bright_green, bright_yellow, + bright_blue, bright_magenta, bright_cyan, bright_white + + Color targets: + room_name Room name headers + room_number Room number display (#id) + room_desc Room description text + direction Movement direction text ("You walk north") + exit_direction Exit direction labels (north, south, etc.) + exit_name Exit destination room names + mob_name Mob names in combat + friendly_npc Friendly NPC names (cannot be attacked) + hostile_npc Hostile NPC/mob names in room listings + damage Damage numbers + enemy_hp Enemy HP in combat messages + character_hp Your HP in combat messages + xp XP gain messages + level_up Level-up announcements + item Item names on pickup/drop/gather + player_name Player names in broadcasts + death Death message + victory Combat victory message + miss Miss messages in combat + error Error messages + + Resolution order: + 1. Account override (set via "color" command) + 2. Server default (set in config.yaml) + 3. Built-in fallback + + Auto-colored elements (not configurable): + - Object names: colors are set per-object in their YAML definition + (fishing spots are blue, rocks are earth-toned, trees are green, etc.) + - Item names: colors are set per-item in their YAML definition + (ores, logs, fish, tools, etc.) + - Mob/player levels: displayed relative to your combat level + (red if higher, orange if <5 higher, white if equal, + yellow if <5 lower, green if much lower) + + The "color" option (option color none/ansi/xterm256) controls + whether ANSI codes are emitted and which mode is used. + "none" strips all color; the "color" command settings are + still saved but have no visual effect until color mode is + enabled. + + You can use color blocks in your prompt using the same format: + option prompt {fg=green bold}Ready>{/} %h/%Hhp + See 'help prompt' for full prompt customization. -- cgit v1.2.3