Creator docs

Worldbook Spec

Updated · 2026-07-07Public document

Foreverse worldbook runtime matches desktop SillyTavern World Info semantics: a book tuned on desktop behaves the same on phone. This page is the behavior reference. For writing advice, see the blog How to write worldbooks correctly.

Injection flow

Every time you send a message, the runtime follows four steps:

  1. Scan the latest several chat turns and match each entry by its keywords (case-insensitive);
  2. Inject matched entries into the prompt according to insertion position and priority;
  3. Total injection is limited by token budget, so lower-priority entries over budget are silently dropped;
  4. Injected content can trigger other entries again (recursive activation).

Entry failure is silent. Troubleshooting should always start with "was it injected?", not "why didn't the model obey?".

Key parameters

ParameterBehavior
Keywords / aliasesPer-entry list; if any keyword appears in chat, the entry matches. Include nicknames, roles, and titles for characters
ConstantInjected every turn regardless of keywords. Each constant entry consumes context every turn; keep it to <=5 entries when possible
Scan depthKeywords only match inside the latest N turns; lore that fell out of the window is treated as not discussed
Token budgetAll matched entries share one injection budget. Over-budget entries are dropped by priority without notice
RecursionIf an entry's content contains keywords for other entries, it can activate them in a chain. Planting keywords inside content is an advanced technique

V3 decorators

Lines starting with @@ inside entry content are V3 decorators. The current implementation supports two, matching desktop Tavern:

DecoratorSemantics
@@activateUnconditionally force activation: bypasses constant / keyword / secondary-keyword / probability checks, while still respecting cooldown
@@dont_activateUnconditionally block activation; no mechanism can insert it into the prompt
  • All @@ lines, including unrecognized ones, are stripped from injected content and won't leak into the prompt.
  • @@@x is the fallback syntax: when earlier decorators are unsupported, the chain degrades in order.

Symptom checklist

SymptomCheck first
Never triggersWhether the worldbook is bound to this character / session; entry toggle state
Works sometimesWhether keywords fell out of scan depth; whether aliases cover the phrasing
Stops working in long chatBudget is being consumed by constant and long entries; compress entries and lower priority for secondary entries
Triggered, but the model ignores itThe entry is too long or too literary; rewrite it as fact-first telegraphic text
Worldbook Spec — Triggering, Budget, V3 Decorators · Foreverse · Xinmeng