Game Development - Loot Drop Table


In my upcoming game for April I had to create a loot drop table for the 40 herbs and spices a player could get. I didn't want to simply initiate a random number, but instead lock certain herbs and spices to different months and times of the day. So maybe basil is pretty easy to find between 6am and 6pm in March, but impossible to find in July.

What I did was for each herb and spice to generate 12 random numbers between 1 and 12, which represents the months January through December. Why 12 random numbers? No real reason.

The spreadsheet then finds every entry for every herb and spice that equals the month I'm currently looking to populate. I then copy all of those entries and put them in the appropriate array in the game. Each entry is actually a reference to a specific herb or spice. So if the "January Day Time" array has a lot of "Basil" entries in it, then the probability of finding that entry is higher since the game looks in that specific array and randomly chooses one.