> For the complete documentation index, see [llms.txt](https://ney.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ney.gitbook.io/docs/mythichud-extension/snippets.md).

# Snippets

Snippets are server-wide default values used by MythicHUD Extension. They are stored in:

```
plugins/Typewriter/snippets.yml
```

Learn more: [Typewriter Snippets](https://docs.typewritermc.com/docs/helpful-features/snippets)

### How Snippets Work

> **Important:** A snippet is normally created when an entry using it runs for the first time. Trigger the relevant entry before expecting the value to appear in `snippets.yml`.

The `layout` snippets are only used when an entry's `layoutId` field resolves to an empty string. The entry defaults already use `typewriter_dialogue` and `typewriter_dialogue_option`.

***

### Available Snippets

#### Dialogue Text

| Snippet                             | Default | Description                                                                  |
| ----------------------------------- | ------- | ---------------------------------------------------------------------------- |
| `mythichud.dialogue.max_line_width` | `220`   | Maximum dialogue line width in default-font pixels before automatic wrapping |

Set the value to `0` or a negative number to disable automatic wrapping. Manual line breaks continue to work.

#### Spoken

| Snippet                   | Default | Description                                     |
| ------------------------- | ------- | ----------------------------------------------- |
| `mythichud.spoken.layout` | `""`    | Fallback layout when Spoken `layoutId` is empty |

#### Option

| Snippet                            | Default               | Description                                                          |
| ---------------------------------- | --------------------- | -------------------------------------------------------------------- |
| `mythichud.option.layout`          | `""`                  | Fallback layout when Option `layoutId` is empty                      |
| `mythichud.option.sound`           | `"block.lever.click"` | Sound played when changing selection                                 |
| `mythichud.option.volume`          | `1.0`                 | Selection sound volume                                               |
| `mythichud.option.pitch`           | `2.0`                 | Selection sound pitch                                                |
| `mythichud.option.selected_prefix` | `">>>"`               | Prefix used by `all_option_{position}_prefix`                        |
| `mythichud.option.placeholder`     | `"---"`               | Text used before option reveal and for empty three-option page slots |

#### Cinematic

| Snippet                                   | Default | Description                                  |
| ----------------------------------------- | ------- | -------------------------------------------- |
| `cinematic.mythichud_dialogue.percentage` | `0.5`   | Fraction of each segment reserved for typing |

A value of `0.5` uses the first half of the segment for typing and leaves the second half fully visible.

***

### Choosing Between `layoutId` and Snippets

Use `layoutId` when a specific entry or cinematic segment requires a unique design.

Use snippets when many entries intentionally leave `layoutId` empty and should share one server-wide fallback.
