> ## 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.

# Saving Levels

> How to save levels in the RollingQuest editor: file paths, naming conventions, thumbnails, and overwrite confirmation.

The Save menu lets you store your level to disk. Press **Escape** → **Save** to access it.

## Opening the Save Menu

1. Press **Escape** to open the Main Menu
2. Click **Save**

## File Path Format

Levels are saved using a path format: `folder/levelName`

* Paths use `/` as the directory separator
* Each path component must contain only letters, digits, and underscores
* Nested folders are supported (e.g., `campaign/level01`, `my_packs/forest/level1`)
* The level is saved as a `.rqlevel` file

### Path Validation

The editor validates the path in real-time:

* **Valid path** — Green text preview, Save button enabled
* **Invalid path** — Red text preview, Save button disabled

Invalid reasons:

* Empty path
* Contains invalid characters (spaces, special characters)
* Empty path components (e.g., `folder//level`)

## Saving Process

1. Enter the level path in the input field
2. Click **Save**
3. If the level already exists at that path, a confirmation popup appears
4. The level data is built from the current editor state
5. A thumbnail is generated from the current viewport
6. The level is saved to disk
7. The unsaved changes flag is cleared

## Thumbnail Generation

When saving, the editor generates a thumbnail image:

* Captured from the current viewport angle
* Stored as part of the `LevelData`
* Displayed in the Load menu for preview

## Overwrite Confirmation

If a level already exists at the specified path:

1. A Yes/No popup appears asking "Rewrite level?"
2. Click **Yes** to overwrite the existing file
3. Click **No** to return to the save menu

<Warning>
  Overwriting a level permanently replaces the old file. Make sure you want to replace it before confirming.
</Warning>

## Post-Save

After saving:

* The `LevelPath` is updated to the new path
* The unsaved changes flag is cleared
* The status label shows the saved path in green
