Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Random Roll +/-1

Looking for a way to essentially roll a two-sided die where the results are either 1 or -1. Rolling (1d2-1) gets me halfway there, but I don't know how to exclude specific die results(in this case, 0). The goal is to have a randomized positive/negative multiplier for fluctuations in shop prices.
1603313518
Andreas J.
Forum Champion
Sheet Author
Translator
You could make a Roll Table that have only the two options, "1" and "-1", and call it for example, multiplier . Then you just make rolls with: 1t[multiplier] <a href="https://wiki.roll20.net/Roll_Table" rel="nofollow">https://wiki.roll20.net/Roll_Table</a>
1603325726
Oosh
Sheet Author
API Scripter
This will also work [[2*(1d2-1)-1]]
1603404636

Edited 1603404742
Both are not as intuitive/one-click as I would have hoped, but they are both definitely workarounds that I can work into my random gens in a pinch. Thanks guys. Going one step further, is there a way to utilitize the rollable tables to generate a "shop inventory list" that will generate a semi-random amount of pre-gen items with prices and variable availability and output it as a table in-game? I could swear I saw someone do it once, but went our separate ways before I could ask how they did it.
While not exactly -1/+1, there are the Fate/Fudge dice built-in to Roll20 that are -1/0/+1 (<a href="https://wiki.roll20.net/Dice_Reference#FATE_Dice" rel="nofollow">https://wiki.roll20.net/Dice_Reference#FATE_Dice</a>).
1603454147
David M.
Pro
API Scripter
Random inventory/pricing list sounds like a job for the recursive tables script . It supports expanding inline rolls within table items, which can include calls to other tables .&nbsp; Mediocre said: Going one step further, is there a way to utilitize the rollable tables to generate a "shop inventory list" that will generate a semi-random amount of pre-gen items with prices and variable availability and output it as a table in-game? I could swear I saw someone do it once, but went our separate ways before I could ask how they did it.