# World Lore, writing styles, variables, and visuals

> Tune how your story reads with Styles, Sticker board, and Try comparison; load World Lore on demand while telling rumors apart from facts; remember story progress with Work variables; and design atmospheric chat themes.

Once your character, opening message, and basic scenes feel right in **Preview chat**, four Studio pages turn a good card into an unforgettable world: **Writing style**, **World Lore**, **Work variables**, and **Visuals & interactivity**.

> **Golden rule:** Add **one layer at a time** and test a few turns in **Preview chat** before adding the next. That way you always know exactly what made the story come alive.

## Scenario cheat sheet: what goes where?

| What you want to accomplish | Where to put it in Studio | Why this works best |
| :-- | :-- | :-- |
| Rules the character must follow on _every single turn_ | **Story → Global story guidance** | Always in front of the AI — keep it crisp and focused |
| Pacing, narration perspective, prose rhythm, or banter tone | **Writing style** | Shapes _how_ the AI writes without bloating character bios |
| Locations, history, slang, vocabulary packs, or factions | **World Lore** | Loads _only_ when relevant — keeps long chats sharp and affordable |
| Unverified rumors vs. hard world truths | **World Lore → Credibility** | Tells the AI whether characters should treat a note as gossip or fact |
| Remembering trust, level, streak, clues, or choices | **Work variables** | Reliable memory that unlocks scenes, profiles, visuals, and panels |
| Cozy colors, fonts, backgrounds, or weather mood shifts | **Visuals & interactivity** | Sets the atmosphere visually with zero CSS required |
| Automatic counters or guaranteed scene reactions | **Advanced → Rules** | Runs reliably the same way every single time without code |
| Clickable clue cards, meters, or pop-up letters | **Components** | Interactive UI built easily with Studio's **Copy AI prompt** |

## Writing style: shape the voice, rhythm, and perspective

Open **Writing style** in the sidebar to steer _how_ the story reads — separate from character personality and separate from visual colors. Writing styles are completely private directions; the AI never quotes them as in-world facts.

### Two ways to build: `Styles` view or `Sticker board`

Use the toggle in the top right to switch freely between **Styles** and **Sticker board** — both edit the **exact same draft**, so switching never loses your work!

- **Styles view:** Clean cards for picking a **Starting point** (_Focused Pivotal Beats_ for dramatic turning points, _Natural Flow_ for balanced scenes, or _Start from scratch_), toggling **Narration style** effects (with optional **Conditions**), and adding **Your adjustments**.

![Studio Writing style page in Styles view showing Starting point presets, Your adjustments with Try button, and Narration style toggles](/illustrations/studio-systems/studio-writing-style.webp)

- **Sticker board view:** A creative scrapbook journal! Pick a board backdrop (_Paper_, _Grid_, _Moon_, _Floral_, _Mist_, _Dawn_, or upload your own), drag or add illustrated stickers from the **Sticker box** (_Story style_ and _Narration style_), arrange your mood board, and even **Share** your visual style board with friends.

![Studio Writing style page in Sticker board view showing journal backdrops, illustrated Story style and Narration style stickers in the Sticker box, and layout controls](/illustrations/studio-systems/studio-sticker-board.webp)

### Test before you commit with `Try`

Studio gives you two ways to test how your writing styles feel before keeping them:

