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

Roll Table

1589225059

Edited 1589225702
Alex
Pro
Hi, I've been trying to add a critical-hit table and the 2 main issues I've been running into are mostly formatting issues. I have an item with a weight of 4, I would like the roll to display a 1,2,3, or 4 when rolling for this item. No matter what I do it always displays 1 as the roll. How can I have the three other numbers display as well.
1589228689
The Aaron
Roll20 Production Team
API Scripter
When a Rollable Table Item starts with a number, it gets converted to a number.  You can add something that isn't a number in front of it an it will show as text.  You might find the RecursiveTable API script useful.
1589230247

Edited 1589230356
Alex
Pro
Can you tell me what you mean by add text in front of it and it will show as text. No matter what I do I can only get the roll to show up as the first number in the string, any text reverts the roll to a 0. There is no way to get the roll to have multiple parameters, it is either a 0 or the first number in the string from what I have found so far.
1589230879
The Aaron
Roll20 Production Team
API Scripter
Using " On 1-4 The target is pushed back 5 feet " will give you a text message instead of a number.
I still end up with the 0 roll even when I change the string to what you mentioned. I'm trying to either eliminate that 0 roll at the bottom where it says =0 or have it equal a range of numbers such as being able to appear as 1,2,3 or 4 if I have 1-4 at the beginning of my string. 
Also, I would ideally like to accomplish this without making it inline. This creates a number instead of the nice looking message.
1589242761
The Aaron
Roll20 Production Team
API Scripter
Oh!  Right sorry.  What I'm talking about is for Inline Rolls.  If you do: [[1t[Test-Table]]] With Table Rows that don't start with numbers, you'll get text output: If you want the text without the yellow box, you can pass it through Recursive Table: !rt [[1t[Test-Table]]] ... ... And I just realize I completely misread your initial post... If you want to get a number between 1 and 4, there are two options. 1) No API -- Enter the row 4 times, once with each number, divide the weight among them.: 1 The target is pushed back 5 feet 2 The target is pushed back 5 feet 3 The target is pushed back 5 feet 4 The target is pushed back 5 feet (optionally prefaced with text if you want to roll inline) 2) With API -- You can embed an inline roll in the table and call it with RecursiveTable: [[1d4]] The target is pushed back 5 feet And call: !rt [[ 1t[Test-Table] ]] will give you the message with the 1-4 values via the inline [[1d4]] roll.
1589269463

Edited 1589298089
The Aaron, it looks pretty neat, thanks for sharing that. I like such easy and simple decisions for development processes. When you have basic solutions - it is always great. Few months ago, I have found these emr development team, who were explaining about their dev team and their job everything, that's why I could choose them for developing my new web applications.
1589279197
The Aaron
Roll20 Production Team
API Scripter
No problem. Sorry for the confusion. =D
Thanks for the solution, this is exactly what I was looking for!!!