๐Ÿ‘พ Game State: Lightweight state engine | AI Dungeon

๐Ÿ‘พ Game State: Lightweight state engine

Game State encodes the protagonistโ€™s inventory, conditions, and status inline using compact 'โˆ† key op value;' entries. This lets the AI track ammo, health, relationship scores, leveling, and quest items without hard-coding anything. Behind the scenes, the player card and time data are merged into a new Game State section when sent to the AI. The AI has seen thousands of examples from Unreal/Unity and other engines, so it naturally understands our intent. Requires an AI capable of multitasking: โœ… Compatible: Mistral Small / 3, Harbinger, WizardLM, Nova, Wayfarer Large, Hermes 3 (70B & 405B), DeepSeek V3/3.1, Mistral Large โ“ Uncertain: Dynamic Large ๐Ÿšซ Not Recommended: Dynamic Small, Muse, Wayfarer Small / 2, Madness Minimal example scenario defaults to medieval fantasy, but you can adapt it to any genre. ๐Ÿšช This opens the door for: - Persistent quests and collectibles (track all 8 pieces of the triforce) in a flexible way triforce-pieces: 2/8 Or palace1-complete: true palace2-complete: false - Branching arcs the AI actually remembers - Stats-driven narrative systems (injuries, corruption, clothing worn, affection) - Known spells or feats lists ๐Ÿงฐ Dev Notes The script handles parsing and merging of any key-value pair automatically: Lists: (a,b,c) Bags: {a:1,b:2} HP-like stats: cur/max Strings: true/false, descriptions, plotlines, etc In the player card notes section, you can list if a key-value pair is mandatory or optional. The order it appears in the notes is the order in the card's entry. ๐Ÿ”ฎ Source code: https://gitlab.com/xilmanaath-ai-dungeon/game-state --- ๐ŸŒ LoLa Localized Languages (by LewdLeah) ๐Ÿƒ Autocards enabled (by LewdLeah) ๐Ÿ•š Epoch Time System: custom monotonic clock with event-based progression ๐Ÿ“Œ PSA: Enable Memory Bank in your adventure for scripts to function properly.

Cover art for ๐Ÿ‘พ Game State: Lightweight state engine, a game state scenario on AI Dungeon