id: d9dda063a07148abbc0e443976d4abd2
parent_id: 08da6a1e63e34c7386cf258da6323f59
item_type: 1
item_id: 088737f31c514f1da21cc42c0ab6acc1
item_updated_time: 1785696937673
title_diff: "[]"
body_diff: "[{\"diffs\":[[0,\"us: \"],[-1,\"Implementation Started (Phase 1)\\\n\\\n## Summary\\\n\\\nA fantasy-themed text-based MMORPG inspired by **Torn City**, with idle RPG elements from **Idle Fantasy**, a **RoleMaster-inspired critical hit system**, and the setting/structure of **The Bard's Tale I**. Named after the ancient neolithic settlement on Orkney. The game transplants Torn's proven crime-economy-guild mechanics into a dark fantasy setting with real-time features expected in 2026+.\\\n\\\n### What Each Source Primarily Contributes\\\n\\\n| Source | Primary Contribution |\\\n|---|---|\\\n| **Bard's Tale I** | Setting (Skara Brae), Review Board (leveling/spells), party system, dungeon progression, Mangar antagonist, spell schools, bard songs |\\\n| **RoleMaster / MERP** | Combat engine (d100 open-ended, crit tables, armor cross-ref, body parts, resistance rolls), three magic realms, **elaborate skill category system + spell lists**, brutality |\\\n| **Idle Fantasy** | Offline sessions, hireable workers, pets, guild rank progression, blessings, slayer tasks, daily/cumulative quests, **(+2025 evolution:) infinite tower, expeditions, town buildings meta, carnival, pity system, gear scoring, titles UX, XP lamps** |\\\n| **Torn City** | Crime→adventure loop, billions-scale stats, economy, factions→guilds, companies→clans, properties, education, casino→gambling, travel, seasonal events, **honours/awards→medals & honours**, **graphical browser UI model** |\\\n\\\n---\\\n\\\n## Research Completed\\\n\\\n- Analyzed Torn City (torn.com): text-based crime MMORPG running since 2004, millions of users\\\n- Key Torn mechanics: crimes, PvP, factions, companies, properties, stock market, education, bounties, item market, casino, racing, travel, honours/awards\\\n- Torn evolution: Crimes 2.0 (2023), real-time features, mobile apps, rich REST API with community tools\\\n- Analyzed Idle Fantasy (github.com/tristinbaker/IdleFantasy): open-source idle RPG, 23 skills, offline sessions, guild rank progression, pets, inn workers, blessings, slayer tasks\\\n- **Re-reviewed Idle Fantasy at v1.12.11 (366 stars, 810 commits, 2026-07)**: new systems captured — Infinite Tower, Expeditions, Buildings/Builder's Workshop, Carnival, pity system, gear scoring, titles UX, XP lamps, raid bosses. See [Idle Fantasy Inspirations](joplin://fea2d81f0414484fa4edf126f8ca17ed).\\\n- Analyzed Bard's Tale I (1985): dungeon crawl RPG set in Skara Brae, 30×30 city map, Review Board, Garth's Shoppe, party of 6, spell schools (Magician/Conjurer/Sorcerer/Wizard → Archmage), Mangar the Dark, turn-based combat\\\n- Analyzed RoleMaster/MERP: d100 open-ended system, critical tables by weapon type, armor cross-reference, body part damage, resistance rolls, three realms of magic (Essence/Channeling/Mentalism), 10 stats, skill ranks & development points, maneuver difficulty, open/closed/base spell lists\\\n- Designed hybrid combat system: Torn-scale exponential stat growth + RoleMaster-inspired open-ended d100 crit tables with level-difference caps\\\n- Designed MERP/Rolemaster-inspired skill & magic system: 21 skill categories, practice+development rank hybrid, maneuver roll resolution, per-realm spell lists\\\n- Designed Torn City-inspired medals & honours system: tiered medals, rare honours, titles, Hall of Fame\\\n- Created comprehensive mechanics source mapping (BT1 + RM + IF + Torn → Skara Brae)\\\n\\\n---\\\n\\\n## Design Documents (Joplin Notes)\\\n\\\n| Note | ID | Content |\\\n|---|---|---|\\\n| [Game Concept Overview](joplin://fcd381c235694f29abf73665317a40f5) | `fcd381c235694f29abf73665317a40f5` | Core game loops, character system (6 races, 8 classes), crafting deep dive, inn deep dive, pets, guilds, blessings, slayer, API design, monetization, MVP scope |\\\n| [Mechanics Source Mapping](joplin://81ac5941f07d4cdcb41a4797c7ec1c99) | `81ac5941f07d4cdcb41a4797c7ec1c99` | **How BT1, RoleMaster, Idle Fantasy, and Torn City map to our mechanics.** Leveling, spells, combat, adventures, city nav, economy, guilds+clans, party system, races, classes, quests, world events. |\\\n| [Combat System & Stat Scaling Design](joplin://5ff1fed180fa4b39b4cdb925f34c1008) | `5ff1fed180fa4b39b4cdb925f34c1008` | Hybrid RoleMaster + Torn City combat: exponential BIGINT stats, open-ended d100 crit tables, crit caps by level difference, crit status effects, combat formula draft |\\\n| [Skill & Magic System (MERP/Rolemaster-Inspired)](joplin://8bee50c2a9194ec491612ace0bd40fe4) | `8bee50c2a9194ec491612ace0bd40fe4` | **21 skill categories, practice+development rank hybrid, maneuver roll resolution (Routine→Absurd), per-realm spell lists (open/closed/base), power points, spell acquisition at Review Board.** |\\\n| [Medals & Honours System (Torn City-Inspired)](joplin://e368348dd9c341f59fe55594a0fbca96) | `e368348dd9c341f59fe55594a0fbca96` | **Tiered medals (Copper→Dragon) by category, rare honours, titles, Hall of Fame leaderboards, bounded permanent bonuses, profile display.** |\\\n| [Idle Fantasy Inspirations](joplin://fea2d81f0414484fa4edf126f8ca17ed) | `fea2d81f0414484fa4edf126f8ca17ed` | Offline sessions, hireable NPC workers, pet buff system, guild rank progression, blessings/church, slayer tasks, quest diversity, 23-skill mapping **(+ infinite tower, expeditions, buildings, carnival, pity, gear scoring, titles, XP lamps)** |\\\n| [Lore & World Building](joplin://2c8e2a844da0497e8a93c820ec8901a1) | `2c8e2a844da0497e8a93c820ec8901a1` | 11 city districts + key locations, 11 key NPCs, 5-act storyline (BT1-inspired), travel destinations (offshore), day/night cycle, calendar & seasonal events with temporary locations |\\\n| [Tech Stack & Architecture](joplin://980c3eb587294e4383474b94988f2f88) | `980c3eb587294e4383474b94988f2f88` | Rust workspace (Axum, SQLx, Redis, JWT), Vue 3 SPA frontend, **multi-repo + bilingual shared-repo layout**, database schema, crate dependencies, **deployment topology**, **art direction** |\\\n| [Project Plan](joplin://088737f31c514f1da21cc42c0ab6acc1) | `088737f31c514f1da21cc42c0ab6acc1` | This document — roadmap, MVP scope, repository structure, **decisions log**, **workspace status** |\\\n\\\n---\\\n\\\n## Character System Summary\\\n\\\n### Races (6 — Conservative)\\\nHuman, Dwarf, Elf, Halfling, Half-Orc, Half-Elf\\\n\\\n### Classes (8 — Conservative)\\\nWarrior, Rogue, Mage, Bard, Cleric, Ranger, Paladin, Monk\\\n\\\n### Spell Schools (Mage only, BT1-inspired)\\\nMagician → Conjurer → Sorcerer → Wizard. **Free to switch at Review Board.** Master all four = Archmage (cosmetic title only).\\\n\\\n### Magic Realms (RoleMaster-inspired)\\\nEssence (mages), Channeling (clerics), Mentalism (bards/psionics). All use unified **Power Points** (no separate mana).\\\n\\\n### Skills (MERP/Rolemaster-inspired)\\\n21 skill categories. Practice ranks by use + development ranks by spend. Maneuver roll resolution (d100 open-ended vs. difficulty). **Diminishing returns only** — no hard caps, but ranks become prohibitively expensive past a soft ceiling.\\\n\\\n### Medals & Honours (Torn City-inspired)\\\n**5 tiers** (Copper→Silver→Gold→Platinum→Dragon) across 10 categories, rare honours for exceptional feats, cosmetic titles, Hall of Fame leaderboards. Mostly cosmetic; small bounded permanent bonuses capped at **+10% per-effect-category**.\\\n\\\n---\\\n\\\n## Key Systems\\\n\\\n### Navigation (Hybrid Model)\\\n- **City**: District-based navigation (click to move). Fast, mobile-friendly.\\\n- **Dungeons**: Room-by-room exploration with minimap. Immersive.\\\n- **Night travel**: Random encounter chance when moving between districts at night.\\\n- **Offshore travel**: Ship from Harbor, **1-4 hour real-time trips**, risk of encounters.\\\n\\\n### Party System\\\n- **Parties**: **2-6 players** (expanded from BT1's 6 characters per player). Front/back rank combat.\\\n- **LFG Board**: At Adventurers' Guild. Post/apply for dungeon groups.\\\n- **Mercenary NPCs**: Hire from inn to fill empty slots. Cost gold. Lower stats than players.\\\n- **Guild Raids**: **6+ players** (scalable). Instanced dungeons. Weekly lockout. Best loot.\\\n- **Group bonuses**: +10% XP per party member (up to +50% for party of 6).\\\n\\\n### Guilds + Clans (Separate Systems)\\\n- **Guilds**: Power/territory organizations. Hierarchy, guild hall, wars, alliances, taxation. One guild per player.\\\n- **Clans**: Economic cooperatives. Types: Trading Company, Mercenary Band, Crafting Cooperative, Exploration Society. One clan per player. Stack with guild membership.\\\n\\\n### Economy\\\n- Garth's Equipment Shoppe (NPC, basic gear, 40% buyback)\\\n- Player-driven bazaar + auction house\\\n- Bank (deposits, interest, loans)\\\n- Inn gambling (dice, cards, arm wrestling, shell game)\\\n- Player shops/stalls in Market Square\\\n- Merchant ventures (trading caravans, 24-hour returns)\\\n- Travel to offshore trade hubs (Free Ports)\\\n\\\n---\\\n\\\n## Art Direction (decided 2026-08-02)\\\n\\\n**Torn-style graphical browser UI.** The game mechanics are text/numbers (stats, combat formulas, economy); the presentation is a fully graphical web application — same model as Torn City.\\\n\\\n### What this means concretely\\\n- **Location panels**: illustrated backgrounds per district (tavern, market, dungeon entrance, etc.). Each district has a distinct visual identity.\\\n- **Item/equipment icons**: sprite-style icons for all items, gear quality indicators (border glow: Common→Legendary).\\\n- **Stat bars & HUD**: graphical health/energy/mana bars, XP progress bars, skill meters.\\\n- **Themed color scheme**: dark fantasy palette, per-district tinting (e.g. warm amber in the tavern district, cold blue-grey at the docks).\\\n- **Tab-based navigation**: Torn-style tab bar for quick access to core pages (City, Adventures, Combat, Inventory, Guild, etc.).\\\n- **Animations**: CSS transitions for page changes, stat updates, combat results. Not a canvas game — browser-native rendering via Vue components.\\\n\\\n### Art pipeline requirements\\\n- **Location art**: digital illustrations (can be sourced or commissioned). Need ~11 district illustrations + dungeon room tiles.\\\n- **Item icons**: sprite sheet or SVG icon set. Quality tiers indicated by color/border.\\\n- **UI components**: Vue component library with dark-fantasy theming. Stat bars, progress rings, tab navigation, modal dialogs, tooltips.\\\n- **No canvas/WebGL**: all rendering via HTML/CSS/SVG within Vue. Keeps it lightweight and PWA-compatible.\\\n\\\n---\\\n\\\n## Tech Stack Decision\\\n\\\n| Layer | Technology | Rationale |\\\n|---|---|---|\\\n| Backend | **Rust** + Axum + Tokio | Performance, type safety, fearless concurrency for game tick engine |\\\n| Database | PostgreSQL + SQLx | ACID for game state. Redis deferred for MVP. |\\\n| Real-time | WebSocket (tokio-tungstenite) | Live combat, chat, notifications |\\\n| Auth | JWT + Argon2 | Stateless auth, API-friendly |\\\n| Frontend | **Vue 3 SPA** + Vite + Pinia | Reactive UI, composable patterns. Plain SPA (no SSR — game is behind auth; public pages can be generated separately). |\\\n| Mobile | PWA via Vite plugin | Single codebase, native-like experience |\\\n| Deploy | **systemd** + Caddy | Bare services (no Docker); Caddy for automatic HTTPS |\\\n\\\n### Hosting (resolved 2026-08-02 — self-hosted, no Docker)\\\n\\\nDecision: **self-host across three existing machines**, bare systemd services, no containers. Full details in [Development Environment & Server Topology](joplin://bbc49a3bbada4fcdb8fedc66abf5014e); deployment mapping in [Tech Stack & Architecture § Deployment Topology](joplin://980c3eb587294e4383474b94988f2f88).\\\n\\\n| Tier | Machine | What runs here |\\\n|---|---|---|\\\n| **Develop** | workhorse (Ubuntu, Ryzen 9 5950X 16C/32T, RTX 5060 Ti) | Kilo + RustRover/WebStorm; local PG (native package); `cargo run` + Vite |\\\n| **Test / Stage** | basement server (FreeBSD, LAN-only) | **Jenkins** CI; a **bhyve Debian VM** mirrors prod (systemd PG + app binary). File server + artifact store. |\\\n| **Produce / Git** | Hetzner box (Debian, public) | **Forgejo** (primary git, public + private repos) + bare **systemd** game services (PG + app binary) + **Caddy** (TLS). Planned **Codeberg** mirror. |\\\n\\\n---\\\n\\\n## Repository Structure\\\n\\\n### Decision: Multi-Repo with Bilingual Common\\\n\\\nThree repos, kept as **siblings under one parent folder** (the parent is a plain folder, not a git repo). The backend opens in **RustRover**, the frontend in **WebStorm**, the shared repo in a third window (or \\\"Attach\\\"ed in either IDE). Full rationale & codegen strategy in [Tech Stack & Architecture](joplin://980c3eb587294e4383474b94988f2f88).\\\n\\\n> Workspace root: `~/Development/<project>/`. See [Development Environment & Server Topology § Workspace & Repository Layout](joplin://bbc49a3bbada4fcdb8fedc66abf5014e). Legacy repos in per-IDE default folders (`~/RustroverProjects`, `~/WebstormProjects`, `~/IdeaProjects`) are symlinked for IDE discoverability.\\\n\\\n```\\\n~/Development/skara-brae/            # workspace root (plain folder, NOT a git repo)\\\n├── skara-brae-server/             # Rust backend (Axum) — opened in RustRover\\\n│   ├── crates/\\\n│   │   ├── sb-api/                # HTTP + WebSocket server\\\n│   │   ├── sb-core/               # Game engine (combat, crit tables, skills, spells, pets, crafting)\\\n│   │   ├── sb-db/                 # Database layer (SQLx + PostgreSQL)\\\n│   │   ├── sb-auth/               # JWT + Argon2 authentication\\\n│   │   └── sb-shared/             # Server-INTERNAL shared types, errors, constants (stays here)\\\n│   ├── migrations/\\\n│   ├── Cargo.toml                 # sb-common = { path = \\\"../skara-brae-common/rust\\\" }\\\n│   └── systemd/                   # .service unit files for deployment\\\n├── skara-brae-client/             # Vue 3 frontend — opened in WebStorm\\\n│   ├── src/\\\n│   └── package.json               # \\\"@skara-brae/common\\\": \\\"file:../skara-brae-common/ts\\\"\\\n└── skara-brae-common/             # Cross-language shared repo (bilingual package)\\\n    ├── data/                      # items/ adventures/ crit-tables/ spells/ recipes/\\\n    │   └── schema/                #   medals/ dungeons/ tower/ expeditions/ (*.json/*.toml)\\\n    │                              #   JSON Schema (entities) + openapi.yaml (API contract)\\\n    ├── rust/                      # thin crate \\\"sb-common\\\" (include_str! + serde) — server depends on it\\\n    ├── ts/                        # thin package \\\"@skara-brae/common\\\" (generated types + data) — client depends on it\\\n    └── codegen/                   # data/ + schema  →  rust/ and ts/ bindings\\\n```\\\n\\\n**Consumption rules:**\\\n- **Static game data** (`data/`) is the single source of truth; consumed at build time (Rust `include_str!` + `serde`; Vue Vite import). Auto-generates client tooltips *and* a community wiki.\\\n- **API contract** is **server-authoritative** — OpenAPI via `utoipa` → client TS types via `openapi-typescript`. No hand-duplicated API types.\\\n- **Entity types** defined once as JSON Schema → generated into both Rust (`typify`/`schemars`) and TS (`json-schema-to-typescript`).\\\n- `sb-shared` (server-internal Rust) ≠ `skara-brae-common` (cross-language). Don't confuse them.\\\n- **Alternative for self-contained CI**: git submodule of common inside both repos. Start with sibling + path; switch to submodules only if contributors/CI demand it.\\\n\\\n### Cross-language dependency path workaround\\\n\\\nCargo workspaces cannot resolve dependency paths above the workspace root. The `sb-common = { path = \\\"../skara-brae-common/rust\\\" }` syntax fails at the workspace level. Current workaround: use an **absolute path** in each crate's `Cargo.toml`:\\\n\\\n```toml\\\n# In crates/sb-api/Cargo.toml and crates/sb-core/Cargo.toml:\\\nsb-common = { path = \\\"/home/jan/Development/skara-brae/skara-brae-common/rust\\\" }\\\n```\\\n\\\n**This needs a portable solution before CI/CD** — the plan is to switch to **git submodules** (`server/common/`, `client/common/`) when self-contained CI is needed. For local solo work, the absolute path is functional.\\\n\\\n---\\\n\\\n## Monetization (decided 2026-08-02)\\\n\\\n**Patron tiers with quality-of-life perks only.** No pay-to-win, no stat boosts, no combat advantages for paying players.\\\n\\\n- **Free tier**: full game access, all content, all mechanics. Energy refills at normal rate, limited offline adventure slots.\\\n- **Patron tiers** (monthly): QoL perks only — extra energy, more offline adventure slots, reduced cooldowns, cosmetic titles/borders, priority matchmaking.\\\n- No loot boxes, no gacha for power items, no stat purchasable with real money.\\\n- Community wiki and API access remain free and unrestricted.\\\n\\\n---\\\n\\\n## Game Clock (decided 2026-08-02)\\\n\\\n**4 real hours = 1 in-game day.** (6 game days per real day.)\\\n\\\n- Day/night cycle: each game day has daytime and nighttime phases.\\\n- Offline adventures cap at **1 game day** (4 real hours) per session.\\\n- Travel to offshore: 1-4 real hours.\\\n- Blessings, worker contracts, and other timed effects measured in game-time units.\\\n\\\n---\\\n\\\n## Workspace Status (2026-08-02)\\\n\\\nAll three repos are initialized locally, committed, and symlinks to IDE dirs created:\\\n\\\n| Repo | Path | Git status | IDE symlink |\\\n|---|---|---|---|\\\n| skara-brae-server | `~/Development/skara-brae/skara-brae-server/` | Committed (5 crates, `cargo check` passes, health endpoint) | `~/RustroverProjects/skara-brae-server` |\\\n| skara-brae-client | `~/Development/skara-brae/skara-brae-client/` | Committed (Vue 3 + Vite + Pinia scaffolded via create-vite) | `~/WebstormProjects/skara-brae-client` |\\\n| skara-brae-common | `~/Development/skara-brae/skara-brae-common/` | Committed (data/items/weapons.json, rust crate sb-common, ts package @skara-brae/common) | — |\\\n\\\n**Remote:** No remote configured yet. Next step: create bare repos on the basement server (192.168.1.2) and/or push to Codeberg as temporary remote. When Hetzner Forgejo is stood up, migrate there.\\\n\\\n---\\\n\\\n## MVP Scope (Phase 1)\\\n\\\n1. User registration, authentication, character creation (6 races, 8 classes)\\\n2. Basic stat/skill system with training (BIGINT stats, 21 skill categories, practice+development ranks, diminishing returns)\\\n3. Adventure system (5-10 adventures across difficulty tiers)\\\n4. Turn-based combat engine with RoleMaster-inspired crit tables\\\n5. Basic economy: Garth's Shoppe (NPC), bazaar (player), bank\\\n6. Guild creation and membership (basic hierarchy)\\\n7. Party system (2-6 players + NPC mercenaries)\\\n8. The Adventurers' Guild (Review Board — leveling, basic spell learning, free school switching)\\\n9. REST API + basic **Torn-style graphical Vue.js frontend** (location panels, item icons, stat bars, themed UI)\\\n10. Real-time notifications via WebSocket\\\n11. Offline adventure rewards collection (max 4 hours / 1 game day)\\\n12. Basic crafting (2-3 professions: blacksmithing, alchemy, cooking)\\\n13. Medal tracking infrastructure (counters + a few combat/adventure medals)\\\n\\\n---\\\n\\\n## Roadmap\\\n\\\n- **Phase 2**: PvP arena, guild wars + territory, properties, education system, pets, blessings, clan system, **full skill category system + maneuver resolution**, **spell lists (per realm)**, **full medals + honours + titles (with locked-title-with-requirement UX)**, **Construction skill + town Buildings meta**, **Expeditions (gathering → lore notes → unlock dungeons)**, **Fortune's Favor pity system (pity after 20 dry pulls)**, **XP lamps**, **gear scoring / recommended-power indicator**\\\n- **Phase 3**: Full 5-act storyline, dynamic world events, day/night cycle, inn workers, slayer tasks, offshore travel, **Hall of Fame leaderboards**, hidden medals, seasonal honours, **Infinite Tower (endless scaling PvE + floor milestones)**, **Carnival (seasonal traveling event with ticket economy)**, **queue slots (parallel offline sessions)**\\\n- **Phase 4**: Mobile app (Capacitor), merchant ventures, advanced crafting (all 12 professions), pet breeding, inn gambling, spell scrolls/wands/runes crafting\\\n- **Phase 5**: Community API, mod support, tournament system, **guild raids (6+ players) + raid-boss roster**\\\n\\\n---\\\n\\\n## Open Questions — Deferred to Design Phase\\\n\\\nThe following tuning questions are **deferred** until playtest data is available. Ranges are set; exact numbers locked during design/implementation.\\\n\\\n- [ ] Blessing tuning: duration ranges, effect scaling, cooldown between blessings\\\n- [ ] Worker pricing: gold-per-hour rates for hireable inn workers\\\n- [ ] **Stat bonus curve**: exact `stat_bonus()` log function shape for skill system\\\n- [ ] **Infinite Tower**: floor milestone reward shape — permanent but bounded? Cap on stacked bonuses?\\\n- [ ] **Expeditions**: confirm 2 tiers per gathering skill? Which 5 gathering skills get expeditions first?\\\n- [ ] **Buildings meta**: confirm the building roster + tier ceilings (0–3)? Tie each to which district?\\\n- [ ] **Carnival**: ticket economy tuning, minigame roster, visit duration\\\n\\\n---\\\n\\\n## Decisions Log (resolved 2026-08-02)\\\n\\\n| Question | Decision |\\\n|---|---|\\\n| Art style / visual direction | **Torn-style graphical UI** — illustrated location panels, item icons, stat bars, themed color scheme. HTML/CSS/SVG in Vue, no canvas. Art pipeline needed. |\\\n| SPA vs SSR | **Plain Vue SPA** — no Nuxt. Game is behind auth; public pages generated separately. |\\\n| Workspace root | **`~/Development/<project>/`** — matches existing `~/Development/poker/`. Legacy IDE dirs symlinked. |\\\n| Game clock | **4 real hours = 1 game day** |\\\n| Party size | **2-6 players** + NPC mercenaries |\\\n| Raid size | **6+ players** (scalable) |\\\n| Medal tiers | **5 tiers**: Copper → Silver → Gold → Platinum → Dragon |\\\n| PP vs mana | **Unified Power Points** — no separate mana |\\\n| Spell school switching | **Free at Review Board** |\\\n| Rank caps | **Diminishing returns only** — no hard cap, no DP-scarcity cap |\\\n| Archmage bonus | **Cosmetic title only** |\\\n| Honour bonus cap | **+10% per-effect-category collective cap** |\\\n| Offline session max | **4 hours (1 game day)** |\\\n| Carnival | **Seasonal traveling event** |\\\n| Offshore travel time | **1-4 hours real time** |\\\n| Fortune's Favor pity | **Pity after 20 dry pulls** |\\\n| Monetization | **Patron tiers (QoL only)** — no pay-to-win |\\\n| Hosting | **Self-hosted, no Docker** — systemd services |\\\n| Infra | **Dev on workhorse, CI/staging on basement, git+prod on Hetzner (Forgejo)** |\\\n| Cargo sibling dep path | **Absolute path** (`/home/jan/Development/...`) as local workaround; git submodule for CI |\\\n\\\n---\\\n\\\n## Resolved Questions (from earlier sessions)\\\n\\\n- [x] ~~Rebirth/prestige system~~ → **Deferred**: stats only go up for now\\\n- [x] ~~Monorepo vs multi-repo~~ → **Multi-repo**: server, client, common\\\n- [x] ~~Game data location~~ → **skara-brae-common repo**\\\n- [x] ~~Map system~~ → **Hybrid**: district nav for city, room-by-room for dungeons\\\n- [x] ~~Guilds vs clans~~ → **Both**: guilds (power/territory) + clans (economic), one of each per player\\\n- [x] ~~Skill system depth~~ → **MERP/Rolemaster-inspired**: 21 categories, practice+dev ranks, maneuver rolls\\\n- [x] ~~Magic system~~ → **Spell lists per realm** (open/closed/base), unified Power Points, free school switching\\\n- [x] ~~Achievements~~ → **Torn-style medals & honours**: 5 tiers (Copper→Dragon), rare honours, titles, HOF\\\n- [x] ~~Shared-repo consumption~~ → **Sibling bilingual package**: language-neutral `data/` + schema, build-time codegen\\\n- [x] ~~Construction skill~~ → **Make it real**: backbone of the town Buildings meta\\\n- [x] ~~Hosting infrastructure~~ → **Self-hosted, no Docker**\"],[1,\"Active Development (Phase 1 — Core Mechanics)\\\n\\\n## Summary\\\n\\\nA fantasy idle RPG inspired by **The Bard's Tale 1** (setting, items, enemies, spells, bard songs) with **Torn City** UI/economy patterns and a **RoleMaster-inspired** open-ended d100 combat system. Currently running as a functional prototype with in-memory state.\\\n\\\n### What Each Source Contributes\\\n\\\n| Source | Primary Contribution |\\\n|---|---|\\\n| **Bard's Tale 1** | All 127 items, 125 enemies, 79 spells (4 caster classes × 7 levels), 6 bard songs, Skara Brae overworld + 16 dungeon levels, BT1 dungeon structure (Cellar→Sewers→Catacombs→Harkyn's→Kylearan's→Mangar's Tower) |\\\n| **RoleMaster / MERP** | Open-ended d100 combat rolls, critical hit tables (slash/crush/puncture × A-D), OB/DB system, stat_bonus formula |\\\n| **Torn City** | UI layout (sidebar + main content), shop with buy/sell economy, gold display, energy/nerve resource system, Torn-style graphical browser UI |\\\n| **Idle Fantasy** | Offline adventure sessions (planned, not yet implemented) |\\\n\\\n---\\\n\\\n## What's Built (2026-08-02)\\\n\\\n### Backend (Rust + Axum)\\\n- **127 authentic BT1 items** across 3 JSON files (weapons, armor, accessories) with original gold values\\\n- **125 enemies** (BT1 bestiary — all tiers from Kobold to Mangar)\\\n- **79 spells** (Conjurer 22, Magician 22, Sorcerer 22, Wizard 13) with spell point costs\\\n- **6 bard songs** with combat effects (accuracy, defense, heal, weaken, damage, magic_resist)\\\n- **10 classes**: Warrior, Paladin, Rogue, Bard, Hunter, Monk, Mage, Wizard, Conjurer, Sorcerer\\\n- **5 races**: Human, Elf, Dwarf, Hobbit, HalfElf\\\n- **11 equipment slots**: head, body, off_hand, main_hand, hands, feet, back, neck, ring, trinket, instrument\\\n- **RoleMaster combat engine**: open-ended d100, OB/DB from stats+equipment, crit tables (slash/crush/puncture A-D)\\\n- **Song combat integration**: `resolve_combat_with_song()` applies buffs/debuffs during combat\\\n- **Shop economy**: `always_in_shop` flag (15 basic items always stocked), `shop_stock` HashMap tracks sold items, sell adds to stock, buy consumes it\\\n- **Item pricing**: BT1 gold values directly (sell = 50%)\\\n- **Active song system**: Bards can set one active song that affects combat\\\n- **Spell learning**: Spell level costs gold at Review Board (1000-20000), known_spells on Character\\\n- **Spell points**: `max_spell_points = spell_level * 10`, refills to max (regen system)\\\n- **Resource system**: Energy (gym), Nerve (adventures), HP — all regenerate over time\\\n- **Training Yard**: 5 themed grounds per stat, costs 1 energy per train, +1 stat\\\n- **Garth's Equipment Shoppe**: Buy/sell with stock management\\\n- **Temple**: Full heal costs 1 gold per HP\\\n- **Adventure system**: 5 zones with nerve cost + encounter tables\\\n- **Zones**: Streets, Catacombs, Sewers, Lower Dungeons, Mangar's Tower (need reorg to BT1 dungeon structure)\\\n- **Map data**: Skara Brae overworld (32 locations) + 16 dungeon levels saved as JSON\\\n- **In-memory state**: No database yet (all state lost on restart)\\\n- **Seeded users**: admin (id=1) + player (id=2)\\\n- **No auth**: No JWT/session system yet\\\n- **No database**: All state in `RwLock<Vec<T>>` in AppState\\\n\\\n### Client (Vue 3 + Vite)\\\n- **Torn-style layout**: top bar (logo + char tabs + account dropdown), left sidebar, main content\\\n- **Lucide icons** with emoji fallbacks\\\n- **Pages**: Home, Training Yard, Garth's, Temple, Inventory, Adventure, Songs (Bard only), Item Catalogue (admin only)\\\n- **Custom favicon**: SVG shield with sword in purple gradient\\\n- **Dynamic browser title**: `Skara Brae - {page label}`\\\n- **Shop stock filtering**: 3 dropdowns (type/quality/slot), computed property for filtered items\\\n- **Songs page**: List all 6 songs with Play/Stop, locked songs shown with level req\\\n- **Admin item catalogue**: Only visible to admin-role users\\\n- **Inventory management**: Equip/unequip via API\\\n- **Adventure combat log**: Round-by-round display\\\n- **Regen timers**: Energy +1/3min, Nerve +1/5min, HP +5%/5min\\\n\\\n---\\\n\\\n## Inconsistencies with Design Docs (to address)\\\n\\\n### Stats — Design says BIGINT/i64, Implementation uses i32\\\n- **Design**: Stats should be open-ended BIGINT, tiered display (K/M/B/T), exponentially growing\\\n- **Current**: `CharacterStats` uses `i32` for all stats. `Item.stats` uses `i64` for values\\\n- **Impact**: Can't grow beyond ~2 billion. Need to migrate to `i64` before exponential growth matters\\\n- **Priority**: Low for now (stats are small), but must fix before Phase 2 stat growth\\\n\\\n### Stats — Design says 6 stats, Implementation has 5\\\n- **Design**: Strength, Agility, Constitution, Intelligence, Wisdom, Charisma\\\n- **Current**: Strength, Intelligence, Dexterity, Constitution, Luck\\\n- **Decisions made**: Luck replaces Charisma + Wisdom (simplified). This is fine — \\\"Luck\\\" in our game serves both Wisdom's perception role and Charisma's luck\\\n- **To revisit**: When adding blessings/cleric spells that reference Wisdom, may need to split Luck into Wisdom + Luck\\\n\\\n### Races — Design says 6, Implementation has 5\\\n- **Design**: Human, Dwarf, Elf, Halfling, Half-Orc, Half-Elf\\\n- **Current**: Human, Elf, Dwarf, Hobbit, HalfElf\\\n- **Note**: \\\"Hobbit\\\" in our code = \\\"Halfling\\\" in BT1 (same race, different name)\\\n\\\n### Classes — Design says 8, Implementation has 10\\\n- **Design**: Warrior, Rogue, Mage, Bard, Cleric, Ranger, Paladin, Monk\\\n- **Current**: Warrior, Paladin, Rogue, Bard, Hunter, Monk, Mage, Wizard, Conjurer, Sorcerer\\\n- **Rationale**: BT1 has 4 spellcaster classes (Conjurer, Magician, Sorcerer, Wizard). Added Hunter as Fighter archetype. Cleric not added (BT1 uses temples for healing, not a class). Mage = generic caster. This matches BT1 better than the original plan\\\n- **Note**: \\\"Mage\\\" class is generic — in BT1, spellcasters switch between Conjurer/Magician/Sorcerer/Wizard\\\n\\\n### Combat — Design says BIGINT stats + Torn-style deterministic outcomes, Implementation uses RoleMaster open-ended\\\n- **Design**: \\\"Stats grow into hundreds of millions. Combat outcomes overwhelmingly deterministic.\\\"\\\n- **Implementation**: RoleMaster-style open-ended d100 rolls, OB/DB from stats, crit tables. A level 1 CAN beat a level 10 with lucky crits\\\n- **Decision**: This is intentional. The hybrid approach keeps combat exciting. Open-ended d100 rolls + the crit cap by level difference isn't implemented yet — full crit damage applies\\\n- **Need to add**: Crit damage cap by level difference (per design doc)\\\n\\\n### Crit Tables — Design has slash/crush/puncture × A-D, Implementation is correct\\\n- Matching the design. Tables loaded from `skara-brae-common/data/crit-tables/combat.json`\\\n\\\n### Crit Level-Difference Caps — Not implemented yet\\\n- Design: Level +10 = 60% HP cap, +20 = 40%, etc.\\\n- Current: No cap\\\n- **Must add before**: Higher-level enemies become unkillable by low-level players with lucky crits\\\n\\\n### Dungeons — Design says district nav + room-by-room, Implementation is zone-based\\\n- Design: City = district click, dungeons = room-by-room exploration with minimap\\\n- Current: Dungeons are abstract \\\"zones\\\" (click adventure → get combat log). No grid movement\\\n- Maps stored as JSON for future exploration mode. This is correct — add exploration as Phase 2\\\n\\\n### Spell Points — Design says \\\"Power Points\\\", Implementation uses \\\"Spell Points\\\" + `max_sp`\\\n- Same concept, different name. Fine.\\\n\\\n### Spell Leveling — Design: learn at Review Board every 3 char levels\\\n- **Design**: Characters learn new spell levels at Review Board at levels 3, 6, 9, 12, 15, 18, 21\\\n- **Current**: `spell_level = (char.level / 3) + 1`, matching the BT1 formula\\\n- **Implementation**: `learn_spell_level` POST endpoint deducts gold (1000-20000)\\\n- **Correct**: Matches BT1\\\n\\\n### Offline Adventures — Not implemented\\\n- Design: \\\"Adventures continue for up to 1 hour while logged out\\\"\\\n- Current: Adventures are instant — click → combat log → done\\\n- **Planned**: Phase 2\\\n\\\n### Party System — Design says 2-6 players, Implementation is single-player\\\n- Current: 1 character per adventure. No party system\\\n- **Planned**: Phase 3 (PvP arena first), then guild raids\\\n\\\n### Database — Design says PostgreSQL, Implementation uses in-memory RwLock\\\n- Current: All state lost on restart. `sb-db` and `sb-auth` crates are empty scaffolds\\\n- **Planned**: When persistence matters (Phase 2)\\\n\\\n### Auth — Design says JWT, Implementation has seeded admin/player\\\n- No auth middleware. Just URL-based user selection\\\n- **Planned**: Phase 2\\\n\\\n### Items — Design says 12 crafting professions' worth, Implementation has BT1 items only\\\n- BT1 items are comprehensive for combat gear. Need crafting materials/components for crafting system\\\n- **Planned**: Phase 4\\\n\\\n### Maps — Stored as JSON, ready for exploration mode\\\n- Skara Brae overworld (32 locations), 16 dungeon levels with special squares\\\n- **Planned**: Exploration mode in Phase 2\\\n\\\n### Bard Songs — Fully implemented with combat integration\\\n- 6 songs, 4 level gates, active song affects combat via resolve_combat_with_song()\\\n\\\n### Spells — Data loaded, API endpoints created\\\n- GET/POST `/api/characters/{id}/spells` — list available + learn new levels\\\n- `known_spells` on Character, spell_points system\\\n- **Not yet in client UI** — no Spells page in the sidebar yet\\\n- **Not integrated into combat** — spells don't apply in adventure combat yet\\\n\\\n---\\\n\\\n## Next Priority Items\\\n\\\n1. **Add Spells page to client** — sidebar item for caster classes\\\n2. **Integrate spell casting into combat** — spell effects in adventure combat\\\n3. **Add crit damage cap by level difference** — per design doc, prevents low-level lucky crits from one-shotting high-level enemies\\\n4. **Reorganize zones to match BT1 dungeon structure** — Cellar, Sewers 1-3, Catacombs 1-3, Harkyn's 1-3, Kylearan's Tower, Mangar's Tower 1-5\\\n5. **Stat migration path i32 → i64** — before exponential growth\\\n6. **Database persistence** — before state worth keeping\\\n7. **Leveling system** — XP accumulates but level never increases currently\\\n\\\n---\\\n\\\n## Tech Stack & Deployment\\\n\\\n- Backend: Rust (Axum 0.8, edition 2024) on :8080\\\n- Client: Vue 3 + Vite on :5173 (proxied to :8080)\\\n- In-memory state (no database yet)\\\n- Seeded users: admin (id=1), player (id=2)\\\n- Data: skara-brae-common/data/ (items, enemies, spells, crit-tables, maps, zones)\\\n\\\n## Server BGP\\\n- `bgp_fc3d3d233001yrCfkGsbijEAch` on `:8080`\\\n\\\n## Decisions Log\\\n\\\n| Question | Decision | Rationale |\\\n|---|---|---|\\\n| Stats type | i32 for now, plan i64 migration | MVP stats are small; BIGINT needed before exponential growth |\\\n| Stat count | 5: STR/INT/DEX/CON/LUK | Luck replaces both Wisdom and Charisma |\\\n| Race count | 5 of 6 designed races | Half-Orc deferred (controversial fantasy race) |\\\n| Class count | 10 of 8 designed classes | BT1 spellcaster split (4 classes vs 1 Mage), added Hunter |\\\n| Cleric class | Not added | Temples handle healing, not a class |\\\n| Combat model | RoleMaster hybrid | Open-ended d100, crit tables, OB/DB — not pure Torn deterministic |\\\n| Item pricing | BT1 gold values | Authentic to source material |\\\n| Shop stock model | `always_in_shop` + sold items | Torn-style player-driven economy |\\\n| Stat bonus formula | `(stat - 20) / 2` | Rolemaster-derived |\\\n| Off-hand slot | Shared between shields and bracers | BT1 has both types as off-hand gear |\\\n| Instrument slot | Separate from trinket | Bards need equip slot for songs |\\\n\"]],\"start1\":36,\"start2\":36,\"length1\":22964,\"length2\":11229}]"
metadata_diff: {"new":{},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2026-08-02T19:00:00.773Z
created_time: 2026-08-02T19:00:00.773Z
is_locked: 0
type_: 13