Skara Brae — Project Plan

# Skara Brae — Project Plan

## Status: Concept Phase

## Summary

A 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+.

### What Each Source Primarily Contributes

| Source | Primary Contribution |
|---|---|
| **Bard's Tale I** | Setting (Skara Brae), Review Board (leveling/spells), party system, dungeon progression, Mangar antagonist, spell schools, bard songs |
| **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 |
| **Idle Fantasy** | Offline sessions, hireable workers, pets, guild rank progression, blessings, slayer tasks, daily/cumulative quests |
| **Torn City** | Crime→adventure loop, billions-scale stats, economy, factions→guilds, companies→clans, properties, education, casino→gambling, travel, seasonal events, **honours/awards→medals & honours** |

---

## Research Completed

- Analyzed Torn City (torn.com): text-based crime MMORPG running since 2004, millions of users
- Key Torn mechanics: crimes, PvP, factions, companies, properties, stock market, education, bounties, item market, casino, racing, travel, honours/awards
- Torn evolution: Crimes 2.0 (2023), real-time features, mobile apps, rich REST API with community tools
- Analyzed Idle Fantasy (github.com/tristinbaker/IdleFantasy): open-source idle RPG, 23 skills, offline sessions, guild rank progression, pets, inn workers, blessings, slayer tasks
- 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
- 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
- Designed hybrid combat system: Torn-scale exponential stat growth + RoleMaster-inspired open-ended d100 crit tables with level-difference caps
- Designed MERP/Rolemaster-inspired skill & magic system: 21 skill categories, practice+development rank hybrid, maneuver roll resolution, per-realm spell lists
- Designed Torn City-inspired medals & honours system: tiered medals, rare honours, titles, Hall of Fame
- Created comprehensive mechanics source mapping (BT1 + RM + IF + Torn → Skara Brae)

---

## Design Documents (Joplin Notes)

