Survival Game Kit Version 2

Getting Quest Map Pro and SGK V2 working together

Please note that, as with all integration tutorials available for Quest Map Pro, this should not be considered an endorsement of the product being covered. These tutorials are provided upon request of the community of customers of Quest Map Pro. It is recommended you do your own research on the quality, support availability, etc. of all products covered before purchasing them.

Setting up Quest Map Pro with frameworks such as SGK v2 will often require a few differences to the standard integration process. In this tutorial we address the different steps required to get Quest Map Pro up and running within SGK v2 so that you can easily work with the two together. Once integrated, all standard Quest Map Pro features should be available to you to use within the project.

This tutorial is done using the version of SGK v2 available in July of 2023. Please note that any future updates made to this system by its developer may require adjustments to this process. Additionally, due to the complexity of SGK v2, this tutorial should be treated as a starting point and additional work may be needed to fully connect the two systems in specific scenarios or use cases. Finally, while Quest Map Pro can be considered a client side system, due to it being primarily a HUD system, it does work as intended under most multiplayer scenarios. A greater understanding of SGK v2 and multiplayer in general may be necessary for ideal functionality under multiplayer environments, particularly in relation to the SGK v2 save system. Again - this tutorial should be treated as a starting point to get base functionality working and built upon as necessary.

Asset Details

View Survival Game Kit v2 on the Unreal Engine Marketplace

View on Orbital Market (What is Orbital Market?)

Brief description (from marketplace page): A multiplayer survival game kit with features like Jigsaw style inventory, equipment, main menu, crafting and weapons.

Youtube Tutorial

The video version of this tutorial is quite similar to the written version. However, the video version may be outdated with small alterations that have happened as a result of the ongoing development of features for Quest Map Pro. With all video tutorials, any alterations to the process will be left as a pinned comment on the video, or just below the embedded video on this page.

Changes to video

As of version 1.5.3 of Quest Map Pro, the changes made to the functions Reset State and Update Possession within BP_QuestMapPro_Manager from 8:17 - 10:02 are no longer necessary as they are incorporated into the system natively.

Written Tutorial

Step 1: Complete standard Quest Map Pro integration

Complete the standard integration procedure covered in the integration documentation. This process is required to get the systems running within your project, capture the map and so on. Please complete all 5 stages of standard integration outlined on the page linked below.

Integration Procedure

Step 2: Adjustments to SGK

Now that the standard integration process has been completed, we need to make some adjustments and additions to the SGK logic to account for Quest Map Pro systems. These adjustments primarily focus on ensuring that Quest Map Pro restarts and maintains functionality through death and respawns.

Adjustments to BP_SGKController

Expand for Steps

Open the Input graph within BP_SGKController and locate the On Possess event. Use a reference to the Quest Map Pro manager component (added as part of integration) to call the function Update Possession after the Master Character reference is set. Connect a reference to Master Character as the Possessed Actor input and ensure that Reattach Helper is set to true, and Track Prior as Player is set to false.

Click on the Quest Map Pro Manager component added to your controller and ensure that the setting Load Save Data on Startup is set to False.

Adjustments to BP_PlayerInventory

Expand for Steps

Open the Death/Respawn graph within BP_PlayerInventory and locate the ServerRespawnsPlayer event. After the Possess function is called, use a reference to Death Controller to called the interface function Get Quest Map Manager, and use the output Manager to call the function Re Initialize QMP.

Step 3: Adjustments to Quest Map Pro

Additional adjustments are also required within the Quest Map Pro manager component to account for some changes necessary when working with SGK v2.

Adjustment to BP_QuestMapPro_Manager

As of version 1.5.3, the steps in the expandable section below are no longer necessary and have been incorporated natively into Quest Map Pro. Versions prior to this will still need these changes applied. To see what version of Quest Map Pro you are using, check out How to check what version of Quest Map Pro you are using.

Expand for Steps

Open the function Reset State within BP_QuestMapPro_Manager. Near the beginning of the function, add an Is Valid node, using the Example UI as the object to check. Connect the normal logic up to the Is Valid output, but bypass the next node (Remove from Parent) when the Is Not Valid is executed.

