Jump to content
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

Hi Ben sorry to bother I am trying to run a dedicated server for Arma reforger with G-portal provider so I have this issue that when the server restarts we lose the save or even if I move the saved data from another server it can't load the save file, could you kindly help me with that you seem to know a lot more than me, what about persistence string? Where should be placed?

 

Thank a lot.

Share this post


Link to post
Share on other sites
On 11/8/2023 at 5:30 AM, ben@ledbylies.com 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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×