Files
stefwill 5e83fe1ef2 feat: full character creation, personality traits, and session quality-of-life
Character creation:
- Full RQ3 Previous Experience wizard (4-step: identity, characteristics,
  culture/occupation/skills, review+save) with all 29 occupations across
  4 cultures; skills computed as base + category modifier + years × multiplier
- Character sheet expanded to show culture, occupation, derived stats (HP/FP/MP/
  DB/SR), all 7 skill category modifier badges, computed skill percentages grouped
  by category, weapon attack/parry %, hit locations with armour AP
- Location/destination tracker on character sheet (auto-saves on blur)
- parry_percent stored on combatant_weapons

Personality traits:
- 24 predefined traits (Brave, Greedy, Cautious, etc.) each rated 0-100%
- Trait → action bias map drives scene choice weighting
- rollPersonalityAction() rolls d100 per trait, sums biases, returns suggestion
- Trait editor (pill UI) on both character sheet and NPC view
- Adventure tab: Roll Personality button fires traits, highlights suggested choice

Tables and data:
- Import RQ3 character creation tables (Culture d8, Occupation d100 ×4, Craft
  sub-tables, Language Proficiency, Dropped Oil Lamp, Aging, Armor Points)
- Cross-table links: Culture → Occupation, Barbarian/Civilized Crafter → Craft
- Fix rollOnTable to use actual dice notation instead of flat random row index
- Remove unused resolveHeadInjury function

Session tools:
- Clear All button wipes all session data (characters, NPCs, enemies, combat,
  adventure, log) while keeping tables and spell mappings
- PATCH /api/characters/:id/traits and /api/npcs/:id/traits endpoints
- GET /api/rules/personality-traits reference endpoint
- POST /api/adventure/personality-roll endpoint
2026-07-03 21:44:11 +10:00

60 lines
2.0 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>RQ3 Story Tool</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header class="app-header">
<h1>RQ3 Story Tool</h1>
<div class="header-actions">
<label class="button" for="import-file">Import</label>
<input type="file" id="import-file" accept="application/json" hidden>
<button id="export-all-btn" class="button">Export All</button>
<button id="export-log-btn" class="button">Export Log</button>
<button id="clear-all-btn" class="button" style="color:red">Clear All</button>
</div>
</header>
<div class="layout">
<aside class="sidebar">
<nav class="view-tabs">
<button class="tab-btn" data-view="tables">Tables</button>
<button class="tab-btn" data-view="npcs">NPCs</button>
<button class="tab-btn" data-view="enemies">Enemies</button>
<button class="tab-btn" data-view="combat">Combat</button>
<button class="tab-btn" data-view="characters">Characters</button>
<button class="tab-btn" data-view="adventure">Adventure</button>
</nav>
<div id="sidebar-content"></div>
</aside>
<main id="main-panel"></main>
<aside class="log-panel">
<h2>Session Log</h2>
<input type="search" id="log-search" placeholder="Search log...">
<div class="note-entry">
<textarea id="note-input" placeholder="Add a note..."></textarea>
<button id="note-submit" class="button">Add Note</button>
</div>
<div id="log-entries"></div>
</aside>
</div>
<div id="export-reminder-modal" class="modal hidden">
<div class="modal-box">
<p>You have unsaved changes. Export before leaving?</p>
<button id="reminder-export" class="button">Export Now</button>
<button id="reminder-leave" class="button">Leave Anyway</button>
<button id="reminder-cancel" class="button">Cancel</button>
</div>
</div>
<script src="vendor/marked.umd.js"></script>
<script src="app.js"></script>
</body>
</html>