Open the Update Possession function and locate the Branch node that checks the Reattach Helper boolean. Add an Is Valid node to the True execution pin on this branch. If Is Valid is executed, continue with the normal logic in this function. If Is Not Valid is executed, call the Spawn Character Helper function.

At this point, you should now have Quest Map Pro up and running and working as intended with SGK v2. Even when the player dies and respawns, etc. the map and compass systems should work as intended, and you can go ahead and customise Quest Map Pro as desired, set up landmarks, hidden objects and so on. The section below will cover the process required to hook up Quest Map Pro to SGK v2's save system, and is based loosely off of the logic covered within SGK v2's own documentation, with additions and changes where necessary to account for Quest Map Pro specific systems.

Integrating Quest Map Pro Save Data

Step 1: Edit the save data struct

Before continuing please note that editing structs within the engine, in some scenarios, can cause major project corruption. Before continuing it is recommended that you save all files and close your project before creating a backup. Once done, reopen your project and do not open any files except the struct that needs to be edited. Once the additions have been made, close the engine once again (saving all files that require saving). This is the best way to minimize the chance of project corruption as it ensures that as few resources are loaded as possible at the times of editing. Struct corruption is rare in recent versions of the engine, but can absolutely still happen and all care should be taken to avoid it.

Expand for Steps

Open S_PlayerSave and add 5 new variables to the struct using the details below:

Variable: Landmarks, Class: Str_QuestMapPro_LandmarkData [ARRAY]

Variable: Notes, Class: Str_QuestMapPro_NoteData [ARRAY]

Variable: Waypoints, Class: Vector [ARRAY]

Variable: POIs, Class: BP_QuestMapPro_POI [ARRAY]

Variable: FogMapFileName, Class: String

Once created, save the struct (see warning above for full recommended procedure).

Step 2: Adjustments to BP_QuestMapPro_Manager

Expand for Steps

Locate the Event Begin Play logic in the Event Graph and find the portion of the event that calls the function Load Save Data. Bypass this function as well as the check that occurs after it, as shown in the screenshot below.

Create a new function called Load From SGK with 5 input variables, matching the variables created in the struct in step 1.

Use these input variables to set variables within the component, as shown in the screenshot below (click on the screenshot for a larger view).

Create another new function called Export Fog with one input and one export, both of the type String. Call the input Fog ID and the output Fog Map File Name. This function will be used to export the texture for the players fog map. Create the logic shown in the screenshot below (click on the screenshot for a larger view).

Open the function Process Loaded Save Data and find the Import File as Texture 2D node. Bypass the Select String node connected to its input, using the string that was previously connected to the A input on the select string (see screenshot).

Step 3: Adjustments to BP_SGKSaveGame

Expand for Steps

Create a new function within BP_SGKSaveGame called Get Save Data QMP. This function should have one input called Inventory of class BP_PlayerInventory, another input called Slot Name of type String, and 5 outputs matching the variables created in the struct in step 1.

Create the logic shown in the screenshot below within this function (click on the screenshot for a larger view). Note that variables QMP Manager, Waypoint Data and POI Data are all local variables created just for this function.

Create a new variable in BP_SGKSaveGame called Slot, of type string.

Open the function Save Player Inventory and add two instances of the newly created Get Save Data QMP function, using the input Player Inventory and the newly created Slot variable as the input on this node. See screenshot below (click on screenshot for larger view) for placement of these two node instances, as well as where to connect output variables to.

Step 4: Adjustments to BP_PlayerInventory

Expand for Steps

Open the function Load Player Inventory and locate the end section of the function logic. Just before the Branch node that checks against the boolean Use Learnable Recipes, add the logic from the screenshot below (click on the screenshot for a larger view).

Step 5: Adjustments to BP_SaveSystem

Expand for Steps

Locate the event Call Save Events, within the collapsed graph Saving in the Event Graph of BP_SaveSystem. After the variable Saving Slot is updated, use it to update the variable Slot, created in step 3, in the Save Game Data object.

Last updated