The trick D2 uses is using a table similar to this:
TreasureClass Item1 Prob1 Item2 Prob2 Item3 Prob3 ...
runes23 zod 1 runes22 5000
runes22 cham 1 runes21 5000
runes21 jah 1 ber 1 runes20 5000
...
As you can see, some of the items are actually TreasureClasses, which have their own entries. Whenever the item picker lands on a TreasureClass, it drops to the corresponding table row and "rolls the dice" again, so to speak. This is repeated until the item picker lands on an actual item.If you look at TreasureClassEx.txt from Diablo II, you'll see that they further use this system to calculate nodrop rates, item generation per act/per difficulty, etc. Pretty cool once you wrap your head around it!