diff options
Diffstat (limited to 'building_guide')
| -rw-r--r-- | building_guide/admin.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/building_guide/admin.md b/building_guide/admin.md index 951d4eb..05363d5 100644 --- a/building_guide/admin.md +++ b/building_guide/admin.md @@ -261,6 +261,7 @@ the game server and is configured in `config.yaml` under `admin_http` (plain HTT | Players | `/editor/players` | Browse character YAML files and view player state. | | Flags | `/editor/flags` | View and edit global flags in real time. | | Files | `/editor/files` | Raw file tree browser for all YAML files under `data/`. | +| Colors | `/colors` | Visual themer for every color the engine renders, split into **Player Colors** and **Constants** sections. Live preview on the right re-renders as you edit. Undo via "Reset all to defaults". | All CRUD editors support undo/redo (persisted to `data/.admin_history.json`), so changes can be reverted even across sessions. @@ -278,6 +279,20 @@ The map page (`/`) is the main navigation hub: - The map uses the same BFS-based grid layout as the in-game map, showing all rooms on the current z-plane. - Up/down links are shown with special glyphs when connecting rooms on different z-levels. +#### Colors Page (`/colors`) + +The colors page is the single source of truth for everything the game paints with. It is split into two top-level sections, and the left-side list is ordered exactly the same way the in-game `colors` command lists its targets — change one and the other tracks it. + +**Player Colors** — the colors a player can override per-account with the in-game `colors` command (e.g. `colors room_name B4 bold`). These are stored in `default_colors` in `config.yaml`. Editing them here changes the *defaults* players start from; players who have already customized one keep their override. + +**Constants** — colors the engine renders conditionally that players can **never** override: HP-bar tiers (green/yellow/red by remaining %), level-difference bands (white/green/red by how far a target's level is from the viewer's), skill-level tier colors on the datapad, battery/run-energy bars, tech status indicators (`ON`/`off`/`locked`), tech/buff `[ON]`/`[BUFF]` tags and stat names, the score panel "max value" trailing numbers, shared table-header chrome (`Skill`, `Level`, `XP`, `Option`, `Value`, `Description` etc.), the production-menu locked-row tint, the APS datapad "here" highlight, the mob inline `n/maxhp` value, the `(protected)` tag, and the god-mode `[LOCAL]`/`[GLOBAL]`/`(HIDDEN)` tags. These are stored in a separate `constant_colors` block in `config.yaml`. + +**Why constants are separate from player colors.** The in-game `colors` command only knows about names listed in `config.DefaultColors()`. Constants live in a different map (`constant_colors`), which that command never reads. So if a player types `colors hp_bar_high FF`, the game answers "Unknown color target: hp_bar_high" and refuses — there is no path for a player to set one. Editing a constant here is the only way to change it short of editing `config.yaml` directly. + +**Save / Reset.** One shared **Save Colors** button persists both sections to `config.yaml` (a backup snapshot of the previous file is written first). **Reset all to defaults** restores both `default_colors` and `constant_colors` to the built-in values from `internal/config/config.go` and saves immediately. **Export JSON** / **Import JSON** round-trip both maps; the import payload may be either the layered `{colors:{...}, constant_colors:{...}}` shape (the format Export produces) or a legacy flat `{category: spec}` object, in which case only player colors are applied. + +**Preview.** The right pane renders example output (a full room look, two combat rounds, chat, drops, ticks, assassin/safespot, and a Constants demo block) using the live specs you have staged. The combat HP bars in the preview paint with the real `hp_bar_high` / `hp_bar_med` / `hp_bar_empty` constants, and the `(level …)` annotations in the Room Look paint with `level_diff_*` — so editing a constant is reflected immediately in the same example lines an admin would recognize from gameplay. + ### Workflow The typical admin worldbuilding workflow: |
