Lores
A dynamic knowledge system that drives character interactions and world-building. NPCs and players can reference or discover lore based on their knowledge categories.
How Lore Works
Character Access
Lore entries are accessed by characters based on their knowledgeCategories. Each lore item belongs to one or more categories that determine which characters can access them.
Access Rules:
If a character's
knowledgeCategoriesincludes a lore entry's category, they can recall and refer to that informationIf keywords from a lore entry appear in a conversation, the system may inject the corresponding lore into the character's short-term memory
Lore with the
commoncategory is accessible to all characters, regardless of their knowledge categoriesThis allows different characters to have different understandings of the world based on what they know
System Access
The Story system itself ignores categories when accessing lore programmatically. During character generation or context parsing:
If keywords from a lore entry appear in the character's context during creation, the system automatically associates the relevant lore with the character—regardless of categories
This enables automatic lore integration during NPC generation commands
Lore Structure
Each lore entry includes the following fields:
Required Fields
name: A short, readable title for the lore entrycontext: The full descriptive or narrative explanationkeywords: Terms associated with this lore for search and filteringcategories: Tags used to determine which characters may know this lore
Example Lore Entry
name: Fundamentals of Cross-Racial Magic Theory
context: |-
## Course Overview
Fundamentals of Cross-Racial Magic Theory, taught by Maester Valen, serves as the cornerstone of the Brotherhood's integrative magical philosophy...
keywords:
- Cross-Racial Magic
- Magical Theory
- Human Magic
- Elven Magic
- Brotherhood
- Maester Valen
categories:
- brotherhood
- academic
- magical-theory
- comparative-magicCategory System
Common Categories
common: Accessible to all characters regardless of their knowledge categoriesacademic: Knowledge typically held by scholars, maesters, and educated charactersmilitary: Information known to soldiers, guards, and military personnelmyth: Legendary or mythological knowledgerestricted: Secret or classified informationbrotherhood: Knowledge specific to the Brotherhood organizationmagical-theory: Understanding of magical systems and principles
Custom Categories
You can create custom categories for your world:
Faction-specific:
house-lannister,eldoran-kingdom,windhelm-guardsProfessional:
blacksmith,merchant,healerRegional:
northern-knowledge,coastal-lore,desert-wisdomTemporal:
ancient-history,recent-events,current-affairs
Creating Lore Entries
Manual Creation
Create lore entries by adding YAML files to the lore/ directory:
name: The Fall of Megin
context: |-
The Fall of Megin refers to the dramatic events that led to the collapse of the once-powerful rebel leader's movement...
keywords:
- Megin
- Rebellion
- Eldershade
- Lord Varcar
- Fall
categories:
- common
- recent-events
- eldershadeAI-Assisted Creation
Use the /story lore create command to generate lore entries:
/story lore create "The ancient Worldtree at the heart of Lysathara" "mythology, elven, sacred"This command will:
Generate context based on your description
Extract relevant keywords
Assign appropriate categories
Create the lore entry file
Lore Integration
Character Generation
When creating NPCs, lore is automatically integrated:
/npcinit "Maester Valen" "Brotherhood" "A wise teacher of cross-racial magic theory"The system will:
Search for keywords like "Brotherhood", "magic", "theory"
Associate relevant lore entries with the character
Set appropriate knowledge categories
Enable the character to reference that lore in conversations
Conversation System
During conversations, the system:
Monitors for lore keywords in player messages
Injects relevant lore into NPC short-term memory
Enables natural references to world knowledge
Maintains character-appropriate knowledge levels
Location Integration
Lore can be tied to locations:
/story location create "The Worldtree Sanctuary" "Ancient elven sacred site with deep magical significance"The system will:
Connect location context to relevant lore
Enable NPCs at that location to reference the lore
Create contextual conversations about the site
Best Practices
Writing Effective Lore
Be Specific: Include concrete details and names
Use Keywords: Add relevant terms for searchability
Set Categories: Choose appropriate knowledge categories
Keep Context Rich: Provide detailed, immersive descriptions
Cross-Reference: Link to other lore entries when relevant
Category Management
Use Common Wisely: Reserve
commonfor truly universal knowledgeCreate Hierarchies: Use nested categories like
brotherhood.academicBe Consistent: Use the same categories across related lore
Plan Access: Consider which characters should know what
Integration Tips
Keyword Overlap: Use consistent keywords across related lore
Character Knowledge: Assign knowledge categories that match character roles
Progressive Revelation: Use restricted categories for secret information
Contextual Relevance: Ensure lore matches the character's background
Advanced Features
Dynamic Lore Injection
The system can dynamically inject lore into conversations based on:
Keyword mentions in player messages
Character knowledge categories
Current location context
Ongoing story events
Lore Relationships
Lore entries can reference each other:
Characters with knowledge of one lore can reference related lore
The system maintains connections between related entries
Cross-references enhance world consistency
Last updated