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

Help with rollable table, using an input to alter the random table roll

Hi, I'm playing Dungeon Crawl Classics which has a stat called Luck.  A players Luck, like other stats, can have anywhere between a -3 to +3 modifier based on how low or high the stat is.   I want to create a carousing table that will allow a player to input their current luck modifier (it can change during the course of gameplay) so that the -3 up to +3 will change the random table result up or down.  I'm imagining that when the player were to click the table a box would pop up that would have the player input their luck modifier and then when they click enter the table would roll and output the result. I'm sure an input like this could have many other uses in my campaign (say for weather, NPC reactions, treasure, etc) if I can just figure out how to make it work. Thanks for any help you can provide.
Unfortunately rollable tables in Roll20 do not work like standard tables with arrays that can be modified up or down -- they are simple weighted tables, which function more like putting all the potential options on slips of paper into a hat and drawing one out at random... adding a modifier doesn't have any effect on which one you draw out. It is possible to build a table with a custom script (since you're a Pro subscriber) that you could access with a custom chat command, and that could include a query for the modifier or pull it directly from your games character sheet (if you're using one and it tracks the luck points).
1665621279

Edited 1665632363
GiGs
Pro
Sheet Author
API Scripter
There are two ways to do what you want using a Rollable Table: create 7 tables, one for each of -3, -2, -1, +0, +1, +2, +3, and set up the macro to call the correct one based on the modifier. Since you're a Pro user, you could use a script to load in the table into the API, then pick the correct entry based on the roll + modifier. There's an old script that handles modifier, called Real Rollable Tables I think. There might be other scripts that manage this.
I am a pro subscriber but I'm not so great at macros just yet.  However I guess I have something to work towards now.  Thank you both for the quick replies.  
1665857776
timmaugh
Forum Champion
API Scripter
The Muler metascript is about to get this ability... So your rollable tables will be able to become static-access tables -- meaning you can retrieve item 1d6 = 4, or you can retrieve item 1d6+3 = 7. It is currently in the testing phase.
Timmaugh, great news.  Thank you for posting that.  Is there a thread I can follow so I'll know when it's out of testing?
1665877614
timmaugh
Forum Champion
API Scripter
The Muler thread is closed from inactivity, so I'll have to create a new one. But I'll make a note to poke you with a PM when I post it!
Thank you!