Save System
Last Updated: 2025-01-16
Primary Source: docs/project_status.md
Status: ❌ Not Implemented (Client Vision Exists)
Overview
The Save System enables players to save their game progress with personality-specific save slots, allowing them to experience different relationship paths with the same character through different personalities.
Client Vision
Personality-Based Save Slots
Concept: Each personality (Rational, Emotional, Rebellious) has its own save slots, allowing players to:
- Switch between personalities
- Experience different story paths
- Maintain separate progress per personality
- Share some memories across personalities (optional)
Save Interface Design
Features:
- Personality Compass (switching between personalities)
- Save slot grid (multiple saves per personality)
- Visual themes per personality:
- Rational: Mint green
- Emotional: Light pink
- Rebellious: Yellow
- Save metadata (timestamp, progress, thumbnail)
Implementation Requirements
Database Schema
New Tables Needed:
game_saves table
sql
CREATE TABLE game_saves (
id UUID PRIMARY KEY,
user_id INTEGER NOT NULL,
personality_type VARCHAR(50) NOT NULL, -- 'rational', 'emotional', 'rebellious'
slot_number INTEGER NOT NULL,
save_name VARCHAR(255),
save_data JSONB, -- Game state, progress, etc.
created_at TIMESTAMP,
updated_at TIMESTAMP,
UNIQUE(user_id, personality_type, slot_number)
);Save Data Structure
Format:
json
{
"questProgress": {
"questId": 123,
"status": "in_progress",
"progress": {}
},
"inventory": {
"items": [...],
"currency": 150
},
"relationshipFlags": {
"milestone": true
},
"timelinePosition": "2025-01-16T10:30:00Z",
"conversationHistory": [...]
}API Endpoints (Planned)
Save Management
GET /api/saves- Get all saves for userGET /api/saves/:personality- Get saves for specific personalityPOST /api/saves- Create new savePUT /api/saves/:id- Update saveDELETE /api/saves/:id- Delete savePOST /api/saves/:id/load- Load save
Integration Points
Personality System
- Saves linked to personality type
- Personality switching loads appropriate saves
- Cross-personality memory sharing (optional)
Game State
- Quest progress
- Inventory state
- Relationship flags
- Timeline position
- Conversation history
Implementation Roadmap
Phase 1: Database & Backend
- Create
game_savestable - Implement save/load service
- Create API endpoints
- Link to personality system
Phase 2: Frontend UI
- Build save interface (based on HTML mockup)
- Personality switching UI
- Save slot management
- Load save functionality
Phase 3: Integration
- Integrate with quest system
- Integrate with inventory system
- Integrate with relationship system
- Add save/load to game flow
Source Files
Primary Sources:
docs/project_status.md- System status
Related Files:
backend/src/services/personaOverlay.service.ts- Persona systembackend/src/models/gameSession.model.ts- Game session model (if exists)
Related Documentation
- Multi-Personality System - Personality system and save integration
- Quest System - Quest progress in saves
- Inventory System - Inventory state in saves
- Relationship Milestones - Relationship flags in saves
- 01-CLIENT-VISION-AND-ALIGNMENT.md - Alignment analysis and implementation roadmap
- 06-ARCHITECTURE/Database-Schema.md - Save system schema (planned)
- 00-OVERVIEW.md - Complete system overview