Let's say you have an item database which has every item in your game. This works fine for regular items like a Health Potion, a normal Iron Sword etc, because these items have ItemID's so we can get an exact copy of this item. But what if we have an Iron Sword with an enchantment: '+5 Fire Damage'? (or whatever)
If you were to save that item to a player's inventory, exit the game and load the game, the item will load as a regular Iron Sword, because it still has that ID.
Specifically, how would you save that item to a file? I'm using Unity, so to save the Player's inventory, I use:
PlayerPrefs.SetInt("Inventory " + i, inventory[i].ItemId );
Would you create a custom item ID for every item with enchantments or is there a better way around this?