javalent / dice-roller

Inline dice rolling for Obsidian.md
274 stars 28 forks source link

🧩 Pass min /max parameters to Lookup Table rollers #323

Closed Tocath closed 1 month ago

Tocath commented 3 months ago

Scope

It would be great if I could pass min / max parameters to a Lookup table roller in order to adjust which rows it uses for the dice.

IE, given the following table, it would be very helpful to be able to exclude high or low values based on the need:

dice: 1d20 Loot
1-5 Junk
6-8 Scraps of Food
9-12 Healing Potion
13-16 100gp
17-,19 Rare Magic Ring
20 Epic Magic Sword

^Treasure

Then, based on the need, I could define a minimum and max value for a given roll, in the same way that I can do so for number dice. IE, dice: [[ThisNote^Treasure]]1,12 could give me a result from the first three rows of the table...

Discovery

See above

Validate

Windows, Mobile, Etc.

valentine195 commented 1 month ago

This can be accomplished by passing your own lookup formula as part of v11.2