English

Advanced Settings

Help: Quick Start · Stories · Characters · Lore Books · Multiplayer · Discover · Advanced · Templates · FAQ


This page covers the more technical features of Dream Scrolls: generation presets and their prompt templates, mood/state evaluation, summarization, and model configuration.


Generation Presets

A generation preset is a reusable bundle that combines prompt templates with generation parameters. Applying a preset to a story pre-fills all five prompt templates (System, Narrator, Mood, State, Summarization) and all generation parameters in one click.

Presets are particularly useful when:

  • You maintain multiple stories and want a consistent writing style across all of them.
  • You switch between different AI models with different formatting expectations.
  • You want to share a well-tuned configuration with other users.

Creating a Preset

Go to Config → Presets → Create Preset. Fill in the name, and then configure the prompt templates and generation parameters described below. Alternatively, clone a preset from Discover Presets and modify it.

Applying a Preset to a Story

When creating a story, select one of your presets from the Template dropdown in the story form — this pre-fills all accordion fields. (It's labeled "Template" in the form, but it lists your own presets — see Stories.) You can also apply or change a preset from within the play screen via the Story tab in the config panel.


The Five Prompt Templates

There is no fixed prompt "assembly order" of separate slots — each of the five prompt fields below is an independent, complete Mustache template that you write in full, and exactly one of them is rendered per generation call depending on what's happening. There are no separate Pre/Post-Description, Pre/Post-Lore, or Pre/Post-History fields: character descriptions, lore entries, and message history are not injected at fixed positions automatically — you place them yourself, anywhere in the template, using variables like {{#presentChars}}, {{#hasLore}}, and {{#messages}} (see Templates for the full variable reference and a worked example).

TemplateUsed for
System PromptThe default prompt for a character's turn — the one you'll spend the most time on.
Narrator PromptUsed instead of the System Prompt for a Narrate generation (see Stories), so character-less narration can have its own tone, rules, and layout.
Mood System PromptUsed instead of the System Prompt when the AI re-evaluates a character's Mood, right before their turn, when Mood/State Evaluation is enabled (see below).
State System PromptSame as above, for a character's State.
Summarization System PromptUsed instead of the System Prompt when generating a summary of older messages (see Summarization below).

The Mood and State templates should instruct the model to output a short mood/state description, referencing the character's current mood/state (via {{char.mood}}/{{char.state}}) so it updates incrementally instead of starting over each time.


Generation Parameters

These settings control how the AI generates text. They are stored in presets and can also be edited per-story.

ParameterDescription
Context LengthThe total token budget for the full assembled prompt (characters, lore, and history, as woven into the prompt template by the fields it references). Must not exceed what your model supports.
Lore ContextThe portion of Context Length reserved for lore book entries. Lore entries will not exceed this budget no matter how many match.
Max New TokensThe maximum number of tokens the AI may generate in a single response. Shorter values produce faster, more concise replies; longer values allow the AI to write more.
TemperatureControls the randomness of the output. 0.5–0.8 gives consistent, predictable output; 1.0–1.2 is a balanced middle ground; 1.3–1.5 gives creative but less stable results. Values above 1.5 often produce incoherence.
Top PNucleus sampling. Only tokens whose cumulative probability reaches Top P are considered. Lower values (e.g. 0.9) narrow the pool; 1.0 considers all tokens. Usually left near 1.0 when using Temperature.
Presence PenaltyDiscourages the model from using any token that has already appeared in the prompt or response, regardless of how many times. Useful for reducing repetition of specific words or phrases.
Frequency PenaltySimilar to Presence Penalty, but scales with how often a token has already been used. A token used five times is penalised more than one used once. Useful for reducing formulaic sentence structures.
SeedSet to -1 for a random seed on each generation (default). A fixed positive integer makes generation deterministic — the same input with the same seed will always produce the same output. Useful for debugging or reproducible testing.
Thinking BudgetFor models that support extended reasoning (chain-of-thought before the visible response). Sets the token budget for the model's internal reasoning step. Higher budgets can improve quality on complex narrative decisions but increase latency and cost.
With Names (Prefix messages with character names)When enabled, each message in the history is prefixed with the character's name before being sent to the model (e.g. Aria: Hello.). Required for many chat-format fine-tuned models.
Stop TokensA list of token strings that end generation early when produced by the model. For example, if your model tends to continue generating past the response boundary (e.g. writing User: after finishing a response), add that string as a stop token.

Summarization

For long-running stories, the context window will eventually fill with message history, leaving no room for new content. Summarization compresses older messages into short summaries that are injected in place of the raw history, freeing up tokens for the ongoing conversation.

Enabling Summarization

Open the story settings (either when creating or editing a story, or from the Story tab in the play screen config panel) and expand the Summarization accordion. Toggle summarization on.

Summarization Settings

SettingDescription
Summarization IntervalHow many messages to group into a single summary. Smaller intervals (e.g. 10) produce more frequent but shorter summaries; larger intervals (e.g. 30) produce less frequent but longer ones.
Summary Context LengthThe token budget given to the model when writing each summary. Larger budgets allow more detailed summaries.
Summary History SizeHow many past summaries to include as context when writing a new one. Including past summaries gives the model continuity — it knows what happened before the current batch of messages. A value of 2–4 is usually sufficient.
Recent Message TokensHow many tokens of raw (unsummarized) recent messages to keep alongside the summaries. These are the most recent messages that have not yet been summarized. Keeping a buffer of recent raw messages ensures the AI always has direct access to the immediate context.
Summary Embedding ModelIf set, each summary is also vectorized using this embedding model, making it retrievable by semantic search in addition to being injected sequentially. Useful for very long stories where even summaries accumulate.

How Summarization Runs

Summarization runs as a background job after messages arrive — it does not block the story session. A progress indicator in the UI shows when summarization is in progress. Once a batch of messages is summarized, Dream Scrolls automatically uses the summaries in place of the raw messages when assembling future prompts.


Mood/State Evaluation

Each character has a Mood and a State field (see Characters) that can be kept up to date automatically by the AI, giving the model short-term emotional and situational continuity without you having to write it into the character description by hand.

Enabling It

Toggle Enable Mood/State Evaluation in a story's (or preset's) Context accordion. It is off by default — evaluating mood and state adds an extra round of LLM calls right before every character's turn, which adds latency to the conversation.

