Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
ben@ledbylies.com

Persistence using SaveLoad

Recommended Posts

Hi,

 

I'm trying to script a gamemode/mission that will persist objects, locations, resources, etc when all the players are disconnected or when the dedicated server restarts.

 

I made the assumption based on what I was able to find online that I should be creating a struct hold the data and then I would select that struct in the SaveLoad component.  I've created a test struct that inherits from SCR_JsonApiStruct and I placed it in Scripts\GameMode\SaveLoad (and tried some other locations) but it won't show up as selectable in the SaveLoad component.  

 

I'm a C# dev for work so I thought I had a good handle on how this would work but I guess the components are throwing me.

 

Does anyone know what I'm missing or have a link to anywhere this might be documented?

 

Thanks,

 

Ben

Share this post


Link to post
Share on other sites

Update: Just had a bit of a lightbulb moment and looked at the Reforger folder structure.  For anyone that finds this in the future it needs to be in:

scripts\Game\GameMode\SaveLoad

 

 

  • Like 1

Share this post


Link to post
Share on other sites
On 11/8/2023 at 5:30 AM, [email protected] said:

Hi,

 

I'm trying to script a gamemode/mission that will persist objects, locations, resources, etc when all the players are disconnected or when the dedicated server restarts.

 

I made the assumption based on what I was able to find online that I should be creating a struct hold the data and then I would select that struct in the SaveLoad component.  I've created a test struct that inherits from SCR_JsonApiStruct and I placed it in Scripts\GameMode\SaveLoad (and tried some other locations) but it won't show up as selectable in the SaveLoad component.  

 

I'm a C# dev for work so I thought I had a good handle on how this would work but I guess the components are throwing me.

 

Does anyone know what I'm missing or have a link to anywhere this might be documented?

 

Thanks,

 

Ben



Have you looked here?  : Arkensor made a custom framework for persistence with some instruction along it:   https://github.com/Arkensor/EnfusionPersistenceFramework

Share this post


Link to post
Share on other sites

×