Resource system
In this project I call the things placed in the world that you harvest, ”resources”. Think of it like a tree or a rock. A resource contains a drop table of items, for example stone and coal, with min & max amount and an overall drop percentage per item. Items have stats of harvesting speed, dmg, strength tier, type tag and a stack size. This makes it so a tool, for example an axe is just an item with specific statsStrength tier & Type tag
The items "strength tier" and "type tag" are not as straightforward as the other stats, so let me explain.First up the type tag explains what type of item it is, for example if you want to have a specific type of item that can destroy rocks, then it could have the tag pickaxe. Then the rock resource also needs to have the same tag listed as a "can harvest tag". If this is left empty then every item and an empty hand can harvest the resource. Both items and resources can have multiple tags, that is useful if you’d like to make a multitool, or if your resource can be harvested by two or more tools/items but not all of them.Then we have a strength tier. If you want to have resources that can only be harvested by a tool of a certain tier, let's say you want to be able to have upgraded versions of the same tool in your game. You have a wood axe, and try to cut down a very big tree, you can't. But the upgraded stone axe can cut down that tree. But now you might be thinking, why not just add more tags. Then this is where you're wrong. If you for example have a "Axe 1" tag and a "Axe 2" tag, then everything that could be harvested with the lower tier would also need to have the higher tiers tag on it. So that would quickly become a big mess when using this system in a full scale game.