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

html button roll command

Hello, I am slowly building skills in designing character sheet, so after border frames and stuff, now I am in roll templates and rolls commands. I am trying to design a button that will roll a command when clicked; basically roll xd6 and display separate results (without adding) where X is a value given by skills checkboxes TICKED (value 1), or not (value 0). I experimented as I could in the text chat box and copying other sheets and I resolved to that: "backalley1"   is the attr name of the checkbox n°1   for the skill "Backalley" (backalley2 = checkbox n°2, etc) <button name="attr_roll_skill_backalley" value="/em @{character_name} rolls Back Alley skill [[(@{skill_backalley1}d6]] [[@{skill_backalley2}d6]] [[@{skill_backalley3}d6]]">
1467888594

Edited 1467888685
Coal Powered Puppet
Pro
Sheet Author
<button type='roll' name="roll_backalley" value="/em @{character_name} rolls Back Alley skill [[ @{skill_backalley1}d6 ]] [[ @{skill_backalley2}d6 ]] [[ @{skill_backalley3}d6 ]]"> Try this.  You were missing the type='roll' and you had an extra " ( " in there.   I don't know if this will work, but it will be closer to what you need.
are spaces necessary?  "[[ @{skill_backalley1}d6 ]]"
1467922568
Lithl
Pro
Sheet Author
API Scripter
Not usually, although there are some corner-case bugs that are solved with the extra spaces.
Is there a way to simulate the roll out of roll20?? I have tried it somehow within the text chat, but things like  [[ @{skilltoughbastard1}d6 ]] do not work since the roll does not specify the character.  I have to do [[ @{Razor|skilltoughbastard1}d6 ]]  )  with Razor being the name of a character. Would rolls work the same in the sheet designing and in the chatn, appart from the character name specifying?
1467951993
Wes
Pro
Sheet Author
When you write the into the button, you don't have to include the character name. The sheet knows that you are rolling for that character as opposed to you typing the macro in chat or as a campaign macro.
ok, if that is the only limitation and difference, I can experiment!
one last question: given my formula [[ @{skill_backalley1}d6 ]] [[ @{skill_backalley2}d6 ]] [[ @{skill_backalley3}d6 ]] what could I add to see the results sorted out in ascending order?