Setting Up Save Data

Getting Quest Map Pro save data working with your save system

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

This tutorial assumes you have already completed the Integration tutorial and have Quest Map Pro successfully working within your project.

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.

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.

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.

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.

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.

VariableDescription

Fog Map

Texture 2D object. An image representing the fog opacity as displayed on the map.

Landmark Data

Landmark data struct array. Contains all current landmark data.

POIs

POI object reference array. Contains all current known POIs.

Player Notes

Player Note data struct array. Contains current details of all player notes on the map.

Waypoints Data

Vector array. Contains all locations for current waypoints.

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 for more information on how to work with quest markers within Quest Map Pro.

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

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.

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.

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

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.

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

Last updated