- **Test your whole style setup in live chat (`Your adjustments → Try`):** Opens **Preview chat** with your current style combination active so you can chat naturally and see how everything works together.
- **Compare one preset or custom instruction side by side:** Click **Try this effect** on a preset (or **Try this adjustment** inside the custom instruction editor):
  1. Fill in **What's happening now** (a quick story moment) and **Your message** (a sample player line) — both sides share the exact same setup.
  2. Generate each column with its own button: click **Try without it** (or **Try original**) on the **left**, and **Try this adjustment** on the **right**. _(Each sample reply uses credits just like a Preview chat turn, and trial replies are only for comparison — they aren't saved to your story.)_
  3. Tweak your instruction and re-run until the right column reads the way you imagined, then click **Use this version** (for a preset effect) or **Use in editor** (for a custom instruction — then save your change in the editor).

### Three concrete examples of great custom adjustments

- **Language buddy:** _"When the player hesitates or mixes English into a Spanish sentence, answer their meaning warmly first, then naturally weave the corrected Spanish phrase into your spoken reply."_
- **Slow-burn tension:** _"Show emotion through small physical tells — pausing mid-pour, tightening fingers on a teacup, glancing away — instead of announcing what the character is feeling."_
- **Crisp pacing:** _"Keep replies to 2–3 brisk paragraphs and always leave the final beat open for the player's next decision."_

## World Lore: load background details only when they matter

Putting pages of lore into **Global story guidance** makes every turn heavier and more expensive for players. Instead, open **World Lore** to organize places, factions, items, and backstory into bite-sized pages that LoreHat opens _only_ when the conversation reaches them.

![Studio World Lore page showing World lore entries with Truth badges, situational writing styles, and buttons to Add Lore or Add writing style](/illustrations/studio-systems/studio-worldbook.webp)

### How to set up World Lore entries by scenario

1. **Write a crystal-clear `When to read` summary.** Think of this as the label on a folder tab — the AI scans these short summaries to decide which page to open (for example: _"Open when the player orders food, asks about Valencia café drinks, or practices ordering vocabulary"_).
2. **Pick the right Trigger under More settings:**
   - **On demand (AI decides) — best default:** Ideal for locations, characters' pasts, organizations, and deep worldbuilding.
   - **Keywords — best for specific terms:** Ideal when a specific name, artifact, or codeword (_"brass ledger"_, _"cremaet"_, _"Guild seal"_) should immediately pull in its note. Stick to plain keywords whenever possible.
   - **Always — use sparingly:** Only for brief essentials needed on almost every turn.
3. **Use `Credibility` to create believable world intrigue:**
   - **Accepted fact:** What ordinary people in your world believe _(e.g. "Everyone in Foghaven believes the old lighthouse was abandoned after a storm")_.
   - **Rumor:** Unverified gossip the character shouldn't treat as proven truth _(e.g. "Dockworkers whisper the keeper still signals boats at midnight")_.
   - **Truth:** Objective canon fact _(e.g. "The lantern still works — Mara uses it to warn smugglers away from the rocks")_.
   - Leave unset for ordinary neutral reference notes.
4. **Use Conditions & Priority:** Hide secret lore behind a variable condition (like `trust >= 3`) so it unlocks only when discovered. **Priority** (0–100, default 50) decides which notes come first when several match on the same turn.
5. **Add situational writing styles right here too:** Click **Add writing style** inside **World Lore** for tone shifts that only turn on in specific moments (such as _"Compact Napkin Grammar Mini-Lesson"_ when the player asks for an explanation, or _"Storm Suspense"_ when `storm_active` is true).

## Work variables: give your story reliable memory

Open **Work variables** in the sidebar whenever your story needs to remember exact progress — trust scores, comfort levels, streaks, clues, or whether a door is open. A work can hold up to **64 variables**.

![Studio Work variables page showing variable list, Variable type, Allowed values, Initial value, Change sources, What it records, and One sentence / Rule by rule AI update guides](/illustrations/studio-systems/studio-variables.webp)

### Pick the cleanest variable type for each need

| What you're tracking | Recommended type | Example setup |
| :-- | :-- | :-- |
| Fixed stages, moods, or levels | **Options** _(up to 32 values)_ | `level`: `A1`, `A2`, `B1`, `B2` (starts at `A2`) — gives you safe dropdown menus everywhere! |
| Scores, counters, gold, or affinity | **Integer / Number** | `trust`: starts at `20` (0–100) or `streak`: starts at `0` |
| Simple yes/no milestones | **True / False** _(boolean)_ | `key_found`: starts `false`; `storm_active`: starts `false` |
| Short changing topic or note | **Text** | `topic`: starts `"Morning coffee"` |
| Collected list of clues or items | **JSON** | `clues`: starts `{}` |

### Choose who is allowed to change a variable

- **Allow AI to adjust:** Check this when the AI should update the value through judgment in conversation (like raising `trust` or moving `level` from `A2` to `B1`).
- **Allow components to change:** Check this when an interactive button or panel should edit the value directly (like clicking a candle rating or crossing off a clue).
- **Leave both unchecked** when only your own **Rules**, **Scripts**, or **Story node entry updates** should touch it (great for exact counters or chapter flags!). Toggle the top enable switch off to freeze a variable as a fixed constant.

### Writing an AI update guide: `One sentence` vs. `Rule by rule`

Whenever **Allow AI to adjust** is checked, clear instructions prevent wild or accidental jumps:

- **Use `One sentence` for simple trackers:**
  > _"`level`: Move up one step (e.g., A2 to B1) after the player comfortably handles three turns mostly in Spanish; step down gently if they ask for simpler phrasing."_
- **Use `Rule by rule` when several independent moments move the value:**
  - _Rule 1:_ `+1 trust` when the player keeps a promise or takes a real risk for Mara.
  - _Rule 2:_ `-1 trust` if the player lies and gets caught, or threatens her.
  - _Rule 3:_ Do not change `trust` for ordinary polite greetings.

> **Important privacy rule:** Variable names and current values are sent to the player's browser so panels and themes can update live. Never put hidden spoilers (like the killer's name or secret ending) inside a variable — keep secrets in **Characters → Character information** or condition-gated **World Lore**!

