build an items table, users table , definitions table , items_store table.
In the definitions table store the MainItem_id as foreign key, the Item_needed field which is the ID from the items table , quantity , and OneUnitquantity.
items table consist of:
itemid , item_name
1 gold
2 silver
3 copper
4 fire
5 hepatizon
then this example looks like:
1 gold + 1 silver + 8 copper + 6 fire = 10 hepatizon
definitions table:
MainItem_id , Item_needed, quantity, OneUnitquantity
5 1 1 10
5 2 1 10
5 3 8 10
5 4 6 10
how to store the user's items?
make an items_store table:
userid , itemid, quantity
when a user wanted to create a new item, you select that item from the definition table, and select the recipes. Then you've got a bunch of itemID and quantities.
You need to decide where you want to calculate the user's abilities.
Create queries with them from the items_store table to know how many new items could he/she make. I know people who can build this query in one big query, but its not a shame to solve it with 2 queries and a little php hardcoding.
You should draw this database model, and watch how it looks like. And wait for other opinions of course 🙂