Will do.
So, I don't think I'd ever want to make it completely random, but rather let an admin put a list of items in the YAML that can be chosen from. That eliminates the debug rifle problem (unless, you know, the admin puts that in the yaml).
Today, I explored embedding LiteDB into the mod, so that we can keep track of how many times a user has claimed a reward.
This would let us do a tiered reward system, so that it would/could look something like this in the yaml:
Rewards:
-Threshhold: 1
--6000 credits
-Threshhold: 10
--10000 credits
--Some pentaxid (1-5)
--Some silicon
--a t2 mining drill
-Threshhold: 20
--15000 credits
--more pentaxid (15-40)
--a t2 multitool
--Some magnesium (99)
--Some crushed stone (99)
-Threshhold: 50
--Lots of pentaxid (500)
--30000 credits
--Magnesium cache (999)
--Crushed stone cache (3x999)
-Threshhold: 20000
--a debug rifle
This is psuedo-code..the yaml would probably contain object ID's, depending on how Empyrion lets me access them. And the "-" would be replaced with spaces, but I don't know a good way to represent that in bbcode.
The "Thresholds" are vote tiers...when a user votes for the 1st time (through the 9th time), they get the "Threshhold: 1" tier. Votes 10-19 get the "Threshhold:10" tier, etc. The code would determine the user's reward tier, and then randomly choose an item from that tier to grant the player.