## Visuals & interactivity: dress the chat to match your world

Open **Visuals & interactivity** in the sidebar to craft your chat's atmosphere — **no CSS required**! Upload background art, illustrations, and audio under the **Media** tab, then use the files where the story needs them.

### Where each media file can be used

Media files can be reused across the work; the cover is uploaded from its own field. The six places are:

| Where | Accepted media | How to use it |
| :-- | :-- | :-- |
| **Work cover** | Image only | Upload it from **Showcase → Basics → Cover**; the cover field does not pick from Media |
| **World Lore text** | Image only | **Insert image** to upload, or pick an existing file under **Card assets** |
| **Mini Theater** | Image only | Add an image block under **Showcase → Curtain up → Mini Theater** |
| **Components** | Image or audio | Attach the file in the component editor, then read it as `card.assets.<id>` |
| **Scripts** | Image only | Use the image ID in `card.look.slot` |
| **Visuals & interactivity** | Image only | Pick it as a no-code background, or use `url("lorehat-asset:<id>")` in **Custom CSS** |

Images work in all six places. Audio can be uploaded and played by a component, but it cannot be a cover, a World Lore image, a Mini Theater image, a script image, or a visual background. Covers are cropped to a 2:3 WebP; other uploads keep PNG, JPEG, WebP, GIF, safe SVG, MP3, OGG, or WAV.

![Studio Visuals & interactivity page showing no-code Visual settings for Background gradient, Story bubble, Player bubble, Text color, Font, and Derive a visual version button](/illustrations/studio-systems/studio-appearance.webp)

### No-code Visual settings

- **Background:** Choose a clean solid color, a smooth angled gradient (like warm espresso brown for a cozy café), or an uploaded image from **Media**.
- **Bubbles & text:** Tune separate colors for **Story bubble**, **Player bubble**, **Text color**, **Bubble border**, **Corner radius**, and **Bubble opacity**.
- **Font:** Match your story's genre (e.g., _Serif_ for a literary mystery, _Default_ for modern slice-of-life) and pick a comfortable text size.

### Shift the mood automatically (`+ Derive a visual version`)

Want the whole chat to shift from golden afternoon light to a moody midnight rainstorm mid-story?

1. Click **+ Derive a visual version** at the top right of **Visuals & interactivity**.
2. Name it (for example, _Midnight Storm_) and pick darker slate/indigo colors and bubbles.
3. Set its condition — either `Current story node == Harbor Storm` (no rules needed!), or `storm_active == true` (controlled by a variable or rule).
4. As soon as that condition holds in chat, LoreHat smoothly switches to _Midnight Storm_ — and returns to your default look automatically when the storm passes!

<a id="appearance-css"></a>

### Optional: Custom CSS (or ask your AI to write it)

Each visual slot uses either no-code **Visual settings** _or_ **Custom CSS**. If you want extra-bespoke styling (like subtle borders or gentle animations) without learning CSS yourself, open the box below, copy the prompt into your AI assistant with a 1-sentence description of your aesthetic, and paste the result into **Custom CSS**!

<details>
<summary>Copyable prompt for your AI assistant + supported CSS selectors & properties</summary>

Paste this prompt into ChatGPT, Claude, or Gemini and describe the look you want at the end:

```text
Write appearance CSS for a LoreHat chat. Reply with CSS only: no explanations, no Markdown fence.

Use only these selectors, each optionally followed by one state suffix (:hover, :focus, :focus-visible, :focus-within, :active or :disabled). Comma-separated groups are allowed; classes, descendant or attribute selectors and pseudo-elements are rejected:

| Selector | Element |
| --- | --- |
| `#assistant-bubble` | Character bubble |
| `#assistant-text` | Character body |
| `#chat` | Chat background |
| `#conversation` | Chat content area |
| `#composer` | Input bar |
| `#send` | Send button |
| `#composer-tools` | Input bar tools |
| `#message-actions` | Message actions |
| `#message-component` | In-message component |
| `#scene-card` | Story node card |
| `#message-status` | Message status |
| `#navigation-current` | Active navigation item |
| `#navigation` | Navigation bar |
| `#navigation-item` | Navigation item |
| `#pinned-component` | Pinned component |
| `#pinned` | Pinned area |
| `#pinned-content` | Pinned area content |
| `#pinned-header` | Pinned area header |
| `#title-bar` | Top title bar |
| `#title-actions` | Title bar buttons |
| `#title` | Title text |
| `#user-bubble` | Player bubble |
| `#user-text` | Player body |

