Random Encounters

🎲⚔️🃏 Flexible, RPG-like Random Event system with rarity weight, pacing controls, & progression gating. --- Random Encounters allows creators and players to create a pool of custom events to be randomly selected and included throughout their AI Dungeon adventure. For creators, this provides a way to hand-craft specific events for players to experience throughout their otherwise AI-generated Story and control how often those events are suggested to the AI. > In a D&D-styled RPG, you might include encounters like bandit attacks, a friendly roadside merchant, a dragon fly-by, or magical mishap. > In a slice-of-life game, encounter cards might include a rumor starts circulating about the PC or a NPC, a chance encounter between two rivals, a sudden social event blindsides you, or a long lost childhood friend reappears. > In a detective mystery, you could create generic events like 'a lie is discovered that changes the direction of the case', 'something suspicious catches your attention', 'new information is revealed in an unexpected way', 'a new clue complicates an existing theory' If the script isn't able to work the event into the current scene, it'll make a note and return it to the encounter pool for later. If a random encounter successfully completes, the script logs the event's conclusion in a story card and marks the event complete before starting a hidden timer that'll trigger another event way down the line. --- v1.2 update 10/21/26: Fixed default settings to prevent new cards from spawning at the start of every adventure. Added RE-enabled sandbox 'Avatar' and 'Iron Chef' demo scenarios to description footer. v1.1 update 10/16/26: Improved card organization, new difficulty and prompt-guidance tools for encounter card generation, new ASAP importance to override pacing & priority for immediate encounter activation, new 'bypass situational awareness true/false' to force encounters to start no matter the current situation, clean-up on language & function clarity, and more. Full log on Github. --- Features & Customization > "Act" Progression Gating: This divides the encounter pool into numbered 'Acts' that dictate which encounters can be triggered when. Encounter cards tagged with 'Act 1' make up the initial encounter pool, and completing all encounters tagged 'required' progresses RE to Act 2 or the next numbered act while 'optional' encounters remain in the pool until completed. Encounter cards are sorted by 'Act' in the Story Card view for easy review. This can be used to try and mimic difficulty gating by placing easy missions in early acts and harder or higher-stake encounters in later acts, requiring a 'boss fight' by placing a single required card in Act 2, or loosely setting up encounters that can build on previous-act encounter info. Set Encounter Map to true in config for a read-only view of current Act structure. > Customizable Encounter Rarity & Pacing/Frequency Settings in each encounter card allow players to weight encounters from very common to very rare to impact selection odds or overall duration to control time between events, in addition to Fast/Moderate/Slow settings for overall adventure pacing. Within Advanced Settings, the turn and number values for each of these and more can be fully customized. > Populate Placeholder Cards Lets the AI take a stab at creating encounters that fit the current Adventure by replacing default text in new encounter cards with AI Generated text. Start out by setting the max encounter card number, setting the 'generate' setting to true, taking an action in-game, then setting the Populate Placeholder setting to True. Optionally, choose the desired difficulty (Very Easy, Easy, Normal, Hard, Very Hard) and provide a short prompt to guide theme/situation/etc. --- Tested compatible* with InnerSelf & AutoCards; merged library/input/context/output available on Github. * When InnerSelf or AutoCards is active, actions like 'Populate Placeholder Cards' may take several turns longer. Either disable them before populating cards or be patient for a dozen turns or so. > InnerSelf Merge, Example Cards, & More Instructions on Github: https://github.com/circadiansummer/AID-RandomEncounters/blob/main/README.md > Use Story Card Studio tool to easily edit Story Cards, Map Encounter Pacing: https://circadiansummer.github.io/AID-Little-Tools/Story-Card-Studio-v5.0.html > Try the Quick Demo: https://play.aidungeon.com/scenario/S0dQRuhC0Obv/script-demo-random-encounters?share=true&published=true >Try the full 'Iron Chef' RE Demo: https://play.aidungeon.com/scenario/04tdxuTkrldB/iron-chef-showdown?share=true&published=true >Try the full 'Avatar: Adventures: RE Demo: https://play.aidungeon.com/scenario/uB3GcxUG-9wF/avatar-adventures?share=true&published=true

Cover art for Random Encounters, a slice of life script on AI Dungeon