> For the complete documentation index, see [llms.txt](https://docs.sparkframework.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sparkframework.dev/documentation/user-guide/core-systems/save-system.md).

# Save System

The Save plugin handles persisting game state between sessions. It saves and loads player data, inventory contents, quest progress, customization choices, and everything else that needs to survive a game restart.

## How Saving Works

Spark's save system works automatically for all built-in plugins. Each plugin that stores data registers its own save/load logic with the Save plugin. When a save is triggered, each plugin's data is collected and written to a save file. When a load is triggered, the data is read back and applied.

You don't need to configure save behavior for built-in systems. It works out of the box.

## What Gets Saved

Each plugin manages its own save data. Here is what each plugin saves:

| Plugin                  | Saved Data                                          |
| ----------------------- | --------------------------------------------------- |
| Character               | Character selection and state                       |
| Items                   | Inventory contents, equipment loadout               |
| Currency                | Wallet amounts                                      |
| Quests                  | Active quests, objective progress, completed quests |
| Progression             | Experience and level per progression instance       |
| Classes                 | Main class and secondary class selections           |
| Professions             | Learned professions                                 |
| Races                   | Selected race                                       |
| Character Customization | All customization choices (elements, colors)        |
| Crafting                | Unlocked recipes                                    |
| Spellbooks              | Learned abilities                                   |
| Item Bar                | Slot assignments                                    |
| Game Settings           | Audio, video, and keybind settings                  |

## In-Game Save Manager

The **InGameSaveManager** extension provides an in-game UI for save/load operations. It lets players:

* Save to a named slot
* Load from a saved slot
* View existing saves with timestamps
* Delete saves

Add the InGameSaveManager component to your scene to enable this UI.

## Save Data Overview

Save data is stored as serialized files on the player's device. The location and format are managed by the Save plugin's **Save Provider** system.

**GameSettingsSaveProvider** handles game settings separately from gameplay saves, since settings should persist regardless of which save slot is loaded.

## Auto-Save

Some components support auto-save. For example, **InventoryEntity** can be configured to save automatically when items change. This ensures data is not lost if the game crashes.

## Manual Save/Load

Saves and loads can be triggered through commands and the in-game save manager UI. The templates include pre-built save/load screens.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sparkframework.dev/documentation/user-guide/core-systems/save-system.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