Declarations may only use properties from this allowlist; an unknown property rejects the whole file:

- **Layout and size**: `align-items`, `column-gap`, `display`, `flex-direction`, `flex-wrap`, `gap`, `height`, `justify-content`, `max-height`, `max-width`, `min-height`, `min-width`, `overflow`, `row-gap`, `width`
- **Spacing**: `margin`, `margin-block`, `margin-block-end`, `margin-block-start`, `margin-bottom`, `margin-inline`, `margin-inline-end`, `margin-inline-start`, `margin-left`, `margin-right`, `margin-top`, `padding`, `padding-block`, `padding-block-end`, `padding-block-start`, `padding-bottom`, `padding-inline`, `padding-inline-end`, `padding-inline-start`, `padding-left`, `padding-right`, `padding-top`
- **Borders**: `border`, `border-block`, `border-block-color`, `border-block-end`, `border-block-end-color`, `border-block-start`, `border-block-start-color`, `border-bottom`, `border-bottom-color`, `border-bottom-style`, `border-bottom-width`, `border-color`, `border-inline`, `border-inline-color`, `border-inline-end`, `border-inline-end-color`, `border-inline-start`, `border-inline-start-color`, `border-left`, `border-left-color`, `border-left-style`, `border-left-width`, `border-radius`, `border-right`, `border-right-color`, `border-right-style`, `border-right-width`, `border-style`, `border-top`, `border-top-color`, `border-top-style`, `border-top-width`, `border-width`
- **Colors and backgrounds**: `backdrop-filter`, `background`, `background-blend-mode`, `background-color`, `background-image`, `background-position`, `background-repeat`, `background-size`, `box-shadow`, `color`, `color-scheme`, `filter`, `opacity`
- **Typography**: `font-family`, `font-size`, `font-style`, `font-weight`, `letter-spacing`, `line-height`, `text-align`, `text-decoration`, `text-transform`
- **Motion**: `animation`, `animation-delay`, `animation-direction`, `animation-duration`, `animation-fill-mode`, `animation-iteration-count`, `animation-name`, `animation-timing-function`, `transform`, `transition`, `transition-delay`, `transition-duration`, `transition-property`, `transition-timing-function`

Background images must use url("lorehat-asset:<assetId>") with a declared image asset. External or data: URLs, @import, @font-face, @supports, var(), attr(), image-set(), cross-fade(), paint(), expression() and !important are rejected. Put color-scheme (light or dark) and --rp-density (compact, cozy, comfortable or cinematic) in a single top-level #chat rule. Width-only @media queries in px, rem or em and top-level @keyframes are allowed. Keep the whole source under 65536 characters. If a requested look cannot be expressed within these limits, say so instead of inventing selectors or properties.

Desired atmosphere: [E.G., WARM RAINY BOOKSHOP AT NIGHT WITH AMBER LAMP ACCENTS AND SOFT CREAM TEXT]
```

</details>

## Hand these to your AI: lore & variable organizers

### Prompt 1: Split messy backstory into clean World Lore pages

```text
I am building a story in LoreHat Studio and want to move my background notes into World Lore pages so they load only when relevant.
Split the lore below into 4–6 concise World Lore entries. For each entry, give:
1. Title
2. "When to read" summary (1 clear sentence telling the AI when to open it)
3. Recommended Trigger (On demand, or 3–5 Keywords if tied to specific names/items)
4. Recommended Credibility (Accepted fact, Rumor, Truth, or None)
5. Entry body (80–160 words, vivid and directly usable in roleplay)

My raw world notes: [PASTE YOUR BACKSTORY OR WORLD NOTES HERE]
```

### Prompt 2: Design Work variables & clear AI update guides

```text
Suggest 2–4 simple Work variables for my LoreHat Studio story so it remembers meaningful player progress without getting overly complicated.
For each variable, give:
- Variable name (short, lowercase)
- Variable type (Options, Integer, True/False, or Text) and Initial value (plus Allowed values if Options)
- Change source recommendation (Allow AI to adjust, or update via Rules/Story nodes)
- "What it records" (1 crisp sentence)
- "When and how the AI changes it" (either One sentence or 2–3 clear bullet rules so numbers never swing wildly)
Remember: never store hidden plot spoilers inside variable values.

My story premise: [PASTE YOUR STORY PREMISE HERE]
```

## Next steps

- Add reliable automatic reactions with zero coding: [Automating your story with rules](/en/creator/workers-for-beginners/)
- Ready to test and publish? Head to [Test, review, publish, and update a work](/en/creator/publish/)
