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

Simple roll example request

1599880594

Edited 1599880878
Hey folks! = ) I hope everyone is doing well in these crazy times. = D So I have roll that uses the default template to display this: In order to avoid taking up space with three different buttons, I made one button make three separate rolls. The first roll is a simple check.  As it works now, if the "Check" value is negative, that indicates failure.  If it's zero or higher that indicates success. The second roll succeeds if the "Check" value is equal to or greater than the "Half Threshold" value. Success for the third roll, the "Opposed" roll is determined by comparing it to a different roll by a different character. I have a few different goals here: The first roll confuses the players.  I'd like to rewrite it so that the result is clarified by displaying either "Success" or "Failure". The second roll also confuses players for the same reasons, but once I have a working example I can use what I've learned everywhere else. You'll notice that the "Check" and the "Opposed" rolls use two different die rolls.  I'd like to rewrite it so that they both use the same roll, as in you roll the d100 and get a 66, so that 66 is used for the random value in both of these rolls. Finally, I'd just like for the box to not be purple.  There are people who love purple, but I am not one of them. = / None of these changes essential.  We've been making due with this roll as is for a while.  Now that I have time though, I'd like to learn how to do these things, or at least whether they are possible.  I'm not sure all of them are. Also, I know there are lots of entries in the forum and the guide that explain how to do these things, or at least things similar to these.  I just have yet to wrap my head around them. Anyway, if anyone feels like helping me with this, here's the code: <div class="prchk_ blueBackground section">     <button         class="buttonStyle abilityCheck"         name="roll_personality_check"         type='roll'         value='&{template:default}{{name=Personality}}{{Check=[[@{personality_total}-1d100cf0cs0]]}}{{Half Threshold = [[round(@{personality_total}/2)]]}}{{Opposed=[[1d100cf0cs0+@{personality_total}]]}}'         style="float:right;">PR</button> </div> <div class="prtotl blueBackground section">     <input class="field derivedAbility38 section" name="attr_personality_total" value="" readonly /> </div> Take care of yourselves, and thanks for reading. = )
1599894659
GiGs
Pro
Sheet Author
API Scripter
Finally, I'd just like for the box to not be purple.  There are people who love purple, but I am not one of them. = / Unfortunately, you're using the default roll template, and the only color for that is purple. Jakob's customised default rolltemplate is on the wiki - you could incorporate that into your character sheet and add new colours. I think it supports red and green out of the box. You'd change the start of your template roll from this &{template:default}{{name=Personality}} to this &{template:custom}{{title=Personality}}{{color=red}} The color will work only for colors you add. The rest of the template works the same. For your roll, you can make it understandable by recognising that a roll needing under the attribute, is exactly the same as a roll + the attribute to get 101+. So you can make 1 roll, and if its 101+ its a success; if its 100+ half threshold its whatever that success means, and you can use the same total for comparing against the target. This would show that.  value='&{template:default}{{name=Personality}}{{Check=[[@{personality_total}+1d100cf0cs0]]}}{{Half Threshold = [[100+round(@{personality_total}/2)]]}}'