The general principle is: “Everything should know how to serialize and deserialize itself”.
I’m not 100% sure if components are serialized or not, or if they’re just initialized to their default values. It would be something to look into. Do components know how to serialize themselves? If not, then you’ll have to come up with some scheme to grab the data you want to save from a component and store it in some object which is easier to serialize, and then in the deserialization stage, you’d read those objects back into the component properties. My gut intuition is to say that components know how to serialize and deserialize themselves because every object in UE4 is made of components, and the editor itself calls the same serialization methods to save your project, so if you change a default value on an actor within its component, that value gets serialized somewhere, so it should work… So… I think if you have a custom component for ship health, you may need to override the serialization method to include your additional variables or at least check to see if the serialization method is being invoked on your save method.
One other thing to check: Make sure that for every variable you want to save, you have the “SaveGame” flag checked. UE4 will loop through every property in your actor and check for this flag to see if it needs to write it to a file.
When you think you have serialized an object, open up the serialized file in a hex editor and look at the data to see if the data you expected to get serialized actually did get saved. You should see a plain text string which describes the variable name and the variable type, followed by the binary data value for that variable. If you don’t see an expected data value in your savefile, then it means that it wasn’t saved properly and you need to look more closely at the save process. If you do see the variable, but aren’t seeing it in an loaded object, then you’ve got a problem with the deserialization steps and that’s where you should begin looking.