# Adventure Creator

## 1. Overview

Crystal Save ships a dedicated `CrystalSavesList` element that works alongside Adventure Creator’s built‑in save list while remaining compatible with AC menus, translations, and ActionLists, giving you full Crystal Save slot management inside Adventure Creator projects.

<figure><img src="https://166712561-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp47l4hoFKIHGBwL1Cm4D%2Fuploads%2FZRTM7pVLTo1uEKiMNXUp%2Fimage.png?alt=media&#x26;token=3c63d906-9934-478f-b808-bae82131e97a" alt=""><figcaption></figcaption></figure>

## 2. Requirements

1. Install Adventure Creator and Crystal Save
   * The menu element performs its own runtime initialization
2. Now install this Adventure Creator Save Module

## 3. Enhanced Crystal Save AC Game Editor

Adventure Creator’s built‑in Menu Manager drop-down is hard coded, so Crystal Save provides an alternate editor window that mirrors the full AC menu workflow while adding the Crystal Save element type to the element list.

<figure><img src="https://166712561-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp47l4hoFKIHGBwL1Cm4D%2Fuploads%2FZ0tyhWzhIE3VtMUTrpZ7%2Fimage.png?alt=media&#x26;token=8f84fe1f-d5d6-41e1-95ba-0f64cb38e444" alt=""><figcaption></figcaption></figure>

Open it via **Tools → Crystal Save → Adventure Creator → Menu Editor**, then use the standard menu/elements panes, including the new “CrystalSavesList” choice in the “Add new element” drop-down-button—to create or edit menus without touching Adventure Creator’s core files.\
A handy toolbar button opens AC’s original Game Editor if you ever need to jump back for other manager tabs.

## 4. Building Menus with CrystalSavesList

Make sure to set the Menu Save or Load Properties to

* **Source: Unity Ui Prefab**

  * Check if the references in **Linked Canvas prefab** and **RectTransform boundary** exist, if not reference for Load the **LoadUI** and for Save the **SaveUI** prefab

  <figure><img src="https://166712561-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp47l4hoFKIHGBwL1Cm4D%2Fuploads%2F2uWuBeUv1OPbs1UkBtKT%2Fimage.png?alt=media&#x26;token=1e22fce4-4fb3-4f22-be50-90a903c82f68" alt=""><figcaption></figcaption></figure>

  <figure><img src="https://166712561-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp47l4hoFKIHGBwL1Cm4D%2Fuploads%2FUwo11DLz7CuYqvEPMgbo%2Fimage.png?alt=media&#x26;token=dcfa7192-7806-4e60-92ed-5540ae211f2a" alt=""><figcaption></figcaption></figure>

When you add the element, configure it just like AC’s native save list: choose Save or Load mode, limit slot counts, allow empty slots, expose “new save” entries, and hook ActionLists for post-save/load logic. **Don't forget to reference the Load/Save buttons under Linked button objects (if not already referenced by default) - Open the SaveUI / Load UI prefab to reference its button child objects**

<figure><img src="https://166712561-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp47l4hoFKIHGBwL1Cm4D%2Fuploads%2FB7fKZKBRbcdVDMi00lQA%2Fimage.png?alt=media&#x26;token=f54392c3-299e-4298-bcac-1e6decb397b2" alt=""><figcaption></figcaption></figure>

<figure><img src="https://166712561-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp47l4hoFKIHGBwL1Cm4D%2Fuploads%2FvM4HmRJzH2zqtnCdrpYx%2Fimage.png?alt=media&#x26;token=27946c52-772e-492f-930d-e91ce74f0fac" alt=""><figcaption></figcaption></figure>

<figure><img src="https://166712561-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp47l4hoFKIHGBwL1Cm4D%2Fuploads%2FxP2Y4SVh8qM2XduRMPAF%2Fimage.png?alt=media&#x26;token=b096a95c-8031-40a2-ab20-6dd6e00826b8" alt=""><figcaption></figcaption></figure>

Slot labels can be formatted with placeholders such as `{scene}` or `{datetime}`, and you can disable custom naming to fall back to Crystal Save defaults. *Keep in mind the Preview box does not show previews for Custom Metadata.*\
At runtime the element resolves save data through the Crystal Save `SaveManager`, translating between AC slot indices and Crystal Save’s 1-based numbering, and it refuses to run until a manager is available to avoid corrupt operations.

## 5. Persisting Adventure Creator data with Remember Component

<figure><img src="https://166712561-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp47l4hoFKIHGBwL1Cm4D%2Fuploads%2F9XDi58VsJJx3rglg9x1B%2Fimage.png?alt=media&#x26;token=edb5b756-b092-4daf-9eac-43a8d0c78372" alt=""><figcaption></figcaption></figure>

Create a dedicated GameObject, add the `Remember Component` component, and use its “Add Remember Component…” button to stack the Crystal Save remember helpers you need while keeping stable component IDs across play mode reloads.

### Saving Global Variables

Attach `RememberACGlobalVariables` through the composite to snapshot Adventure Creator’s global variables; you can optionally enable **Skip Saving When Unchanged** to avoid redundant writes, and the component safely reads/writes through `KickStarter.runtimeVariables` with typed serialization.<br>

