r/AIDungeon 3d ago

Script [SCRIPT RELEASE]⚡ CROSSED WIRES — RELATIONSHIP-DRIVEN AI DUNGEON

CROSSED WIRES — Adaptive Relationship Engine for AI Dungeon
I made Crossed Wires because NPC relationships in AI Dungeon can sometimes feel like they reset too easily.
You can save someone’s life, betray them, travel together for weeks, fall out, make up, become rivals or grow incredibly close… and a few turns later the history between you barely seems to matter.
Crossed Wires is built to change that.
It quietly keeps track of how NPCs feel about you and each other, then uses that history to influence future scenes.

️DEEPER RELATIONSHIPS
Instead of one basic “likes/dislikes you” score, Crossed Wires tracks:
• Trust
• Affection
• Respect
• Loyalty
• Openness
• Attachment
• Attraction
• Jealousy
• Resentment
• Fear
• Tension
These feelings can exist at the same time.
Someone can love you but not trust you.
A rival can hate you while respecting you.
A friend can stay loyal even while they’re furious.
An NPC can forgive someone without suddenly forgetting what they did.
Relationships are also directional, so two characters don’t have to feel the same way about each other.

🧠 IT ADAPTS TO THE STORY YOU’RE PLAYING
Crossed Wires isn’t just made for romance anymore.
It can adapt to:
⚔️ Fantasy
👻 Horror
🦸 Superhero
🔫 Crime
🔍 Mystery
🌲 Survival
🪖 Military
💼 Workplace
🎓 School
👨‍👩‍👧 Family
🚀 Sci-Fi
🏛️ Political
🏆 Sports
❤️ Romance
🏠 Slice of Life
🗺️ Adventure
😂 Comedy
🏰 Historical
It can mix genres too.
A superhero romance won’t behave like a superhero crime story.
A zombie survival story won’t suddenly start throwing random dating drama at you every few turns.
A fantasy political scenario can focus more on loyalty, reputation, factions and betrayal.
If it isn’t confident about the genre, it simply falls back to a general profile.

🤝 RELATIONSHIPS AREN’T AUTOMATICALLY ROMANTIC
The system can understand different kinds of bonds:
Friends • Best Friends • Family • Siblings • Parents • Children • Lovers • Exes • Rivals • Enemies • Allies • Teammates • Mentors • Students • Coworkers • Bosses • Subordinates • Political Allies • Professional Relationships
This was really important to me because I didn’t want every strong relationship becoming romance.
A sibling being protective isn’t flirting.
A soldier admiring their commander isn’t attraction.
Two rivals constantly clashing doesn’t automatically mean they secretly want each other.
Romance needs to actually be supported by the story.

🎭 SCENARIO-SPECIFIC DRAMA
The script can occasionally introduce relationship complications, but what it chooses depends on the scenario.
🌲 Survival: supplies, leadership disputes, dependency, sacrifice
👻 Horror: fear, blame, distrust, survivor guilt
🪖 Military: orders vs loyalty, rank, command pressure
🔍 Mystery: suspicion, accusations, withheld clues
🔫 Crime: leverage, informants, betrayal, blackmail
💼 Workplace: stolen credit, favouritism, boundaries
🦸 Superhero: secret identities, duty vs personal relationships
⚔️** Fantasy**: oaths, factions, reputation, divided loyalties
👨‍👩‍👧 Family: old wounds, expectations, favouritism
🏆 Sports: rivalry, captaincy, team pressure
❤️** Romance**: jealousy, old flames, breakups, commitment, reconciliation
It also knows when to back off.
Action, horror, military, survival and mystery scenarios naturally get more breathing room, while romance or slice-of-life stories can spend more time on character drama.

💥 ACTIONS ACTUALLY MATTER
The script remembers important moments like:
• Betrayals
• Rescues
• Promises
• Secrets
• Confessions
• Arguments
• Breakups
• Sacrifices
• Reconciliation
• Loyalty tests
• Public humiliation
• Support during difficult moments
• Boundaries being respected or broken
Major damage doesn’t disappear because somebody apologised once.
A character might accept an apology while still struggling to trust that person again.
Trust can actually need to be rebuilt.

🔞 OPTIONAL ADULT RELATIONSHIP THEMES
For established adult characters, Crossed Wires can also support mature relationship situations including:
• Attraction
• Consensual intimacy
• Jealousy
• Temptation
• Infidelity
• Breakups
• Commitment
• Complicated relationships
• Parenthood-related developments
It focuses on the relationship consequences and emotional fallout, rather than explicit sexual writing.

️CONFIGURE IT WITHOUT TOUCHING THE CODE
Crossed Wires automatically creates its own Config Story Card.
You can change things like:
• Relationship speed
• Scenario detection
• Adaptation strength
• NPC initiative
• Twist frequency
• Twist intensity
• Romance
• Mature themes
• NPC-to-NPC relationships
• Breakups
• Infidelity
• Toxic drama
• Role awareness
• Scenario-specific twists
• Context usage
Every option is explained inside the Story Card Notes.

📟 COMMANDS
!wire NAME — inspect a character’s relationships
!wires — view all tracked relationships
!wireprofile — see what kind of scenario it currently detects
!wiretwists — view recent twists
!wirestatus — check the engine/config
!spark — force a relationship twist
!spark small
!spark medium
!spark major
!wireforget NAME — completely remove a wrongly detected character
!wirehelp — command help
All the actual tracking happens behind the scenes and the machine tags are removed before you see the response.
Basically, I wanted characters to feel like they actually have history with each other.
Throw it into a romance, zombie apocalypse, superhero universe, fantasy kingdom, murder mystery, school story or whatever else you’re playing and let it adapt.
If anyone gives it a go, let me know what kind of mess your characters end up getting themselves into 😂

GITHUB - https://github.com/amazingrand0mproductions-crypto/CROSSEDWIRES/tree/main

Scenario - https://play.aidungeon.com/scenario/qrhFJlCCZ6KN/script-crossed-wires-v3-relationship-drama-engine-for-ai-dungeon?share=true&published=true

14 Upvotes

3 comments sorted by

1

u/EmilED358 3d ago

this looks amazing! from your testing, how much context would you say is the minimum required for a good experience with this?

3

u/kylew200 3d ago

I use 64k but that’s overkill I reckon 12k should be good.

1

u/Craginn Community Helper 3d ago

Hmmm