Epp
Epp
SMSatisfactory Modding
Created by Epp on 12/14/2024 in #help-developing-mods
Saving per-player data on a dedicated server
Does anybody have experience saving per-player data on a dedicated server? I have a SCS hook to attach my custom save data component to AFGPlayerState on construction and it all works perfectly for local gameplay. When I join my dedicated server, none of my player-specific data is restored. I have tried taking a local save file (that I have verified works locally) and loaded it with my dedicated server, but the data does not get restored. I have tried setting up the game in a known state ON the dedicated server and waiting for autosave/leaving the game to force a save (I verified it does), but on rejoin the data does not get restored, nor on server restart and rejoin. From parsing the save file, I can see that my custom component is referenced in the save file but NONE of my custom data is in the dedicated server save file (my custom properties are just stored as arrays of uint8s - nothing fancy). Through logging, I can see that the IFGSaveInterface functions I have overridden are invoked by the dedicated server. IFGSaveInterface::PreSaveGame_Implementation IS CALLED when I expect it to be and I can see that is has the correct data in memory, but that data doesn't get saved in the save file. I notice IFGSaveInterface::PostLoadGame_Implementation is called on server startup long before a player has even joined and acts like the player data is empty, which makes sense given that the save file data is empty, but I don't know what it thinks it's doing since there would/should(?) be no AFGPlayerState with no players connected, I assume?
21 replies
SMSatisfactory Modding
Created by Epp on 9/30/2024 in #help-developing-mods
How do I test my 1.0 mod on Windows dedicated server?
I've been searching all over docs and discord so I apologize if I just missed it. SMM doesn't work on 1.0 yet, ficsit-cli hasn't been updated since long before 1.0, and I've been using the latest Alpakit to install my mod on my local instance. How do I install my mod on my personal Windows dedicated server (it's on a different machine than my dev instance)? I was able to use Alpakit to build for the Windows server target but the docs specifically say not to just copy the mod files over, so I haven't done that.
9 replies