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

An Ability Roll Button


Edited 1663777365
Hello!... I need help with a button: 1. How do I make an ability (ex below) to function as a dice-roller (1d6), by just clicking on the ability text? 2. How do I activate a query for above dice-roller, asking for spending of pool (a modifier to the d6) and adjusting the pool level for that ability? And also a query for 'Difficulty' (set against the roll +amount of spent pool), and also asking for spending of Free Pool (this also the added to the roll)? 3. Displaying those factors above in the shat-window, and the result of the roll derived from a set of criteria like: 'Fumble' (= a roll of 1 on the dice), 'Success' (= a result equal or greater than the difficulty), and Great Success (= a roll of 6 on the dice)?       < tr >           < td >< input type = "checkbox" name = "attr_skill_athletics_pool_occupational" ></ td >         < td > < label > Athletics </ label > </ td >           < td >< input type = "text" class = "number" name = "attr_skill_athletics_pool" /></ td >           < td > / </ td >           < td >< input type = "text" class = "number" name = "attr_skill_athletics_rating" /></ td >         </ tr > Grateful for help. 
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You use a roll or action button . For what you want to do in number 2 and 3, you'll want to use an action button with custom roll parsing  (aka javascript powered roll handling). The html would look like this: <button type="action" name="act_athletics">Roll</athletics> The custom roll parsing part can be extremely simple or extremely complicated depending on what you need to do.
Scott C. Thank you, but sadly the instruction's in those links is inaccessible for me due to my low coding ability score. I need an full example code to thinker with if I am to grasp how it works, do you know some already written complete code. There is the Delta Green code, but that one was to complex for me to grasp. ?