Character-Cache | AI Dungeon

Character-Cache

🗃Character Cache — living NPC tracker for AI Dungeon Character Cache keeps a running summary of important people, major plot events, and lasting world changes so the model (and you) don’t lose track mid-adventure; it's specifically designed to reinforce the story summary, so it doesn't wander off and derail. 🧟‍♂️ If you ever had a dead character suddenly come back, you know what I'm talking about. 🎟 This is especially helpful on lower token (ahem/free/ahem) accounts. What it does 👥 Active Cast — tracks named characters (seeded from Inner Self and refined from the story) 🪦Permanent Changes — deaths, severe injuries, destroyed locations, status shifts, transformations, disappearances 🗓 Recent Major Events — short rolling log of relationship shifts, emotional breaks, rivalries, and other plot-relevant moments 🦾 Forced context injection — optionally injects the tracker into context every turn so the AI can actually use it ✏️ Manual edits stick — delete a wrong line on the card; it stays gone 📇 Auto-Cards safe — bans its own titles so AC doesn’t overwrite the tracker or config cards Requirements Works best with: Inner Self (NPC name list/brains) Auto-Cards (optional; Character Cache protects itself either way) 👨‍💻 Place the full script in Library, and wire the Input / Context / Output modifiers so Character Cache runs alongside Inner Self (Character Cache on Output before Inner Self). Setup (quick) Start the adventure and Continue once. Cards created automatically: Configure Character Cache Character Cache (the tracker) Open Configure Inner Self → notes → list NPC first names, one per line. Continue again → those names appear under Active Cast. Play normally. Major events are detected from recent story text and written to the tracker. 📖 Configure Character Cache Card: Enable Character Cache - Master Switch (Default True) Force tracker into context every turn - Strongly recommended (Default True) Max summary characters - Truncates the card entry if needed (Default 1200) Major event cooldown (turns) - Stops the same beat from spamming every turn (Default 3) Show detected events in Script Log - Useful while testing (Default True) Max event log entries - Rolling “Recent Major Events” length (Default 12) ⁉️ What counts as a major event in this basic version: Permanent (world facts) Death, severe injury, location destroyed/changed, status change (crowned, banished, etc.), transformation, disappearance. Logged (relationships/emotion) Romance, breakups, friendship, betrayal, rivalry, family shifts, power dynamics, trauma, major emotional turns. Events try to attach to a known name from Active Cast when the name appears near the matched phrase. 📝 Editing the tracker The script rebuilds the Character Cache card from state each turn, but: If you delete a Permanent Changes or Recent Major Events line on the card, that deletion is synced back into state and will not return. To wipe the log entirely (e.g. after a big rewrite), delete the lines under the various event sections on the card and Continue. 📋 Tips Keep Inner Self’s NPC list accurate — Active Cast quality depends on it. False positives: delete the line on the card; cooldown + stricter name filters limit junk in script. Force-injection is what makes the tracker useful to the model; leave it on unless you’re debugging context size. Works in 1st / 2nd / 3rd person; event patterns are English-oriented. 🙏Credits & compatibility Character Cache is a companion layer for Inner Self and Auto-Cards by LewdLeah. It does not replace them — it remembers the outcomes those systems help create. Open for use in any scenario. Adjust cooldowns and permanent-event types to fit tone (gritty vs light, romance-heavy vs combat-heavy, etc.). 😅 TL;DR List your NPCs in Inner Self → play → Character Cache records who matters, what permanently changed, and recent big moments, and can force that summary into context every turn so the story stays coherent. Get the Script: https://github.com/FlightsOfMuninn/Character_Cache

Cover art for Character-Cache on AI Dungeon