From 988b006a5bb9edb6465653566e7bdf8175347b8c Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sat, 27 Jun 2026 16:50:41 -0400 Subject: feat: one-way map links, blocked paths on map, map grid startup validation, user colors for maps --- data/help/color.yaml | 42 +++++++++++++++++++++++------------------- data/help/look.yaml | 4 ++++ data/help/map.yaml | 11 +++++++++++ data/help/prompt.yaml | 8 ++++---- data/help/symbol.yaml | 12 ++++++++---- data/help/tinymap.yaml | 4 +++- 6 files changed, 53 insertions(+), 28 deletions(-) (limited to 'data/help') diff --git a/data/help/color.yaml b/data/help/color.yaml index 12fd4a5..17410af 100644 --- a/data/help/color.yaml +++ b/data/help/color.yaml @@ -15,38 +15,38 @@ description: | color off Disable color for this target entirely Color spec format (space-separated tokens): - <0-255> Foreground color (xterm-256 palette index) - bg:<0-255> Background color + <00-FF> Foreground color (xterm-256 palette index, hex) + bg:<00-FF> Background color g:, Gradient between two or more colors bold Bold text dim Dim text underline Underlined text Examples: - color room_name 6 bold - color fire 208 - color death 1 bold - color broadcast 214 bg:0 + color room_name 06 bold + color fire D0 + color death 01 bold + color broadcast D6 bg:00 Gradients interpolate across characters in RGB space: - color item g:196,82 Red to green - color room_name g:45,39,59 Three-stop gradient + color item g:C4,52 Red to green + color room_name g:2D,27,3B Three-stop gradient - Use 'colortable' to see all 256 colors and their indices. + Use 'colortable' to see all 256 colors and their hex codes. - Colors use the xterm-256 palette (0-255). When a player's color - mode is set to "ansi", extended colors (16-255) automatically + Colors use the xterm-256 palette (00-FF, hex). When a player's color + mode is set to "ansi", extended colors (10-FF) automatically downgrade to the nearest of the 16 standard ANSI colors. - Standard colors (0-15): - 0 black 1 red 2 green 3 yellow - 4 blue 5 magenta 6 cyan 7 white - 8-15 bright variants of the above + Standard colors (00-0F): + 00 black 01 red 02 green 03 yellow + 04 blue 05 magenta 06 cyan 07 white + 08-0F bright variants of the above Inline color tags in room descriptions: {}colored text{/} - {182 bold}mysterious vase{/} - {g:196,82}gradient text{/} + {B6 bold}mysterious vase{/} + {g:C4,52}gradient text{/} Color targets: room_name Room name headers @@ -74,6 +74,10 @@ description: | drop_message Mob loot drops credits_pickup Currency/credit messages + Map colors: + map_at The @ marker for your current room on the map + map_blocked The 'X' shown where a path is blocked + Visual tick colors: visual_tick Visual tick marker text (dim blue) visual_first_tick First tick in a numbered cycle (bright red) @@ -85,9 +89,9 @@ description: | The "color" option (option color none/ansi/xterm256) controls whether ANSI codes are emitted. "none" strips all color. - In "ansi" mode, extended palette colors (16-255) are + In "ansi" mode, extended palette colors (10-FF) are automatically downgraded to the nearest ANSI color. You can use color blocks in your prompt: - prompt {2 bold}Ready>{/} %h/%Hhp + prompt {02 bold}Ready>{/} %h/%Hhp See 'help prompt' for full prompt customization. diff --git a/data/help/look.yaml b/data/help/look.yaml index 2be3d30..d547bb6 100644 --- a/data/help/look.yaml +++ b/data/help/look.yaml @@ -11,6 +11,10 @@ description: | items (alphabetically sorted, with reservation info), exits, and other players. + If you have set a custom map symbol for the room (see "help symbol"), + the room name line shows it in dim brackets with its color, e.g. + "Town Square (#1) [D]". + Players are shown with their current action (e.g. "Bob is here, mining a copper rock [1]") or combat status ("Bob is here (fighting a man [2])"). Instance indices appear only when multiple objects or mobs of the same diff --git a/data/help/map.yaml b/data/help/map.yaml index 7ca03a2..def57dc 100644 --- a/data/help/map.yaml +++ b/data/help/map.yaml @@ -8,6 +8,17 @@ description: | The map shows all explored rooms and their connections, centered on your current location. You are shown as @. + Link legend: + - or | two-way connection + ← ↑ → ↓ (or < ^ > v) one-way connection, pointing the way you + can travel along it + X the path is blocked in every direction from here + + Rooms are tinted by their builder-set color; the links between two + rooms blend their colors into a gradient. Set your own per-room + symbol and color with "symbol" (see "help symbol"). Customize the @ + marker and the blocked X via "color map_at" and "color map_blocked". + Map size is controlled by: option map_width (default 30) option map_height (default 20) diff --git a/data/help/prompt.yaml b/data/help/prompt.yaml index 45c7282..961b605 100644 --- a/data/help/prompt.yaml +++ b/data/help/prompt.yaml @@ -30,13 +30,13 @@ description: | Use %% for a literal % sign. Color blocks: - {<0-255> [bold] [dim] [underline]}text{/} + {<00-FF> [bold] [dim] [underline]}text{/} {g:,[,...]}gradient text{/} A color block starts with {color_spec} and ends with {/}. Examples: prompt > - prompt {6}%h/%Hhp $%c %s{/} > - prompt <{2}%h{/}/{1}%H{/}hp> - prompt {208 bold}%h/%Hhp{/} > + prompt {06}%h/%Hhp $%c %s{/} > + prompt <{02}%h{/}/{01}%H{/}hp> + prompt {D0 bold}%h/%Hhp{/} > diff --git a/data/help/symbol.yaml b/data/help/symbol.yaml index c3ec893..85683a4 100644 --- a/data/help/symbol.yaml +++ b/data/help/symbol.yaml @@ -10,14 +10,18 @@ description: | Examples: symbol M Set current room symbol to M - symbol M 232 Set symbol to M with foreground color 232 - symbol M 232 bold Set symbol to M with color 232 and bold - symbol 233 Set current room's symbol color to 233 + symbol M E8 Set symbol to M with foreground color E8 + symbol M E8 bold Set symbol to M with color E8 and bold + symbol E9 Set current room's symbol color to E9 symbol reset Remove custom symbol for current room symbol Show current room's custom symbol The default map symbol for all rooms is ■. You can override it per-room with any single character and an optional color spec. - Colors use standard xterm-256 numbering (0-255) and support + Colors use standard xterm-256 numbering (00-FF, hex) and support bold, dim, and underline modifiers. Check the command "colortable" for all colors. + + Your per-room symbol and color override the room's builder-set + default color on the map. When set, the symbol also appears in + dim brackets on the room's name line when you look. diff --git a/data/help/tinymap.yaml b/data/help/tinymap.yaml index cbff629..5a2a952 100644 --- a/data/help/tinymap.yaml +++ b/data/help/tinymap.yaml @@ -8,4 +8,6 @@ description: | When enabled, a 3x3 mini-map is displayed next to room descriptions. Your current room is shown as @, with - surrounding rooms and connections. + surrounding rooms and connections. Connections use the same + legend as the full map (two-way bars, one-way arrows, blocked + X) — see "help map". -- cgit v1.2.3