DiceTales

Better DM - Enhanced Campaign Management System

Overview

Better DM is an advanced AI-powered Dungeon Master system that maintains a clear, comprehensive campaign roadmap from the very first interaction. Unlike traditional AI DMs that generate content reactively, Better DM proactively plans entire campaigns and intelligently adapts them based on player actions while maintaining story coherence.

Key Features

🗺️ Campaign Roadmap Management

🤖 Advanced AI Integration

📊 Progress Tracking

🎮 Enhanced User Experience

System Architecture

Core Components

1. Campaign Roadmap Manager (campaignRoadmap.js)

Handles the creation, management, and adaptation of campaign roadmaps.

Key Features:

Structure:

Campaign Roadmap {
  title: String,
  theme: String,
  overallGoal: String,
  chapters: [{
    title: String,
    scenes: [{
      title: String,
      type: String, // combat, exploration, social, puzzle, story
      objectives: Array,
      difficulty: Number (1-10)
    }]
  }],
  npcs: Array,
  locations: Array,
  plotThreads: Array,
  emergencyScenarios: Array
}

2. Better DM AI (betterDMAI.js)

The enhanced AI system that integrates roadmap management with intelligent response generation.

Key Features:

Core Methods:

3. Better DM App (betterDMApp.js)

The main application controller that manages UI, user interactions, and system coordination.

Key Features:

Getting Started

1. Setup and Installation

  1. Open the Better DM system:
    Open: better-dm/index.html in your web browser
    
  2. Configure AI API (if using external AI):
    • Edit betterDMAI.js
    • Update the getAPIKey() method with your HuggingFace API key
    • Modify AI model preferences if needed

2. Creating Your First Campaign

  1. Launch the Application
    • Open index.html in a modern web browser
    • Wait for the system to initialize
  2. Campaign Setup Wizard
    • Campaign Prompt: Describe your desired campaign
      Example: "A dark fantasy adventure where ancient evils stir beneath 
      a peaceful kingdom. The players must uncover a conspiracy that threatens 
      to plunge the world into eternal darkness."
      
    • Character Information: Provide details about the character(s)
      Example: "A level 3 Human Paladin named Sir Gareth, devoted to justice 
      and protecting the innocent. Has a personal vendetta against undead 
      creatures due to his village being destroyed by necromancers."
      
    • Campaign Settings:
      • Length: Short (3-4), Medium (6-8), or Long (10+) sessions
      • Difficulty: Easy, Normal, Hard, or Epic
      • Theme: Heroic Fantasy, Dark Fantasy, Mystery, etc.
  3. Campaign Generation
    • Click “Generate Campaign & Start Adventure”
    • Wait for the AI to create your comprehensive roadmap
    • Review the generated opening story

3. Playing the Campaign

  1. Understanding the Interface
    • Main Story Area: Where the narrative unfolds
    • Input Area: Where you describe your actions
    • Sidebar: Campaign progress and roadmap overview
    • Roadmap Panel: Detailed view of the entire campaign structure
  2. Taking Actions
    • Type your desired action in the input field
    • Press Enter or click “Take Action”
    • Watch as the AI responds with roadmap awareness
    • Observe automatic progress tracking
  3. Monitoring Progress
    • Current Chapter/Scene: Always visible in the sidebar
    • Objectives: Current scene goals and requirements
    • Full Roadmap: Click “View Full Roadmap” for complete overview

Advanced Features

Campaign Roadmap Adaptation

The system intelligently adapts the roadmap when players make unexpected choices:

  1. Automatic Detection: Recognizes when player actions deviate from expected paths
  2. Impact Analysis: Evaluates how choices affect the overall story
  3. Smart Adaptation: Modifies upcoming scenes while maintaining story coherence
  4. Emergency Scenarios: Provides backup content for completely unexpected situations

AI Response Signals

The AI uses special signals to communicate with the system:

Save and Export System

Campaign Saving:

Export Options:

Configuration Options

AI Configuration (betterDMAI.js)

aiConfig: {
  models: ['microsoft/GODEL-v1_1-large-seq2seq', ...],
  temperature: 0.8,        // Response creativity (0.1-1.0)
  maxTokens: 300,          // Response length limit
  maxRetries: 3            // Retry attempts on failure
}

Roadmap Configuration (campaignRoadmap.js)

roadmapTemplate: {
  estimatedSessions: 6,    // Default campaign length
  difficultyProgression: 'gradual', // 'gradual', 'steep', 'plateau'
  maxHistoryLength: 15     // Conversation memory limit
}

UI Configuration (betterDMApp.js)

// Modify these values to customize the interface
maxRecentResponses: 5,    // Number of recent responses to track
actionDebounceTime: 2000, // Milliseconds between actions
autoSaveInterval: 300000  // Auto-save every 5 minutes

Best Practices

For Campaign Creation

  1. Be Specific: Detailed prompts generate better roadmaps
  2. Include Character Motivation: Personal stakes improve story integration
  3. Set Clear Themes: Consistent themes lead to better narrative coherence
  4. Consider Player Agency: Leave room for player choice and creativity

For Playing Campaigns

  1. Engage with Objectives: Work toward scene goals for best experience
  2. Be Descriptive: Detailed actions receive richer responses
  3. Embrace Adaptation: The system adapts to your choices - be creative!
  4. Monitor Progress: Check the roadmap to understand story direction

For DMs Using the System

  1. Review Generated Roadmaps: Modify or guide the AI if needed
  2. Watch for Adaptation Points: Observe how player choices affect the story
  3. Use Emergency Scenarios: Don’t worry about players going off-track
  4. Save Regularly: Preserve good campaign states for reference

Troubleshooting

Common Issues

Campaign Won’t Generate:

AI Responses Seem Off-Topic:

Progress Not Updating:

Performance Optimization

For Better Response Times:

For Better Roadmap Quality:

API Reference

CampaignRoadmapManager

Methods

BetterDMAI

Methods

BetterDMApp

Methods

Development Notes

Extending the System

Adding New AI Models:

  1. Update the model list in betterDMAI.js
  2. Adjust parameters for optimal performance
  3. Test with various campaign types

Customizing Roadmap Structure:

  1. Modify templates in campaignRoadmap.js
  2. Update parsing logic for new fields
  3. Adjust UI display accordingly

Enhancing the Interface:

  1. Edit styles in better-dm-styles.css
  2. Add new UI components in betterDMApp.js
  3. Update HTML structure as needed

Future Enhancements

Contributing

To contribute to Better DM:

  1. Review the codebase structure
  2. Identify areas for improvement
  3. Test thoroughly with various campaign types
  4. Document any changes or additions
  5. Consider backward compatibility

License and Credits

Better DM builds upon the DiceTales foundation and represents an evolution in AI-powered campaign management. The system is designed to enhance storytelling while maintaining the collaborative spirit of tabletop RPGs.


Ready to create epic adventures? Start your Better DM experience today!