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

How to roll variable amount of dice equal to an attribute and check for successes?

October 17 (3 years ago)
Wes
Pro

Hello, I'm a long time roll20 user, brand new pro account trying to create a custom sheet for a game I want to playtest.  The core dice mechanic involves rolling an amount of dice equal to a character's Attribute value plus the value of a relevant Skill and then checking for successes (default target number 4+).


I've taken the sheet template recommended for beginners and am messing with the html to try and accomplish this.  The roll button next to any Attribute should be something like roll= (X)d6>4 where X is the Attribute value.  For a Skill check, it should be roll= (X+Y)d6>4 where X is the Attribute value and Y is the Skill value.


Any help in getting the right syntax on a roll to accomplish this?  I have no problem messing with this sheet template to define the Attributes and Skills I want, but I can't get the rolls to work.  


Bonus question would be how to make the roll query the target number.  So ideally the full formula would be roll= (X+Y)d6>(Z) (X=Attribute value, Y=Skill value, and Z is queried when the button is clicked.


Thanks!

October 17 (3 years ago)
Kraynic
Pro
Sheet Author

If you haven't checked out any of the wiki articles on the dice roller and macros, you should.  These look like they are fairly simple attribute calls and queries.

https://wiki.roll20.net/Dice_Reference

https://wiki.roll20.net/Macros

Attribute is kind of a confusing term when speaking of creating a character sheet, because pretty much any value that gets stored on the sheet is an "attribute" and marked as such in the sheet code with attr_attributenamehere.  So a character "attribute" and a skill rating will both be sheet attributes that can be called with the normal @{attributenametocall) syntax.

[[[[@{attribute}+@{skill}]]d6>?{Target Number?|4}]]

That 4 should be changed to whatever the most common target number is, so that when that is the target number rolled against, then the person rolling can just hit enter to use the default value instead of entering something.  If the target number for some rolls is always a set number, then that could be another "attribute" in sheet code so that instead of a query you would just have another attribute call in place of the query.

October 17 (3 years ago)
Wes
Pro

Awesome, thanks so much.  I'm trying to do all this in an hour and definitely should slow down and read through everything more carefully.  Appreciate the help; that worked perfectly.