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?...
Solution:Ok, I can confirm that the issue was fundamentally about network serialization. Once I expanded the enum, everything "just worked" the way I expected and I no longer need a SCS hook for custom per-player save data.