1 switch randomization is pretty easy.
To do it, set up trggers like this:
QUOTE(Trigger)
Always.
----------
Modify death counts for Player: Set to 0 for Random.
QUOTE(Trigger)
Always.
----------
Randomize Switch 1.
QUOTE(Trigger)
Switch 1 is Set.
----------
Modify death counts for Player: Add 128 for DC: Random.
QUOTE(Trigger)
Always.
----------
Randomize Switch 1.
QUOTE(Trigger)
Switch 1 is Set.
----------
Modify death counts for Player: Add 64 for DC: Random.
QUOTE(Trigger)
Always.
----------
Randomize Switch 1.
QUOTE(Trigger)
Switch 1 is Set.
----------
Modify death counts for Player: Add 32 for DC: Random.
QUOTE(Trigger)
Always.
----------
Randomize Switch 1.
QUOTE(Trigger)
Switch 1 is Set.
----------
Modify death counts for Player: Add 16 for DC: Random.
QUOTE(Trigger)
Always.
----------
Randomize Switch 1.
QUOTE(Trigger)
Switch 1 is Set.
----------
Modify death counts for Player: Add 8 for DC: Random.
QUOTE(Trigger)
Always.
----------
Randomize Switch 1.
QUOTE(Trigger)
Switch 1 is Set.
----------
Modify death counts for Player: Add 4 for DC: Random.
QUOTE(Trigger)
Always.
----------
Randomize Switch 1.
QUOTE(Trigger)
Switch 1 is Set.
----------
Modify death counts for Player: Add 2 for DC: Random.
QUOTE(Trigger)
Always.
----------
Randomize Switch 1.
QUOTE(Trigger)
Switch 1 is Set.
----------
Modify death counts for Player: Add 1 for DC: Random.
After this, the death count for "Random" will be a random value 0-255.
Let's say you had 2 different items to spawn, but you wanted one of them to be three times as common as the other. You could just do this:
QUOTE(Trigger)
Player has suffered at least 0 deaths of Random.
Player has suffered at most 191 deaths of Random.
----------
Item one: 75% chance
QUOTE(Trigger)
Player has suffered at least 192 deaths of Random.
Player has suffered at most 255 deaths of Random.
----------
Item two: 25% chance
You can change the frequency of the item spawn very easily by adjusting the range of numbers that activate them.
Using 0-255 for only 2 items is
overkill, but you get the idea.
You would probably want to add some kind of activator to the item-creating triggers, like
"Player has suffered at at least 1 deaths of INeedAnItem" then, after you make the item, invalidate it with
"Modify death counts for Player: Subtract 1 for INeedAnItem".