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 Dice roller on a custom character sheet

1624968512
Chris Jones
Pro
Sheet Author
Hi all I've built a custom character sheet for an upcoming game i'm going to be running - mainly to track health, and resources, but i've also put a basic dice roller in there to make it easy for players to roll dice at the set difficulties - this all works fine. the current script is:             <tr>                 <td colspan="3">                      <label style="width: 90px;display: inline-block; padding-right: 0px">CL6:</label>                     <button class="sheet-diebutton-simple" type="roll"  value=" [[ [[?{Roll Dice|6}]]d6>6 ]]"                         name="roll_InlineDice"></button>                     </div> Where i'm having an issue is with the display part of it. i get this: Which tells me what i want to know, however i have to hover over the number to see the actual dice results - not the end of the world, but it will be annoying as we do need to see this in order to check for doubles and reroll opportunities. No, if i just use the simple dice roller that's built in, it shows me the dice results nice and clearly on the screen, while i could just use that, it'd be nice if i could just replicate that view with my existing buttons. Is their a straightforward way to achieve this? Cheers Chris
1624968990
The Aaron
Roll20 Production Team
API Scripter
I think you could do this with the Custom Dice Parsing feature that's just been released on Dev yesterday:&nbsp; <a href="https://app.roll20.net/forum/post/10198082/now-on-dev-server-custom-roll-parsing-for-character-sheets#post-10199464" rel="nofollow">https://app.roll20.net/forum/post/10198082/now-on-dev-server-custom-roll-parsing-for-character-sheets#post-10199464</a>
1624969186
Finderski
Pro
Sheet Author
Compendium Curator
Also, instead of using an inline roll, try changing the button code to: &lt;button class="sheet-diebutton-simple" type="roll"&nbsp; value=" /r ?{Roll Dice|6}]]d6&gt;6" name="roll_InlineDice"&gt;&lt;/button&gt; That will show the dice rolls in the chat window.
1624970533
Chris Jones
Pro
Sheet Author
Thanks for the replies - the first option is way above my level of understanding i'm afraid! :) @finderski - i tried your option, however when clicking the button, i got my popup to select how many dice, but nothing ever appeared in the chat window - it's basically rolling nothing
1624975048
Finderski
Pro
Sheet Author
Compendium Curator
Chris J said: Thanks for the replies - the first option is way above my level of understanding i'm afraid! :) @finderski - i tried your option, however when clicking the button, i got my popup to select how many dice, but nothing ever appeared in the chat window - it's basically rolling nothing Looks like I have a typo... &lt;button class="sheet-diebutton-simple" type="roll"&nbsp; value=" /r [[?{Roll Dice|6}]]d6&gt;6" name="roll_InlineDice"&gt;&lt;/button&gt; I was missing the opening brackets around the query. This might also work: &lt;button class="sheet-diebutton-simple" type="roll"&nbsp; value=" /r ?{Roll Dice|6}d6&gt;6" name="roll_InlineDice"&gt;&lt;/button&gt; The second option I just removed the inline roll brackets completely.
1624975610
Chris Jones
Pro
Sheet Author
@finderski - you're a legend- that woked perfectly! :) thanks so much