Skip to content

Latest commit

 

History

History
69 lines (55 loc) · 2.84 KB

File metadata and controls

69 lines (55 loc) · 2.84 KB

Project Architecture

This document describes the core files and their responsibilities in the conversation system.

Main Components

  • Conversation.cs
    Handles the core logic for NPC conversations, signal dispatching, and state management.

  • EducationalConversation.cs
    Manages educational content, tracks progress, and interfaces with learning modules.

  • ConversationStarter.cs
    Initializes and triggers new conversations with NPCs.

  • ConversationEventHandler.cs
    Receives conversation signals and triggers UI updates, progress tracking, and content unlocking.

  • ConversationResponseHandler.cs
    Processes structured responses from the AI and routes signals to the appropriate event handler methods.

  • OllamaService.cs
    Provides communication with the Ollama server, sending prompts and receiving AI responses.

  • GameData.cs
    Manages persistent game data, including Ollama host configuration and educational subject selection.

  • npcBackStory.txt
    Contains the NPC’s background story, used for context in conversations.

  • npcResponseSchema.json
    Defines the expected schema for AI responses, ensuring structured data exchange.

File Locations

ASSETS/
├── SCRIPTS/
│   └── Global/
│       └── GameData.cs
└── PREFABS/
    └── BUNDLE/
        ├── ConversationStarter/
        │   └── SCRIPTS/
        │       └── ConversationStarter.cs
        └── UI/
            └── Conversation/
                ├── SCRIPTS/
                │   ├── Conversation.cs
                │   ├── EducationalConversation.cs
                │   ├── ConversationResponseHandler.cs
                │   └── OllamaService/
                │       └── OllamaService.cs
                └── TEMPLATES/
                    ├── ConversationEventHandler.cs
                    ├── npcBackStory.txt
                    └── npcResponseSchema.json

Linked files: