Maybe you don't fully understand my solution.
Code:
class Item : Game.Item
{
// various methods and members
ItemData* data;
}
class ItemData
{
Str Name;
// and whatever else is common to all items
}
class ArmorData : ItemData
{
int ArmorClass;
// whatever else your armor needs
}
Then in the Item class Create method:
Code:
if (type == [armor]
{
data = new AmorData();
// set members
data->AmorClass = [probably from an object param]
}
else
data = new ItemData();
// set common members
data->Name = [from params]
And do the same thing in the load method. So the object params would have an indication of the type of item and that is saved and loaded.
So when Created...based on params, instantiate the ItemData member as ItemData, ArmorData, WeaponData, FoodData...whatever you create.
When loaded...based on the saved type, instantiate the ItemData member as the specific data type you need.
Does this make sense? I know it works because I am doing it this way.