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 .
×

The new D&D 2024 sheet is now available!

Create a free account

Showing Dice Result in Roll Template?

1426522086

Edited 1426522186
Hylianux
Sheet Author
Does anyone know how to show the result of the die that was rolled in a roll template? If I were to type into the chat: /roll 1d20+@{character|strength_bonus}, what would come out is what number the d20 landed on, the modifier, and then the total. Roll templates, in contrast, only seem to show the end result, and if you hover over the result, it'll show you the roll logic used to retrieve that result. The problem is I have no idea what number the dice actually landed on... The only real way to know is to enable 3D dice to see it. Is there any way to show what number the dice actually landed on?
1426525040
Lithl
Pro
Sheet Author
API Scripter
When you hover over an inline roll, Roll20 shows you the roll expression and the roll. [[1d20+@{strength_bonus}]] would show you something along the lines of "1d20+floor((18-10)/2) = (10)+floor((18-10)/2) = 14" The (10) in parentheses is the number you rolled on the d20.
Ahhhhh I see it now. Thanks! It was just really small, and the formula I use to calculate some rolls are really long.
1426605010

Edited 1426605077
If there are specific numbers you need to know were rolled you can use 1d20cs>17 to highlight all rolls of 17 or greater in green or if you need to get even more specific... 1d20cs=10cs=15cs=20 will highlight all rolls of 10 , 15 , & 20 in green and nothing else.... if you want to highlight roles for negative reasons then try cf instead to highlight them in red
1426711180

Edited 1426711270
This is kind of related...I see that roll templates are capable of storing values, so was wondering if there was a way to use a roll template to: Display a roll Display a bonus Display the total of roll + bonus All in the same table. This would be really helpful in 13th Age, which frequently requires the exact roll results to be known. While I know we could certainly just show the Total and then hover over using the above method to see the die result, it'd be nice to be able to just show it cleanly as part of the template. Being kind of an idiot on this stuff, I tried doing it with a simple template of <rolltemplate class="sheet-rolltemplate-standard"> {{name}} {{roll}} {{bonus}} [[{{roll}}+{{bonus}}]] </rolltemplate> Unfortunately, that last part didn't work quite right. My result with an entry of &{template:standard} {{name=Test}} {{roll=[[1d20]]}} {{bonus=[[10]]}}: Test 18 10 [[ 18 + 10 ]] (All bolded items were treated as roll results) Note: Bonus is simple right now but will be a calculation later, so that's why it's also in the roll brackets. The last portion of the template there just displays the formula rather than actually adding the two numbers...not sure if there's a way to get it to take that last step or not.
1426712149
Finderski
Pro
Sheet Author
Compendium Curator
Actually, roll templates don't store anything (rolls or otherwise). It is merely a presentation layer to prettify things a bit. What I've ended up doing for Savage Worlds is doing the full roll and then just highlighting what bonuses/penalties were applied to the roll. Like this: So, in the above picture, the actual Weird Science roll would have been 5, with a -3 added to it.
1426722780
Gen Kitty
Forum Champion
Robert M. said: This is kind of related...I see that roll templates are capable of storing values, so was wondering if there was a way to use a roll template to:Display a roll Display a bonus Display the total of roll + bonus All in the same table. This would be really helpful in 13th Age, which frequently requires the exact roll results to be known. While I know we could certainly just show the Total and then hover over using the above method to see the die result, it'd be nice to be able to just show it cleanly as part of the template. This functionality is specifically supported by Powercards. You can choose to show expanded dice rolls , which is 'natural die roll + sum of all bonuses'. You have a mentor-level subscription, so API is open to you if you want to try playing around with this script. <a href="https://app.roll20.net/forum/post/1463736/#post-14" rel="nofollow">https://app.roll20.net/forum/post/1463736/#post-14</a>...
G V. said: Actually, roll templates don't store anything (rolls or otherwise). It is merely a presentation layer to prettify things a bit. Sorry--store was probably the wrong word. What I meant was that if you define a field in a roll template to use a dice roll, and then call that field elsewhere, it still shows the same result--it doesn't reroll it. Once {{roll}} is defined, anywhere you put it in the template it will show the same value, even if {{roll=[[1d20]]}}. That's what I meant by "store," which wasn't the right wording, I'm sure. :-P I could probably do a similar idea to your Savage Worlds one with my 13th Age, though--it isn't necessary for every character to know the exact roll result, so just showing the Total Roll and then the Bonus separately could help (though at that point I kind of think I'm more inclined to just hover over the roll to see it--no subtraction needed). Just was wondering if it was possible to do the addition because of the "{{roll}} being the same in all locations" thing. GenKitty, I'll take a look at the PowerCards thing...looks interesting. Thank you. I'm only just beginning to touch APIs because I know nothing at all about Java, but that looks like a good one to check out. Very interested in ways to manage the mass o'data in the chat window more effectively while still letting my players see the things they need to see.
All I want is the dice roll itself to stand out more. Some of my formulas for displaying a dice roll are rather verbose, and it can be difficult to find exactly where the dice value is. "Oh, it's the first number in parentheses after the = sign!" From an HTML standpoint, it's actually rather easy to put it in bold or increase the font size of the dice roll, or, if they wanted to go crazy, they could encase the value within a 20-sided dice image (they're already doing it on normal rolls in chat). But, at the very least they highlight the result in green or red to denote a crit or a botch, respectively, and I think for most rolls that's all you really care about with respect to the end value anyway. I personally placed the human-readable logic of how a result was calculated in the "title" property/attribute of the roll button so you'll see it when you hover over the button. Adding in all that extra stuff just clutters up the chat more :)
1426787579

Edited 1426787618
Just as an addendum here: the PowerCards script that GenKitty pointed me to looks to work great for my purpose. I have to know the exact die roll for a number of situations rather than just crits and fumbles (I'm using 13th Age, which uses rolls of even, odd, or above a certain value to trigger varied effects). With PowerCards, you can have an inline roll "expand" like GenKitty said: it can show the roll result, and then the sum of the bonuses--even if you're calculating said bonuses from a lengthy series of additions and subtractions. The trick is the [XPND] roll modifier that PowerCards can use. If--within a powercard--you type [[[XPND] 1d20+3+4+7]] Powercards will show it (assuming a die roll of 11) as (11)+14=25. ...hopefully I did basic mathematics correctly there. With only two numbers shown in the formula, it becomes pretty easy to identify the die roll--much easier than if you had to pull it out of a massive list like with the hover-over functionality. Took me a bit to figure out that [XPND] should be put before the die roll instead of after the whole thing, but once I got a clue, it worked. :-) So if you're looking for that functionality and aren't able to do it with the roll templates, the PowerCards could be a good solution.
1426800650
Gen Kitty
Forum Champion
I'm glad I was able to help you out, Robert. We 13th Age people must stick together! ^_- Hylianux, you might consider writing up a suggestion for the Suggestions forum if you want the devs to change the basic functionality of Roll20. I share your frustrations, finding the dice roll can be highly annoying sometimes, especially when there's long formulas involved. Powercards to the rescue!
Powercards are nice and all, but I'd like something on a character sheet that works across the board for everyone, and not just my game :) I'll submit the suggestion to the Suggestions forum.