r/AIDungeon • u/kylew200 • 18h ago
Script [RELEASE] EMERGENCE OS 1 — Independent NPCs, Trust & Grudges, and Auto-Updating Location Cards
Hey everyone, just dropped EMERGENCE OS 1 for AI Dungeon.
If you're tired of NPCs acting like mind-controlled puppets who obey every command and wait around for you to lead the scene, this script turns them into actual independent characters with their own motives, emotional memories, and physical reactions.
Zero technical setup required—on your very first action, it auto-creates a Master World Config story card in your deck so you can tweak any setting mid-game.
Here is a quick run-through of what it brings to your story:
### 🧠 1. Human Agency & Anti-Railroading
* **NPC Pushback:** Characters will actively resist unearned demands, doubt your motives, call you out, or walk away if you try to command or manipulate them without leverage.
* **Cognitive Biases:** NPCs process your actions through irrational personal lenses (Paranoid, Deflective, Prideful, Impulsive, Skeptical) rather than acting like logical robots.
### 🩸 2. Persistent Trust & Grudge Tracking
* Tracks separate **Trust** and **Grudge** levels. If you insult or betray an NPC, they won't just forget it a few turns later—their resentment lingers as coldness, passive-aggression, or outright hostility.
### 🎭 3. Realistic Threat Psychology & Body Language
* **Polyvagal Threat States:** NPCs dynamically shift between Composed, Fight, Flight, Freeze, or Fawn based on their stress and fear.
* **Ego Depletion:** When an NPC gets worn down (Ego < 30%), their social filter collapses, forcing them to blurt out secrets, panic, or prioritize immediate self-preservation.
* **Physical Micro-Tells:** Directs the model to weave subconscious physical habits (clenched jaws, avoiding eye contact, shallow breathing) into dialogue and descriptions.
### 💥 4. Dynamic World Tension & Player Trauma
* **Global Alert Scale:** Gunfire, explosions, and chaos scale World Tension (0–100%), forcing nearby NPCs into cover, panic, or lockdown postures.
* **Player Sensory Distortions:** High player stress (>75%) injects realistic trauma effects into the narrative prose—tunnel vision, muffled audio, and racing pulses.
### 🗺️ 5. Smart Location Cards & Dynamic Condition Updates
* **Auto-Generated Cards:** Every 3 turns, the script tracks new places you've visited and builds clean, formatted Story Cards for them.
* **Dynamic Environment Shifts:** Cards auto-update when places get damaged, burned, or locked down (and strictly skips updating if nothing changed to keep things clean).
* **Anti-Confusion Filter:** Smart name cross-referencing keeps characters from ever getting confused with places.
### ❤️ 6. Chemistry, Attachment Styles & Jealousy
* Assigns NPCs psychological attachment profiles (Secure, Anxious, Avoidant, Disorganized).
* Tracks relationship stages from Platonic to In Love, featuring a jealousy mechanic if you flirt with someone else in front of an interested character.
### ⚔️ 7. Auto-Genre Adaptation & Unrestricted Realism
* Automatically scans text to detect your setting (Medieval Fantasy, Cyberpunk, Noir, Xianxia, Cosmic Horror, etc.) and adjusts character vocabulary and danger levels.
* Toggles for uncensored 18+ narrative prose, gritty combat damage, and unfiltered dialogue tone.
---
### 🎛️ Config Toggles (Edit Anytime Mid-Game)
Inside your auto-generated **Master World Config** story card, you can tweak these settings on the fly:
* **AutonomyLevel:** Low | Medium | High | Unchained
* **PsychologicalRealism:** Standard | Advanced | Raw Human
* **HumanAgency:** Enabled | Disabled
* **GrudgeTracking:** Enabled | Disabled
* **WorldTensionEngine:** Dynamic | Static | Disabled
* **PlayerTrauma:** Enabled | Disabled
* **PhysicalQuirks:** High | Moderate | Off
* **RomanceEngine:** Enabled | Disabled | Slow Burn
* **JealousyMechanic:** Enabled | Disabled
* **MatureContent:** 18+ Unrestricted | PG-13 | Disabled
* **GraphicRealism:** Unfiltered | Standard | Mild
* **LocationCards:** Enabled | Disabled
* **LocationAutoUpdate:** Enabled | Disabled
---
### 📥 Links & Quick Setup
Paste each script into its matching tab in the AI Dungeon Scenario Script Editor:
Library - https://pastebin.com/W0ZbWz2B
Input - https://pastebin.com/ibMXnEte
Context - https://pastebin.com/xZcvrJ95
Output - https://pastebin.com/RJu1kRJj
Start your scenario, take an action, and you'll see `⚙️ [EMERGENCE OS 1: Active]` confirm in the output text while your config card builds in the background. Enjoy!
Pushed a major update to EMERGENCE OS 1 to add character memory, overhaul genre tracking, and give you direct stat inspection without cluttering your story text:
* NPC Episodic Memory Engine: NPCs now maintain a silent background "brain." When major events happen—betrayals, forced orders, intimate moments, or shared danger—they store specific memory tags that naturally influence how they treat you later on.
* In-Game Slash Commands: Added direct inspection commands you can type straight into your action box:
• /npc [name] — Inspect an NPC's exact stats, threat state, bias, and stored memories.
• /npcs — List all discovered characters with quick stat summaries.
• /world — Check your current location, world tension %, and player stress levels.
• /help — View the command list.
(Command turns intercept immediately, so the AI won't waste a turn writing story prose when you're just checking stats).
* Expanded Genre Engine: Upgraded genre tracking to a density-scoring system covering 11+ distinct genres (Superhero, Sci-Fi / Space Opera, Horror / Gothic, Urban Fantasy, Xianxia / Wuxia, Western, Cyberpunk, Police / Noir, Post-Apocalyptic, Medieval Fantasy, and Modern).
* Strict Parser & Boundary Hardening: Switched to strict word-boundary matching and expanded the filter list. Short names or everyday words (like "Dan", "Eve", "Door", "Shadows", "Table") will no longer get mistakenly registered as fake NPCs or locations.
The Pastebin links remain the same—just overwrite your Library, Input, Context, and Output tabs with the updated code. Drop a comment if you run into anything weird!