Weight entries in roll tables

Feature Request: To be able to assign weights to items in a roll table. Like this:
1d[Luck Blade:1, Potion Of Climbing:1000]
When rolled, this would make it so the likelyhood of the result being a Luck Blade would be 1:1000.

At the moment if I want to create a drop method with items of different rarity, the only thing I can do is that I can have more instances of the common items in the table - representing their likelyhood.
This is very messy, but other than inconvenient there is another problem: if there are items with extreme rarity in the table, the size of the table will explode, even exceding the possible HTTP header size.

Consider this example. Let’s have the Luck Blade in the table which is legendary, and also the
Potion Of Climbing which is common. Now to represent their rarity, in the table I should have like what, a 1000 piece of Potion Of Climbing and 1 Luck Blade. With few common items, and few legendary ones this already explodes:
1d[Luck Blade, Potion Of Climbing, Potion Of Climbing, Potion Of Climbing .... , Potion Of Climbing]

Obviously, I can always just roll a 1d1000 and have a lookup table or something, but I think the very point of roll tables is to avoid that.

Oh, yes. How did I not think of this!?
But I’m glad you did. I need more votes. :frowning:

While it isn’t quite as clearly stated, there is a request for this type of feature already:

Looking beyond the fact that you’ve offered a bit of a better explanation, is there something else that you’re requesting than what’s requested there? Or can this thread be closed?

Hi @SnowyRiver,

What the OP wants is for the different die options to have different probabilities. A roll on a simple table would have each result with the same probability of showing up. Also, this request is intended for dice:

1d[One:1, Ten: 10,Others: 89]

This is precisely to avoid typing something like

1d[One, Ten, Ten, Ten, Ten, Ten, Ten, Ten, Ten, Ten, Ten, Others, Others, Others, ...]

Or, if we borrow the example in the first comment you linked. Instead of typing: !(1d[Head, Head, Head, Head, Torso, Torso, Torso, Torso, Torso, Torso, Torso, Torso, Torso, Torso, CRIT Torso, CRIT Torso, Left Arm, Left Arm, Left Arm, Left Arm, CRIT Left Arm, Right Arm, Right Arm, Right Arm, Right Arm, Crit Right Arm, Left Leg, Left Leg, Left Leg, Left Leg, CRIT Left Leg, Right Leg, Right Leg, Right Leg, Right Leg, CRIT Right Leg ])

You could just type: !(1d[Head:4, Torso:10, CRIT Torso:2, Left Arm:4, CRIT Left Arm, Right Arm:4, Crit Right Arm, Left Leg:4, CRIT Left Leg, Right Leg:4, CRIT Right Leg ]) … which is considerably shorter.

Granted, the weighing feature could potentially be applied to the tables feature you’re linking.

Hi @roflo1. I understand that. Currently, Astral does effectively support simple, unweighted tables. For that reason, I read the discussion thread on that other feature request as suggesting that what is being requested is weighted tables. As I said, this request does explain it a lot more clearly.

It’s not at all clear for me that the other thread end up requesting weighed tables, so I’ll put a comment there to clarify that. Either way, I don’t mind if this thread is closed if the objective is clear for the devs.