Skip to content
/ StoryMC Public

AI-powered roleplay plugin for PaperMC. Generates dynamic quests, conversations, and lore. Built with Kotlin and integrates with Citizens and MythicMobs.

License

Notifications You must be signed in to change notification settings

canefe/StoryMC

Repository files navigation

StoryMC

Latest Version Build Status Minecraft Version Paper API

A Kotlin-based Paper plugin that transforms Minecraft into a living, narrative-driven world through AI-integrated NPCs and voice synthesis.

Fully stable as a Human-in-the-loop (HITL) orchestration tool. It provides a robust narration engine and NPC framework managed by a human Game Master.

Note

This project is designed as the client-side implementation of a broader agentic simulation framework. The architecture is transitioning from a standalone monolith to a decoupled system, where this plugin handles environmental rendering and user interaction while a dedicated simulation engine governs autonomous AI behaviors and world-state logic.

Story

What is Story?

Story is a production-ready Minecraft plugin that enables Dungeon Masters to create immersive narrative experiences with AI-powered NPCs. It allows facilitating D&D-style campaigns with persistent character memory, dynamic dialogue generation, and realistic voice synthesis.

  • LLM-Powered Dialogues. NPCs generate contextually-aware responses using language models
  • Voice Synthesis. Character-specific voices via ElevenLabs integration
  • Persistent Memory. NPCs remember conversations, relationships, and story events
  • Rich Character System. Complex personalities, backstories, relationships, and lore
  • Location Awareness. NPCs understand their environment and react accordingly
  • Multi-Player Support. Handle concurrent conversations across multiple players
  • Character Schedules. NPCs follow daily routines and autonomous behaviors
  • Plugin Ecosystem. Integrates with Citizens, MythicMobs, and other popular plugins

Roadmap: Evolving into a comprehensive simulation engine. The goal is to transition from manual GM scheduling to a fully autonomous architecture where AI agents manage their own schedules, behaviors, and world-state interactions with minimal human intervention.

Installation

Requirements

  • Minecraft 1.21.1
  • Paper 1.21.1
  • Java 21
  • OpenRouter API key (for LLM integration)
  • ElevenLabs API key (for voice synthesis) (optional)

Dependencies

Usage

Click here to get started.

Architecture

Current Production Stack

┌─────────────────────────────────────┐
│     Minecraft Server (Paper)        │
│  ┌───────────────────────────────┐  │
│  │      Story Plugin (Kotlin)    │  │
│  │  ┌─────────────────────────┐  │  │
│  │  │   Character System      │  │  │
│  │  │   - Personalities       │  │  │
│  │  │   - Relationships       │  │  │
│  │  │   - Memories            │  │  │
│  │  └─────────────────────────┘  │  │
│  │  ┌─────────────────────────┐  │  │
│  │  │   Lores & Locations     │  │  │
│  │  │   - Keywords & Context  │  │  │
│  │  └─────────────────────────┘  │  │
│  │  ┌─────────────────────────┐  │  │
│  │  │   LLM Integration       │  │  │
│  │  │   (OpenRouter API)      │  │  │
│  │  └─────────────────────────┘  │  │
│  │  ┌─────────────────────────┐  │  │
│  │  │   Voice Synthesis       │  │  │
│  │  │   (ElevenLabs)          │  │  │
│  │  └─────────────────────────┘  │  │
│  └───────────────────────────────┘  │
└─────────────────────────────────────┘

How It Works

  1. Player Interaction: Player speaks in proximity to an NPC
  2. Context Building: System gathers character personality, recent memories, location data
  3. LLM Generation: OpenRouter API generates contextually-appropriate response
  4. Voice Synthesis: ElevenLabs converts text to character-specific voice
  5. Response Delivery: Audio and text delivered to players
  6. Memory Update: Conversation stored for future context

Experimental Features

Vector Database Integration (In Development)

Working on semantic search capabilities using Python + vector databases:

  • 13,000+ conversation embeddings from gameplay data
  • Semantic memory retrieval (vs. simple recent + flagged)
  • Improved context relevance for long-term character development

MCP Server

Model Context Protocol server for external LLM access to story data:

  • Query character information programmatically
  • Retrieve narrative context across sessions
  • Enable advanced AI-assisted storytelling tools

LangGraph Multi-Agent Architecture

Exploring autonomous NPC behaviors with sophisticated cognitive architecture:

  • Environmental perception systems
  • Goal-driven decision making
  • Multi-step reasoning for complex interactions
  • Reduced manual DM orchestration

External Simulation in Go

Making minecraft solely a frontend layer, and the simulation layer is in a separate server. Using Redis Pub/Sub for communication.

Use Cases

Narrative Campaigns

Run D&D-style adventures with persistent NPC characters who remember player actions and develop relationships over time.

Living Worlds

Create settlements with NPCs that have daily schedules, relationships, and goals - making the world feel alive even when not directly interacting.

Interactive Storytelling

Let NPCs drive emergent narratives based on player choices and actions, rather than following predetermined scripts.

Educational/Roleplay Servers

Facilitate creative roleplay with AI-powered characters that stay in character and respond contextually.

Support

Note: Story is under active development. Production features are stable, but experimental features are subject to change.

License

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) License.

About

AI-powered roleplay plugin for PaperMC. Generates dynamic quests, conversations, and lore. Built with Kotlin and integrates with Citizens and MythicMobs.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages