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 .
Advertisement Create a free account Compendium in Game, Join Today

Numeric values (or rolls) in rollable tables

OK, I am very new at this.  If this is not the correct place to ask this question, I'm sorry.  I have absolutely no skills with blogs and forums.  Anyway, I have only been using Roll20 for a few months now.  I've been trying to learn the program and tricks as best as possible to be a quicker and better DM.  I'm running Curse of Strahd now and my players are getting close getting to the castle.  There are several random encounter tables that seem like they would be ideal to use as a rollable table. I have 2 issues that I can't get around.  They are related.  At first, I just wanted the roll table to mimic the random encounter table.  Roll and have it tell me that I need 2d6 of this or 1d4 of that.  However, the output is stopping at the first digit number.   As you can see, I wanted it to display "2d6+2 flying swords", but all I get is the first digit, 2. This naturally led me to the thought of why can't I have the table actually roll the value and report something like '9 flying swords' where 9 would obviously be the result of the roll 2d6+2.   So my question is this, are either  of these two options possible without complicated programming?  I'm still only so-so with macros and api scripts and I really am ok with it reporting '2d6+2 flying swords'.  Thanks for the help and again, I'm sorry if this is the wrong location for this question.
1600070438

Edited 1600070476
Ziechael
Forum Champion
Sheet Author
API Scripter
Natively, rollable tables will not parse actual rolls held in the entries. As noted, if they begin with a number they will see it as a numerical entry and just use that, as if one were attempting to create a different dice mechanic. To avoid that you can just make sure that the entry doesn't begin with a number: "flying swords: 2d6+2" instead of "2d6+2 flying swords" or something to that effect. As a pro user, and likely creator of the game from your description, you can use the recursiveTables script to create table entries containing rolls and get your desired result :)
1600070756

Edited 1600070826
GiGs
Pro
Sheet Author
API Scripter
Trust me, you are not the first to bang your head against roll20's table limitations. IMO roll20's tables are not fit for the purpose they are intended for. But on to your question: if your table item starts with a number, it will just print that number. You can solve this by putting another character before the number. So maybe instead of 2d6+2, use "two d6 plus 2". Or "roll 2d6+2" Secondly, rollable tables cannot roll dice. They can only print out the text. All that said, youre a pro user, so you can use aarons Recursive Tables script, which lets you use tables as they should be. If you include inline rolls in the table like [[2d6+2]], the script will roll them when printing the table roll. As the name suggests, you can also have a table roll on other tables, which also roll on other tables. It creates the table system roll20 should have by default. (Well, almost.)
Thank you for the help. I had the though of using a tick mark (') in front of the text so a number is not the first character in the box.  Glad to know that worked.  I had a little bit of difficulty getting the recursive table script to work and asked a followup question. But it looks like I solved it, so I think I'm good now.