| Note | ID | Content |
|---|---|---|
| [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 |
| [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. |
| [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 |
| [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.** |
| [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.** |
| [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 |
| [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 |
| [Tech Stack & Architecture](joplin://980c3eb587294e4383474b94988f2f88) | `980c3eb587294e4383474b94988f2f88` | Rust workspace (Axum, SQLx, Redis, JWT), Vue 3 frontend, multi-repo structure, database schema, crate dependencies |
| [Project Plan](joplin://088737f31c514f1da21cc42c0ab6acc1) | `088737f31c514f1da21cc42c0ab6acc1` | This document — roadmap, MVP scope, repository structure |

---

## Character System Summary

### Races (6 — Conservative)
Human, Dwarf, Elf, Halfling, Half-Orc, Half-Elf

### Classes (8 — Conservative)
Warrior, Rogue, Mage, Bard, Cleric, Ranger, Paladin, Monk

### Spell Schools (Mage only, BT1-inspired)
Magician → Conjurer → Sorcerer → Wizard. Switch at Review Board. Master all four = Archmage.

### Magic Realms (RoleMaster-inspired)
Essence (mages), Channeling (clerics), Mentalism (bards/psionics)

### Skills (MERP/Rolemaster-inspired)
21 skill categories (Armor, Weapons, Athletic, Awareness, Body Dev, Combat Maneuvers, Craft, Gathering, Directed Spells, Influence, Lore, Magic Lore, Mental, Outdoor, Self Control, Special Attacks, Spells, Subterfuge, Technical/Trade, Urban). Practice ranks by use + development ranks by spend. Maneuver roll resolution (d100 open-ended vs. difficulty).

### Medals & Honours (Torn City-inspired)
Tiered medals (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.

---

## Key Systems

### Navigation (Hybrid Model)
- **City**: District-based navigation (click to move). Fast, mobile-friendly.
- **Dungeons**: Room-by-room exploration with minimap. Immersive.
- **Night travel**: Random encounter chance when moving between districts at night.
- **Offshore travel**: Ship from Harbor, 1-4 hour real-time trips, risk of encounters.

### Party System
- **Parties**: 2-4 players (not 6 characters per player like BT1). Front/back rank combat.
- **LFG Board**: At Adventurers' Guild. Post/apply for dungeon groups.
- **Mercenary NPCs**: Hire from inn to fill empty slots. Cost gold. Lower stats than players.
- **Guild Raids**: 6-12 players. Instanced dungeons. Weekly lockout. Best loot.
- **Group bonuses**: +10% XP per party member (up to +30% for party of 4).

### Guilds + Clans (Separate Systems)
- **Guilds**: Power/territory organizations. Hierarchy, guild hall, wars, alliances, taxation. One guild per player.
- **Clans**: Economic cooperatives. Types: Trading Company, Mercenary Band, Crafting Cooperative, Exploration Society. One clan per player. Stack with guild membership.

### Economy
- Garth's Equipment Shoppe (NPC, basic gear, 40% buyback)
- Player-driven bazaar + auction house
- Bank (deposits, interest, loans)
- Inn gambling (dice, cards, arm wrestling, shell game)
- Player shops/stalls in Market Square
- Merchant ventures (trading caravans, 24-hour returns)
- Travel to offshore trade hubs (Free Ports)

---

## Tech Stack Decision

| Layer | Technology | Rationale |
|---|---|---|
| Backend | **Rust** + Axum + Tokio | Performance, type safety, fearless concurrency for game tick engine |
| Database | PostgreSQL + SQLx + Redis | ACID for game state, Redis for cache/sessions/leaderboards |
| Real-time | WebSocket (tokio-tungstenite) | Live combat, chat, notifications |
| Auth | JWT + Argon2 | Stateless auth, API-friendly |
| Frontend | **Vue 3** + Vite + Pinia | Reactive UI, composable patterns for game state |
| Mobile | PWA via Vite plugin | Single codebase, native-like experience |
| Infra | Docker + Caddy | Simple deployment, automatic HTTPS |

---

## Repository Structure

### Decision: Multi-Repo with Common

```
github.com/{org}/
├── skara-brae-server/          # Rust backend (Axum)
│   ├── crates/
│   │   ├── sb-api/             # HTTP + WebSocket server
│   │   ├── sb-core/            # Game engine (combat, crit tables, skills, spells, pets, crafting)
│   │   ├── sb-db/              # Database layer (SQLx + PostgreSQL)
│   │   ├── sb-auth/            # JWT + Argon2 authentication
│   │   └── sb-shared/          # Server-internal shared types, errors, constants
│   ├── migrations/
│   ├── Cargo.toml
│   └── docker-compose.yml
├── skara-brae-client/          # Vue 3 frontend
│   ├── src/
│   └── package.json
└── skara-brae-common/          # Shared between client and server
    ├── game-data/              # Adventure templates, item defs, crit tables, spell lists, recipes, medal defs (JSON/TOML)
    ├── api-types/              # Shared API request/response type definitions
    └── constants/              # Game constants, formula parameters, stat caps
```

---

## MVP Scope (Phase 1)

1. User registration, authentication, character creation (6 races, 8 classes)
2. Basic stat/skill system with training (BIGINT stats, 21 skill categories, practice+development ranks)
3. Adventure system (5-10 adventures across difficulty tiers)
4. Turn-based combat engine with RoleMaster-inspired crit tables
5. Basic economy: Garth's Shoppe (NPC), bazaar (player), bank
6. Guild creation and membership (basic hierarchy)
7. Party system (2-4 players + NPC mercenaries)
8. The Adventurers' Guild (Review Board — leveling, basic spell learning)
9. REST API + basic Vue.js frontend
10. Real-time notifications via WebSocket
11. Offline adventure rewards collection
12. Basic crafting (2-3 professions: blacksmithing, alchemy, cooking)
13. Medal tracking infrastructure (counters + a few combat/adventure medals)

---

## Roadmap

- **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**
- **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
- **Phase 4**: Mobile app (Capacitor), merchant ventures, advanced crafting (all 12 professions), pet breeding, inn gambling, spell scrolls/wands/runes crafting
- **Phase 5**: Community API, mod support, tournament system, guild raids (6-12 players)

---

## Open Questions

- [ ] Art style / visual direction (text-only vs. illustrated UI elements)
- [ ] Game clock speed (how many real hours per game day? currently 4hr)
- [ ] Monetization specifics (patron tier pricing)
- [ ] Hosting infrastructure (self-hosted vs. cloud)
- [ ] Whether to use Nuxt (SSR) or plain Vue (SPA)
- [ ] Offline session balance: how long should adventures continue while logged out?
- [ ] Blessing tuning: duration ranges, effect scaling, cooldown between blessings
- [ ] Worker pricing: gold-per-hour rates for hireable inn workers
- [ ] Party size: 2-4 confirmed? Or allow up to 6?
- [ ] Raid size: 6? 12? For guild raid content.
- [ ] Travel time: 1-4 hours real time for offshore locations?
- [ ] Spell school switching: cooldown? Cost? Or free at Review Board?
- [ ] Archmage: cosmetic title only? Or gameplay bonus for mastering all schools?
- [ ] **Stat bonus curve**: exact `stat_bonus()` log function shape for skill system
- [ ] **Rank caps**: hard cap per skill or soft cap via DP scarcity?
- [ ] **PP vs mana**: unify into power points or keep both?
- [ ] **Medal tier count**: 5 (Copper→Dragon) or simplify to 4?
- [ ] **Honour bonus cap**: confirm +10% per-effect-category collective cap?
- [x] ~~Rebirth/prestige system~~ → **Deferred**: stats only go up for now
- [x] ~~Monorepo vs multi-repo~~ → **Multi-repo**: server, client, common
- [x] ~~Game data location~~ → **skara-brae-common repo**
- [x] ~~Map system~~ → **Hybrid**: district nav for city, room-by-room for dungeons
- [x] ~~Guilds vs clans~~ → **Both**: guilds (power/territory) + clans (economic), one of each per player
- [x] ~~Skill system depth~~ → **MERP/Rolemaster-inspired**: 21 categories, practice+dev ranks, maneuver rolls
- [x] ~~Magic system~~ → **Spell lists per realm** (open/closed/base), power points, ordered progression
- [x] ~~Achievements~~ → **Torn-style medals & honours**: tiered medals, rare honours, titles, HOF

id: 088737f31c514f1da21cc42c0ab6acc1
parent_id: d1892c7c531848f5a5a3ac5e1749f7cf
created_time: 2026-06-11T13:40:16.157Z
updated_time: 2026-06-13T08:39:16.644Z
is_conflict: 0
latitude: 0.00000000
longitude: 0.00000000
altitude: 0.0000
author: 
source_url: 
is_todo: 0
todo_due: 0
todo_completed: 0
source: joplin-desktop
source_application: net.cozic.joplin-desktop
application_data: 
order: 1781185216157
user_created_time: 2026-06-11T13:40:16.157Z
user_updated_time: 2026-06-13T08:39:16.644Z
encryption_cipher_text: 
encryption_applied: 0
markup_language: 1
is_shared: 0
share_id: 
conflict_original_id: 
master_key_id: 
user_data: 
deleted_time: 0
type_: 1