---
description: Getting Quest Map Pro save data working with your save system
---

# Setting Up Save Data

This page covers the process of integrationg Quest Map Pro save data into your own save system. The steps here should be followed closely to ensure all functionality works as intended, but may need to be slightly adjusted on a project-by-project basis. This page assumes you are using Unreal's built in sava data system, but should still be useful if you are using an external/third party save solution..

{% hint style="info" %}
This tutorial assumes you have already completed the [Integration tutorial](integration) and have Quest Map Pro successfully working within your project.
{% endhint %}

{% hint style="warning" %}
This tutorial is only applicable to Quest Map Pro version 1.4 onwards as it requires framework added in that update. Following these steps will not work under prior versions. To see what version is currently available, please check the [Update History](../updates/update-history).



Additionally, due to the nature of save data, its very likely that one setup will be wildly different to the next. As such, the tutorials on this page are not regular step-by-step processes, but rather cover the process of collecting the necessary data to parse to your save system, and implementing that same data on load.
{% endhint %}

## Written Tutorial

The specific set of data required to be collected for save, and implemented on load, is going to vary based on the feature set being used in your project. For example, if you are not using landmarks in your project, then you can forego the landmark array in your setup. Similarly, if you are not using map fog, then the fog map image can be ignored. The steps below outline how to capture all data and should be adjusted within your own setup according to your needs.

### Enabling External Save Data

By default, Quest Map Pro is configured to use its own save data file for Quest Map Pro specific data. This is, in most cases, not ideal and it is much more likely that you will want to incorporate the QMP specific data into your own save data. To do this, you must first enable the option Use External Save Data on the Quest Map Pro Systems Manager on your controller. This will disable the built in save system and allow you to follow the additional steps below to incorporate QMP data into your own save data.

<figure><img src="https://1573950542-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx9zU1bZVnDGxJMF5Ja1M%2Fuploads%2FP2INu14U2fZkxYKQhj3S%2Fimage.png?alt=media&#x26;token=6952b655-4fb2-4711-ad26-199444dd39aa" alt=""><figcaption></figcaption></figure>

### Collecting Data to Save

To collect the data Quest Map Pro uses for save at the time of saving, the function **Get Save Data** (pictured below) can be called in your controller by dragging off from a reference to the Quest Map Pro Systems Manager.

<figure><img src="https://1573950542-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx9zU1bZVnDGxJMF5Ja1M%2Fuploads%2Fe0Rg5qij8Mxq3BF24QWa%2Fimage.png?alt=media&#x26;token=93b9e954-3f1e-4be0-9099-9f23553a3149" alt=""><figcaption></figcaption></figure>

As shown, this function will give an output of 5 variables, representing the various data used by Quest Map Pro that may be required for saving and loading.

<table><thead><tr><th>Variable</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Fog Map</strong></td><td>Texture 2D object. An image representing the fog opacity as displayed on the map.</td><td></td></tr><tr><td><strong>Landmark Data</strong></td><td>Landmark data struct array. Contains all current landmark data.</td><td></td></tr><tr><td><strong>POIs</strong></td><td>POI object reference array. Contains all current known POIs.</td><td></td></tr><tr><td><strong>Player Notes</strong></td><td>Player Note data struct array. Contains current details of all player notes on the map.</td><td></td></tr><tr><td><strong>Waypoints Data</strong></td><td>Vector array. Contains all locations for current waypoints.</td><td></td></tr></tbody></table>

{% hint style="info" %}
Note that quest data is not included in this data as it is expected that active quests will be managed by your own quest manager and added/removed dynamically by that. Please see [Setting Up Quests](setting-up-quests) for more information on how to work with quest markers within Quest Map Pro.
{% endhint %}

Once this data has been collected by running this function, you can parse this off to your own save data object and handle in the manner that makes the most sense within your project. The recommended method for handling this would be to utilize interface message functions to parse the data to your save data object, but the specific implementation may vary depending on your save system.

### Loading Save Data

In order to load Quest Map Pro save data from your own save data, a couple of things are required to be set up.

#### Setting Up the Controller Interface Function

Firstly, your controller must be able to reference the save data used. Once you are able to access the save data as a reference, you can use the interface message function, Get Save Data, which should be accessible already (as you will have added the necessary interface to your controller in [step 2 of the integration process](integration/add-interface-to-your-controller)). You simply need to hook up your save data to the output. Note that the output takes an object reference, so this should work with any save data system.

<figure><img src="https://1573950542-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx9zU1bZVnDGxJMF5Ja1M%2Fuploads%2F60ykdJwOsABAvwAsjiSc%2Fimage.png?alt=media&#x26;token=cdae2422-0114-4ee8-895b-517c0d44bf05" alt=""><figcaption></figcaption></figure>

#### Setting Up Interface Functions In Your Save Data

The next step is to set up the required interface functions and variables within your save data. To do this, you will need to add the interface **BPInt\_QuestMapPro\_SaveData** to your save data object.  To do this, open your save data object (whether this is a blueprint of the engine's SaveGame class, or a blueprint used by an external system) and click on Class Settings on the blueprint editor toolbar.

<figure><img src="https://1573950542-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx9zU1bZVnDGxJMF5Ja1M%2Fuploads%2FDOaMO4nVMs9m4eKF5z6w%2Fimage.png?alt=media&#x26;token=ff802b2a-2d91-46e4-aea9-02c6732c61b9" alt=""><figcaption></figcaption></figure>

Navigate to the Interfaces section of this panel and click the **Add** drop down box. Add the interface **BPInt\_QuestMapPro\_SaveData**. Compile and save your controller before proceeding.

<figure><img src="https://1573950542-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx9zU1bZVnDGxJMF5Ja1M%2Fuploads%2FYHWpehFObqMUth5Gi1fP%2Fimage.png?alt=media&#x26;token=3683f5ca-9b59-4e2c-a699-c63c50aa18d0" alt=""><figcaption></figcaption></figure>

You should now see several interface functions available in the function panel, as shown below.

<figure><img src="https://1573950542-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx9zU1bZVnDGxJMF5Ja1M%2Fuploads%2FsRXRFdlEM1myeDTMnmv9%2Fimage.png?alt=media&#x26;token=8ddd9f50-688a-4ce8-96a0-f46140e293cf" alt=""><figcaption></figcaption></figure>

Each of these functions will require an output variable that matches the save data that they manage. As such, you may not need to implement all of them. For each required set of data, implement the matching function in your project. For instance, if you are using landmarks and wish to save and load landmark data, you will need an array of the struct **Str\_QuestMapPro\_LandmarkData** in your save data object. This can then be connected up to your interface function return node as such.

<figure><img src="https://1573950542-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx9zU1bZVnDGxJMF5Ja1M%2Fuploads%2FY9dsQqLm5vdjGlT640KE%2Fimage.png?alt=media&#x26;token=c2a4683c-c337-4c2a-8ce6-26051298dd0c" alt=""><figcaption></figcaption></figure>

One exception to take notice of here is the function **Get Fog Map File Name**. Due to the limitations in place on what engine functions the SaveGame object type can call, it is impossible to import the texture 2D object directly within the save game object. To get around this, the recommendation is to have your save system export the FogMap texture 2D object given by the Get Save Data function (covered in [Collecting Data to Save](#collecting-data-to-save)) and rather than saving the texture directly into your save data object, instead saving the filename (including its path) as a string variable. This can then be called with **Get Fog Map File Name** and used to load the exported texture (this is automatically handled by Quest Map Pro in this case).

