'Story' Mode Line Breaks | AI Dungeon

'Story' Mode Line Breaks

A tiny script that adds line breaks around 'Story' mode inputs. From my experience, 'Story' inputs tend to be the most respected by the AI. 'Do' -> you walk away, closing the door behind you. And the AI often follows up with: "But you didn't walk away, nerd." But this happens to me (at least) less often with 'Story' mode. Additionally, it's my understanding that 'Story' inputs more directly influence the AI's writing style, as the AI tries to 'follow-along' with the story text before it. (This is partly why the opening is so important - it sets up a foundation.) The issue? I find it annoying and immersion-breaking having to constantly add more line breaks so that playing on 'Story' mode doesn't create a chunky wall of text. This snippet aims to fix that. Simply copy/paste this: // 'Story' Mode Line Breaks if (!/^\s*>/.test(text)) text = `\n\n${text}\n\n`; Into your Input modifier. Like so: // INPUT const modifier = (text) => { // 'Story' Mode Line Breaks if (!/^\s*>/.test(text)) text = `\n\n${text}\n\n`; return { text } } modifier(text)

Cover art for 'Story' Mode Line Breaks, a customizable scenario on AI Dungeon