A comprehensive AI Dungeon script library for automated story card management, character initialization, and information extraction from marked text.
- Automated Story Card Management: Creates and manages Lists Story Cards for organizing story information
- Character Sheet Integration: Automatically initializes servants from Character Sheet "Subordinate(s)" field
- Marker-Based Information Extraction: Extracts information from
#-- --#markers in AI output - Character Profile Creation: Auto-creates character cards for detected characters
- Command System: In-game commands for script control (
/testing enable,/testing disable, etc.) - Settings Persistence: Maintains configuration across game sessions
- Comprehensive Logging: Detailed console logging for debugging
- Copy the scripts from the
Testing Scriptfolder to your AI Dungeon scenario - Add the following scripts to your scenario:
Testing Library.js- Main library (add to Shared Library)Testing Input.js- Input modifierTesting Context.js- Context modifierTesting Output.js- Output modifier
The script automatically initializes when your scenario runs. It will:
- Create a Settings Story Card for configuration
- Initialize servants from your Character Sheet if available
- Begin processing marked text for information extraction
Use #-- --# markers around information you want to automatically add to story cards:
#-- Aria learned a new fire spell that can burn through steel --#
#-- The village of Thornwick has a population of 500 people --#
#-- Servant Marcus: Loyal bodyguard with expertise in swordplay --#
Available in-game commands:
/testing enable- Enable the script/testing disable- Disable the script/testing reset- Reset to default settings/testing help- Show help information/testing debug- Toggle debug mode/testing status- Show current status
The script creates a Settings Story Card that shows:
- Current configuration status
- Usage instructions
- Available commands
- Script statistics
The script creates Lists Story Cards with the following format:
List: [Category Name]
{Servant 1: [Name and details]}
{Servant 2: [Name and details]}
...
{Servant 10: }
Additional Information:
- [Extracted information items]
If your scenario has a Character Sheet with a "Subordinate(s):" field, the script will:
- Parse the subordinate names
- Initialize them in the Lists Story Card
- Optionally create character profile cards for each
Example Character Sheet format:
Name: Your Character Name
Gender: Your Gender
Subordinate(s): Alice, Bob, Charlie
- Main Library: Core functionality and API
- Hook Scripts: Input, Context, and Output processors
- State Management: Persistent configuration and data storage
- Error Handling: Comprehensive error catching and fallback mechanisms
enabled: Enable/disable script functionalityautoDetect: Automatic information detectionautoCharacters: Auto-create character cardsremoveDuplicates: Remove duplicate informationdebugMode: Enable debug loggingcardLimit: Character limit for story cards
The script includes extensive console logging. To view debug information:
- Enable debug mode with
/testing debug - Check the browser console for detailed logs
- All logs are prefixed with
[Testing]for easy filtering
- v1.0: Initial release with basic functionality
- v1.1: Added Character Sheet integration
- v1.2: Enhanced error handling and logging
- v1.3: Improved story card visibility and persistence
This script is actively maintained. When reporting issues, please include:
- AI Dungeon scenario type
- Console logs (with sensitive information removed)
- Steps to reproduce the issue
- Expected vs actual behavior
This project is licensed under the MIT License - see the LICENSE file for details.
- Built for the AI Dungeon community
- Inspired by the need for better story organization tools
- Uses AI Dungeon's scripting API for seamless integration