How It Works

  • Right before a present character speaks, Dream Scrolls asks the AI to re-evaluate that character's Mood and State, using the Mood System Prompt and State System Prompt templates (see above) as the instructions for each call.
  • Mood and State are evaluated concurrently with each other to minimize the added delay.
  • Only messages posted since the character's last mood/state evaluation are considered — the model is not re-reading the whole history every time.
  • A character's Mood or State can be individually locked (via the "AI updates" switch next to each field in the play screen's Characters tab) to exclude it from automatic evaluation while still allowing you to edit it by hand.
  • Evaluation is best-effort: if it fails or times out, it is silently skipped and never blocks the character's actual reply from generating.
  • A character that is not Present in the scene is skipped — it hasn't witnessed anything new.

Settings

SettingWhereDescription
Mood/State ModelStory/preset Model sectionThe model used for evaluation calls. Falls back to the story's Completion model when unset.
Mood/State Context LengthContext accordionToken budget for the evaluation prompt, independent of the main Context Length — kept small since these are cheap, frequent background calls.
Mood/State Max TokensContext accordionMaximum tokens the model may generate per evaluation. Responses are meant to be a sentence or two.

Models (Admin Only)

Models are the AI provider configurations that power text generation and embeddings. Only admins can create or edit models.

Go to Config → Models.

Model Fields

FieldDescription
TypeThe API provider. Supported types: OpenAI, Ollama, Mistral, DeepSeek, OpenRouter, VLLM, Llama.cpp.
API URLThe base URL of the provider's API endpoint. For cloud providers, this is the official API URL. For self-hosted models (Ollama, Llama.cpp, VLLM), this is your local or network endpoint.
Model NameThe model identifier passed to the API (e.g. gpt-4o, mistral-small-latest, llama3:8b).
API KeyYour credentials for the provider. Stored securely and never displayed after saving.
Completion CapableEnable if this model can generate story text (most models).
Embedding CapableEnable if this model can generate vector embeddings. Required for lore vector search and summary vectorization.
Image Generation CapableEnable if this model generates images rather than text. Image-capable models are used exclusively for the per-story image generation feature and do not appear in the text model selector.
Max Context SizeOptional hard cap on the context window for this model. When set, Dream Scrolls will never send more tokens than this value regardless of the story's own context length setting.

A model can be both completion-capable and embedding-capable if the provider supports both use cases on the same endpoint, but it is common to configure them separately. Image generation models are always configured separately.

ComfyUI models have additional workflow configuration fields — a ComfyUI workflow JSON and the name of the text-prompt node within that workflow — which let you target any ComfyUI pipeline without changing the server configuration.


Writing Prompt Templates

Every prompt field described above (System, Narrator, Mood, State, and Summarization) is written in Mustache, the same templating language used for character descriptions and lore entries. For the full reference on available variables, Mustache syntax, and role tags — see the Templates page.