# KQVI Chart Overhaul - TODO List ## Overview Complete overhaul of the King's Quest VI puzzle dependency chart based on comprehensive feedback. Multiple parallel workstreams. --- ## 1. SVG Rendering Automation ✅ - [x] **1a: Research mdbook-mermaid or mermaid-cli integration** - Determined best approach: build.sh wrapper script with mermaid-cli - [x] **1b: Update book.toml with build configuration** - Created build.sh and scripts/render-mermaid.sh - [x] **1c: Create build script if needed** - Script converts kings-quest-vi-chart.mmd → kings-quest-vi-chart.svg - [x] **1d: Test render pipeline** - `mdbook build` (run ./build.sh) generates SVG correctly --- ## 2. Remove Pawn Shop Trade Mechanics ✅ - [x] **2a: Analyze current pawn shop representation** - Identified trade chain: Nightingale → Flute → Tinderbox → Paintbrush - [x] **2b: Simplify to unlock representation** - Removed sequential trade nodes (A_TRADE_WITH_BROKER_N, etc.) - All 6 items now connect directly from A_TALK_TO_PAWN_BROKER - Removed dashed lines for trades - [x] **2c: Update markdown documentation** - Simplified "Locked Choice Mechanic" section --- ## 3. Cleanup Pass ✅ (Partially Complete) ### 3a. Unlock Strategy for Jumbled Lines ⚠️ - [x] **3a.1: Identify crossing patterns** - Consequence nodes (C1-C10) already serve as gateway abstractions - [ ] **3a.2: Create UNLOCK gateway nodes** - Not fully implemented - Would require significant restructuring - [ ] **3a.3: Route connections through gateway nodes** - Deferred ### 3b. Fan-Out Layout Organization ⚠️ - [x] **3b.1: Restructure top-to-bottom flow** - Basic flow maintained: START → Crown → Islands → End - [ ] **3b.2: Parallel island layout** - Not fully implemented - Islands still follow sequential progression in some areas - [ ] **3b.3: Verify natural reading order** - Needs verification ### 3c. Repeat Areas with Color Coding ✅ - [x] **3c.1: Implement fixed index-based color palette** ``` Palette (index-based): 0: #FFFFFF (white - default/ungrouped) 1: #E3F2FD (light blue - Isle of Crown) 2: #FFF3E0 (light orange - Isle of Wonder) 3: #F3E5F5 (light purple - Isle of Beast) 4: #E8F5E9 (light green - Isle of Mists) 5: #FFF8E1 (light amber - Sacred Mountain) 6: #FCE4EC (light pink - Druid Island) 7: #E0F7FA (light cyan - Realm of Dead) 8: #F5F5F5 (light grey - Village) ``` - [x] **3c.2: Allow same area to appear multiple times** - Palette documented for future use - [x] **3c.3: Document palette in chart header** - Added as comments in .mmd file (lines 19-30) ### 3d. Bigger Area Titles ✅ - [x] **3d.1: Increase subgraph header font size** - Added styling to Final Confrontation subgraph: font-size: 18px ### 3e. Only START and END Outside Groupings ✅ - [x] **3e.1: Audit all nodes** - Only START and END are outside subgraphs - [x] **3e.2: Move orphans into appropriate groupings** --- ## 4. Fix Disconnected/Siloed Nodes ✅ (CRITICAL) - [x] **4a: Systematically audit every node** - Found and fixed 16 orphaned nodes - [x] **4b: Research walkthroughs for connection verification** - Verified connections against KQVI walkthroughs - [x] **4c: Fix all orphaned nodes** - Fixed: P_PROBLEM_BOILING_POOL, P_PROBLEM_DARK_L2, P_PROBLEM_STYX, P_PROBLEM_JOLLO_ROOM, A_GIVE_LAMP_REPLICA, O_RECEIVE_JOLLO_TRUST, A_SHOW_LETTER, A_CASSIMA_FIGHTS, O_SPELL_READY - 6 acceptable orphans remain (optional/narrative items) --- ## 5. Final Integration & Verification ✅ - [x] **5a: Run `mdbook build` successfully** - Build completes without errors - [x] **5b: Visual inspection of chart** - Layout is functional with proper groupings - [x] **5c: Commit all changes** --- ## Summary **Completed:** - SVG rendering automation via build.sh wrapper - Pawn shop trade mechanics simplified - Color palette documented for repeat areas - Bigger subgraph titles applied - START/END only non-grouped nodes - 16 orphaned nodes fixed **Known Limitations:** - Full fan-out parallel island layout not implemented (would require significant restructuring) - UNLOCK gateway nodes not created (consequence nodes C1-C10 serve similar purpose) - Some areas still follow sequential rather than parallel progression **Files Modified:** - `build.sh` - New build wrapper script - `scripts/render-mermaid.sh` - Mermaid rendering helper - `src/inspiration/kings-quest-vi-chart.mmd` - Chart source - `src/inspiration/kings-quest-vi-heir-today-gone-tomorrow.md` - Documentation **Build Command:** `./build.sh` (not `mdbook build`) --- ## 7. Fix Rare Book and Peppermint Orphans 🔧 ### 7a: Fix Rare Book orphan - [x] **7a.1: Add A_TRADE_RARE_BOOK_FOR_SPELL action** - [x] **7a.2: Add O_RECEIVE_SPELL_BOOK outcome** - [x] **7a.3: Connect O_RECEIVE_RARE_BOOK → A_TRADE_RARE_BOOK_FOR_SPELL → O_RECEIVE_SPELL_BOOK** - [x] **7a.4: Connect O_RECEIVE_SPELL_BOOK → A_CAST_PAINT_SPELL** ### 7b: Fix Peppermint orphan - [x] **7b.1: Add O_RECEIVE_PEPPERMINT → A_GIVE_MINT_GENIE edge** ### 7c: Rebuild and verify - [x] **7c.1: Run ./build.sh** - [ ] **7c.2: Commit fixes** --- ## 6. Gateway Process for Major Unlocks ✅ ### 6a: Analyze crossing patterns (5+ lines) - [x] **6a.1: Count outgoing lines from Magic Map** - Magic Map → enables IoW gnomes, IoB boiling pool, Sacred Mountain cliffs, Realm of Dead (4+ destinations) - [x] **6a.2: Count outgoing lines from trade items to gnome puzzles** - Nightingale, Mint, Rabbit Foot, Ink, Stinky Flower → all feed into Five Senses Gnomes - [x] **6a.3: Document other 5+ crossing points** - Consequence nodes C1-C10 already serve as gateway abstractions ### 6b: Create UNLOCK gateway nodes - [x] **6b.1: Create `UNLOCK_ISLAND_TRAVEL` gateway** - Place after O_RECEIVE_MAGIC_MAP - All island destinations route through this node - [x] **6b.2: Create `UNLOCK_GNOME_ACCESS` gateway** - Place where trade items converge for gnome puzzles - [x] **6b.3: Route connections through gateway nodes** ### 6c: Build dangling node detection script - [x] **6c.1: Create `scripts/check-dangling-nodes.sh`** - Parse .mmd mermaid file - Extract all nodes - Identify nodes with no incoming edges (except START) - Identify nodes with no outgoing edges (except END) - Identify nodes referenced but never defined - Output formatted report - [x] **6c.2: Test script on current mermaid file** - Found 31 orphan nodes, 45 dead-end nodes, 1 undefined reference - Fixed undefined reference: O_TRADE_COAL_FOR_EGG → A_TRADE_COAL_FOR_EGG ### 6d: Fix disconnected nodes - [x] **6d.1: Run detection script** - Found 5 real issues: O_RECEIVE_BEASTS_RING, P_PROBLEM_DARK_L2, A_SEARCH_BOOKSHELF, P_PROBLEM_CHARON, C4 - [x] **6d.2: Research walkthroughs for each issue** - Verified game flow for each orphan/dead-end - [x] **6d.3: Add appropriate edges** - Added 5 edges to fix real issues - [x] **6d.4: Remaining 23 dead-ends are false positives** - These are legitimate terminal states (parallel collectibles that feed into multi-source problem nodes) --- ## Build Command `./build.sh` (not `mdbook build`)