LW Affinity Engine
Give every character in your adventure a relationship with you that grows or sours with how you treat them, private thoughts, and a memory of what happened. Works in any story with no setup: it reads the Character story cards that are already there. WHAT IT DOES • Feelings: affinity, trust, attraction and obsession for every character card, plus one or two stats the AI designs for your story on the first action. Kind scenes raise them, cruel ones lower them, and the AI is only told what changed. • Thoughts: one character in the scene thinks in private each turn, in a short line. Their latest thoughts are kept in their card's Notes, under their stats, never in the story. • Chronicle: the AI writes one line per scene into a Chronicle card and gets the last three back, so long stories keep their thread. Each character also keeps what they lived through as memories of their own, and they come back when the scene touches them. • Clock: day and time of day, moved only when the story says time passes. • Surprises: twists fitted to whoever is in the scene, random ties between characters who meet, and a three-act arc whose beats are drawn differently every playthrough. • Card hints: when the AI keeps using a name with no card, you get a note with the exact /npc command to add one. HOW TO USE Add the script to an adventure or scenario and play. Your first action also lets the AI design the story's own stats (press Continue after it). On the first turn the script creates five cards: LW Config, LW Relations, LW Chronicle, LW Events and LW Arc. Their Notes are never sent to the AI; edit them to change anything. COMMANDS (type them in Do, Say or Story) /rels · /rel Name · /set Name trust 5 /npc Name, short description (also /place and /faction) /thoughts Name (their latest thoughts) · /think Name (they think next turn) /twist · /arc · /chronicle · /time · /peek · /check · /help TIPS • Keep your own character out: add "skip: YourName" to the LW Config card. • Choose your own yandere: put [cfg obsession:0.3] in that character's card Notes. No surprise yanderes: add "yandere_chance: 0" to LW Config. • Another script also writes Front Memory? The engine notices and sends its line another way. If characters still never think, add "inject: text" to LW Config. Full guide and source code: https://github.com/hopensource-st/ai-dungeon-affinity-script
