VC++ 2010 - Best way to save a set of variables for an object?
Posted on 2011-10-10
This is in VC++ 2010.
I'm trying to figure out how to save this information properly and load it per game session at the moment. What I'm trying to save is a 'ship loadout'. A ship loadout would be the EQUIPMENT on a ship. All equipment have an ID, and that's all I'm trying to save, a bunch of ID's for each ship you use.
First off, it can't be static, each ship has a set have a amount of equipment slots (Which I can grab the amount per ship), but it is different per ship. I want to be able to save ship loadouts PER SHIP. (Which I'll be using the numeric keys to save and load ships.) Each ship also has an ID it can call.
So what I want is each ship ID will have ship loadouts assigned to it that can be saved or loaded for future use. I was aiming to have 3 loadouts per ship maximum, if that helps anyone. Again, all I need is the equipment IDs that can be assigned to each ship ID, which I can grab on a ship very easily. All IDS are 5 digits long.
I'm not asking for full fledged coding, I'm mainly asking for a way to store this properly, possibly with a small example using dummy coding to save.