Auto-Cards is an AI Dungeon scenario script that automatically writes and updates plot-relevant story cards during your adventures https://play.aidungeon.com/scenario/Ddt0Akd-lVtj/auto-cards
Find a file
2025-05-24 18:33:34 -04:00
.vscode init workspace 2025-05-24 13:26:54 -07:00
src Update input.js 2025-05-24 18:33:34 -04:00
ts-src Create output.js 2025-05-24 18:30:06 -04:00
.editorconfig init workspace 2025-05-24 13:26:54 -07:00
.gitignore init workspace 2025-05-24 13:26:54 -07:00
Auto-Cards.code-workspace init workspace 2025-05-24 13:26:54 -07:00
context.js Create context.js 2025-05-17 18:07:48 -04:00
eslint.config.js init workspace 2025-05-24 13:26:54 -07:00
input.js Create input.js 2025-05-17 18:05:18 -04:00
library.js Update library.js 2025-05-19 20:22:27 -04:00
LICENSE Initial commit 2025-05-17 17:12:07 -04:00
output.js Create output.js 2025-05-17 18:09:28 -04:00
package.json init workspace 2025-05-24 13:26:54 -07:00
pnpm-lock.yaml init workspace 2025-05-24 13:26:54 -07:00
prettier.config.js init workspace 2025-05-24 13:26:54 -07:00
README.md Update README.md 2025-05-19 23:24:54 -04:00
tsconfig.json init workspace 2025-05-24 13:26:54 -07:00

Auto-Cards

Made by LewdLeah ❤️

Overview

Auto-Cards is a plug-and-play script for AI Dungeon that watches your story and automatically writes plot-relevant story cards during normal gameplay. My primary goal was to address the "object permanence problem" by extending story cards and memories with deeper automation. Auto-Cards builds a living reference of your adventure's world as you go.

Main Features

  • Object permanence! (sort of)
  • Simple and easy to use, full background automation allows you to focus on gameplay
  • Detects named entities from your story and periodically writes new cards
  • Smart long-term memory updates and summaries for important cards
  • Fully customizable AI card generation and memory summarization prompts
  • Suitable for both free and premium AI Dungeon users alike
  • Optional in-game commands to manually direct the card generation process
  • Optional in-game scripting interface (LSIv2)
  • Optional API for other creators to use

Permission

Auto-Cards is both free and open source for anyone to use within their own scenarios or scripts, even including published works. General-purpose usefulness and compatibility were my top design priorities. You have my full permission to use, copy, or modify Auto-Cards. Please enjoy! ❤️

Basic Installation Guide

  1. Use the AI Dungeon website on PC (or view as desktop if mobile-only)
  2. Create a new scenario or edit one of your existing scenarios
  3. Open the "DETAILS" tab at the top while editing your scenario
  4. Scroll to the bottom and select "EDIT SCRIPTS"
  5. Select "Input" on the left
  6. Delete everything you see there
  7. Copy and paste this inside:
// Your "Input" tab should look like this
const modifier = (text) => {
  //
  // Ideally, your other input code goes above this line
  text = AutoCards("input", text);
  // Alternatively, you may also put it below this line
  //
  return {text};
};
modifier(text);
  1. Select "Context" on the left
  2. Delete everything you see there
  3. Copy and paste this inside:
// Your "Context" tab should look like this
const modifier = (text) => {
  //
  // Ideally, your other context code goes above this line
  [text, stop] = AutoCards("context", text, stop);
  // Alternatively, you may also put it below this line
  //
  return {text, stop};
};
modifier(text);
  1. Select "Output" on the left
  2. Delete everything you see there
  3. Copy and paste this inside:
// Your "Output" tab should look like this
const modifier = (text) => {
  //
  // Ideally, your other output code goes above this line
  text = AutoCards("output", text);
  // Alternatively, you may also put it below this line
  //
  return {text};
};
modifier(text);
  1. Select "Library" on the left
  2. Delete everything you see there
  3. Open my full Library code (hyperlink below) in a new browser tab
  1. Copy my full code from the page above and paste it into your scenario's Library script
  2. Click the big yellow "SAVE" button in the top right corner
  3. And you're done!
  4. Keep in mind that any adventures played from your scenario will include Auto-Cards (this even applies retroactively)

Simple demo scenario

My AI Dungeon profile page

Auto-Cards discussion thread