Place this GameObject in any scene that should persist data (e.g., your bootstrap scene) or mark it `DontDestroyOnLoad` if you need the remember components available across the entire project.

### Saving Local Variables

For scene-specific `LocalVariables`, add `RememberACLocalVariables`, which requires the AC `LocalVariables` component and applies the same delta-saving optimizations. Reference the GameEngine GameObject in its Local Variables field. (see screenshot above)

### Saving Inventory

Same procedure as Saving Global Variables (see screenshot above)

### Saving a conversation

<figure><img src="https://166712561-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp47l4hoFKIHGBwL1Cm4D%2Fuploads%2FdC2qNE4HN5EM0UxiJvr4%2Fimage.png?alt=media&#x26;token=66b9b3dc-d5f3-44b7-8d13-b1072627e57f" alt=""><figcaption></figcaption></figure>

Add the Remember AC Conversation component to the Conversation GameObject. See the demo for reference.

* The Conversation To Save field can be left empty if the Conversation component is on the same GameObject as the Remember AC Conversation component.

<figure><img src="https://166712561-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp47l4hoFKIHGBwL1Cm4D%2Fuploads%2Fi9fgv7z4SpmiinjWAMty%2Fimage.png?alt=media&#x26;token=8b31116d-e28c-43e9-93b8-bc1e0ec71e56" alt=""><figcaption></figcaption></figure>

## 6. Crystal Save action library for Adventure Creator

After registering the Crystal Save actions in Adventure Creator’s Action Manager, they appear in the **Third Party** category thanks to their `ActionCategory.ThirdParty` designation.

<figure><img src="https://166712561-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp47l4hoFKIHGBwL1Cm4D%2Fuploads%2FScvlOjJUEorSZlFQ690T%2Fimage.png?alt=media&#x26;token=ec2bdf7c-b308-4a8e-8adb-1cea391147bb" alt=""><figcaption></figcaption></figure>

Available commands include:

* **Crystal Save** – Save, load, delete, or test for existing slots with optional parameters (including bool outputs for existence checks).
* **Destroy with snapshot** – Capture a snapshot and destroy/deactivate a target so it can be restored later.
* **Restore destroyed GameObject / prefab** – Recreate objects by Crystal Save Unique ID or Prefab Asset ID, with optional frame delays for safe instantiation.
* **Instantiate saveable prefab** – Spawn Saveable Prefabs through the factory with pooling overrides and parameter outputs.
* **Restore single GameObject by ID** – Pull a specific object state from a chosen save slot.
* **Load scene after snapshot** – Take an in-memory snapshot, populate pending prefabs, then change scenes asynchronously or additively without touching disk saves.

<figure><img src="https://166712561-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp47l4hoFKIHGBwL1Cm4D%2Fuploads%2FwohsNRFXAi5u8nhWI19t%2Fimage.png?alt=media&#x26;token=b0a531ab-9d68-49b3-8e2f-c2291aef5aa8" alt=""><figcaption></figcaption></figure>

Follow Adventure Creator’s documentation to add these actions to the Action Manager before using them in ActionLists.

## 7. Typical workflow

1. Use the enhanced editor to add a menu containing `CrystalSavesList`, configure it for saving and loading, and ensure a `SaveManager` is active so the element can populate slot labels and trigger operations.

Place a persistent Remember Component GameObject in your bootstrap scene, adding `RememberACGlobalVariables` (and `RememberACLocalVariables` where needed) so AC variables are serialized alongside the rest of your Crystal Save data.

In ActionLists, call the Crystal Save actions (e.g., trigger `ActionCrystalSave` to save before transitioning scenes, or restore prefabs as part of a resume flow).

## 8. Troubleshooting & tips

* Check the included Demo Scene (Assets/Plugins/CrystalSave/Modules/AdventureCreator/Demo) to learn how to persist various AC types via Crystal Save.
  * **Requires the AC's original 3D Demo Scene**

* If the menu shows “No SaveManager,” verify that the Crystal Save manager is present and initialized, and that your scripting defines are configured correctly.

* Compilation or scripting define issues can hide the enhanced editor menu item; recheck the defines and Unity console if it fails to appear.

* When save/load operations misbehave, inspect the Unity Console for Crystal Save logs and confirm your slot configuration matches the `SaveManager` setup.

  * Make sure you have set the correct List type in the Properties

  <figure><img src="https://166712561-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp47l4hoFKIHGBwL1Cm4D%2Fuploads%2FKxbCNw3ATXOuZBFMa3E0%2Fimage.png?alt=media&#x26;token=b9eee05a-80e0-4999-835a-05796149a019" alt=""><figcaption></figcaption></figure>

* Ensure that all button references are set

<figure><img src="https://166712561-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp47l4hoFKIHGBwL1Cm4D%2Fuploads%2FDf3a4cWLCSNffuNkPPIx%2Fimage.png?alt=media&#x26;token=3e6ee592-9853-48f3-87f7-bed5eee42a80" alt=""><figcaption></figcaption></figure>
