> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rollingquest.kramgames.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Messages Editor

> Using the Messages Editor in the RollingQuest level editor to create and manage localized dialog messages.

The Messages Editor lets you create and manage localized dialog messages for your level. Messages can be displayed during gameplay using Lua scripts. Press **M** to open it.

## Opening the Messages Editor

Press **M** from the editor viewport.

## Message Management

### Creating Messages

1. Click **Create** in the Messages Editor
2. Enter a unique message ID in the input field
3. Click **Create** to confirm

The message is added to the level's `MessagesManager` and appears in the message list.

### Editing Messages

1. Select a message from the list on the left
2. Select a language from the language list
3. Type the message text in the text editor
4. Changes are saved automatically when you switch messages or languages

### Deleting Messages

1. Select a message from the list
2. Click **Delete**
3. Confirm in the popup

## Localization

Each message supports multiple languages:

1. The language list shows all available localizations
2. Select a language to edit that translation
3. Type the translated text in the editor
4. Messages without a translation for the current language are empty

### Language Support

The editor uses the game's `LocalizationManager` to determine available languages. The current language is highlighted in the list.

## Message IDs

Message IDs are unique string identifiers used to reference messages in Lua scripts:

```lua theme={null}
-- Display a message in-game
Dialog.createCloseable("my_message_id")
Dialog.createTemporary("my_message_id", 5)
```

## Data Storage

Messages are stored in the level's `MessagesManager` and serialized with the level data. Each message has:

* **Name** — The unique message ID
* **Translations** — A dictionary of language → text pairs

## Modes

| Mode            | Description                                 |
| --------------- | ------------------------------------------- |
| **Editor**      | Normal mode — create, edit, delete messages |
| **New Message** | Prompt for new message ID                   |
| **Want Delete** | Confirmation dialog for deletion            |

<Note>
  Messages are saved with the level. If you reference a message in a Lua script, make sure the message ID exists in the Messages Editor.
</Note>
