Im currently working on an multiplayer game. Therefore using MySql for my game to store different data ( For example players, resources and so on ).
Lately i implemented items, players receive them by gathering resources for example, later they should also be able to craft them or even equip them if its a sword or an armor piece.
My problem is that due to my small experience with MySql, i have no clue how to add different statistics ( Equipable, Damage, Different Effects and so on ) to the items. Not every item should have them ( For example "Wood" shouldnt have statistics ). How should i modify my tables ? Any help would be appreciated ! Thanks !
My current table structure looks like this :
- ItemCategories ( ID, Name )
- ItemTypes ( ID, Name, ItemCategories_ID )
For more information, how i actually manage/spawn those items in... here two more important tables.
This table contains resources ( For Example "Basic Tree" ) and the item it drops when gathered.
- Resources( ID, Name, ItemTypes_ID, gatheringTime, gatherAmount, spawnWeight)
This table contains the items in the players inventory.
- PlayerInventory( ItemTypes_ID, Player_ID, amount)