Hello guys I have been trying to make a monster drop item upon death so I start designing some tables to use it as reference for my array but while making them I found a problem that I haven't been able to find a proper answer to it
so after some research I found this page that explain how to make monster drop Link: https://gamedevelopment.tutsplus.com/tutorials/how-to-code-monster-loot-drops--cms-20449 but I seen it have the same issue as what I have. In his table any monster
can drop any item from the table. Imagine I have a big table of item and kill a LV1 Slime and give a Item that I don't suppose to have yet. and that lead me to this question How can I made a Monster drop random Fixed item upon death following the rarity of the item to drop?
So I think about a solution of making a Column in the Item table to save the value of a monster Index to drop so it can be read and drop the item but 2 or more monster can share the same item drop which made this solution to be fail
it have been like a month trying to solve this problem I have been messing with my code and had no luck.
My table are more extends but to make it clear I made this as a Example of how my array are done for drop
I will really appreciate your help and thanks you all for your time!