diff options
Diffstat (limited to 'AGENTS.md')
| -rw-r--r-- | AGENTS.md | 40 |
1 files changed, 32 insertions, 8 deletions
@@ -1,6 +1,6 @@ # AGENTS.md -Third Collapse — a Runescape-like sci-fi MUD written in Go. Data-driven via YAML files. No database, no ORM. +The House of Icarus — a Runescape-like sci-fi MUD written in Go. Data-driven via YAML files. No database, no ORM. Set on a terraformed asteroid where technology has regressed. "Science" replaces Prayer, "Technology" replaces Magic, Scavenging replaces Runecrafting. @@ -37,7 +37,7 @@ internal/ combat/ Combat state tracking, combat lock, OSRS-style combat formulas object/ ItemDef, ObjectDef, item/object YAML loaders, EquipSlot, WeaponType, ItemStats engine/ Tick scheduler — configurable ms interval, subscriber pattern, ToTicks() - color/ ANSI 16-color and xterm256-color escape code tags (<red>text</red>, <bold>, etc.) + color/ xterm-256 color system with auto ANSI downgrade, numeric palette (0-255), gradients, inline tags ``` `internal/game/` is the largest package. Key files: @@ -111,7 +111,23 @@ data/players/characters/ Character YAML (gitignored) Wander config (`wander_rooms`, `wander_interval`) is set per-instance in room YAML — mob defs are generic. Mobs wander via legal (unconditioned) room exits; objects teleport between rooms in their list. -See `WORLDBUILDING.md` for full YAML format reference with examples. +See `worldbuilding_guide/` for full YAML format reference with examples. + +## Inline Color Tags + +Room descriptions (and prompts) support inline color tags using `{spec}text{/}` syntax. Untagged text in room descriptions uses the `room_desc` color target. + +```yaml +description: "On the table lies a {182 bold}mysterious vase{/} with a rose in it." +``` + +Tag spec format matches the color command: `{<0-255> [bold] [dim] [underline]}text{/}`. + +Gradients are supported: `{g:196,82}gradient text{/}`. Multi-stop: `{g:45,39,59}three stops{/}`. + +Gradients interpolate in RGB space across the xterm-256 palette. In ANSI mode, each character maps to the nearest ANSI color. + +Item and object YAML `color` fields also support gradient syntax: `color: "g:196,208,226"`. ## Commands @@ -127,14 +143,17 @@ See `WORLDBUILDING.md` for full YAML format reference with examples. | `exits` | List available exits | | `help [topic]` | Help topics from data/help/ | | `map` | BFS ASCII map centered on player | -| `option` / `options [name] [value]` | Character settings (see Option System) | +| `option` / `options [name] [value]` | Account-wide settings (see Option System) | | `alias <name> <cmd>` | Account-wide command alias with arg passthrough | | `unalias <name>` | Remove an alias | | `description` / `desc` | Set custom player description | +| `prompt <value>` | Set custom per-character command prompt | | `queued` | Show pending tick actions | | `color` / `colors [target] [value]` | Customize display colors (account-wide) | | `color reset <target>` | Reset a color target to server default | | `color <target> off` | Disable color for a specific target | +| `colortable` | Display xterm-256 color reference chart | +| `style <name>` | Set combat style: accurate, aggressive, defensive, balanced (prefix match) | ### Free (stackable, execute before active) | Command | Description | @@ -142,7 +161,6 @@ See `WORLDBUILDING.md` for full YAML format reference with examples. | `wear` / `wield <item>` | Equip item to correct slot. `wear all` auto-equips best per slot | | `wear all` | Auto-equips highest-value item per slot from inventory | | `remove` / `unwear` / `unwield <item>` | Unequip item back to inventory | -| `style <name>` | Set combat style: accurate, aggressive, defensive, balanced (prefix match) | | `eat <item>` | Eat food to heal (3-tick cooldown, can eat during combat) | ### Active (replaces previous active, queued per tick) @@ -343,7 +361,7 @@ See `internal/game/action_burn.go`. ## Option System -Player options set via `option <name> <value>`: +Account-wide options set via `option <name> <value>`. Options are stored in the account YAML and shared by all characters on the same account. | Option | Type | Default | Description | |---|---|---|---| @@ -357,7 +375,7 @@ Player options set via `option <name> <value>`: | `reserve` | bool | true | Show full reserved item details | | `depletion` | bool | false | Show depletion and despawn timers | | `despawn` | bool | false | Show ground item despawn timers | -| `color` | string | "none" | none/ansi/xterm256 — color output mode | +| `color` | string | "xterm256" | none/ansi/xterm256 — color output mode | | `mapwidth` | int | 30 | Map viewport width | | `mapheight` | int | 20 | Map viewport height | | `mappadding` | string | "none" | none/x/y/xy — blank-row stripping | @@ -365,7 +383,10 @@ Player options set via `option <name> <value>`: | `queue_silently` | bool | true | Suppress queue messages | | `room_desc_width` | int | 70 | Room desc line wrap width | | `unicode` | bool | true | Unicode box-drawing characters | -| `prompt` | string | "> " | Custom command prompt | + +Prompt is NOT an option — it is a per-character setting via the `prompt` command. Default: `"> "`. Stored in character YAML as `prompt:`. + +New accounts are asked "Should I disable color? [y/N]" after password creation. Pressing enter defaults to No (xterm256 enabled). Choosing Y sets color to "none". ## ItemDef Fields @@ -438,6 +459,7 @@ From `internal/net/server.go`: | `StatePassword` | Entering password | | `StateNewAccountPass` | Setting password for new account | | `StateNewAccountConfirm` | Confirming password | +| `StateColorChoice` | New account: "Should I disable color?" | | `StateMenu` | Main menu | | `StateNewCharName` | Naming new character | | `StateRenameAccount` | Renaming account | @@ -449,6 +471,8 @@ From `internal/net/server.go`: | `StateChangeDescription` | Setting player description | | `StateTalk` | NPC conversation input | | `StateDropAllConfirm` | Confirming `drop all` | +| `StateCookRecipe` | Cook recipe selection | +| `StateColorChoice` | New account color preference | ## Adding a New Skill |
