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

Checkbox that when checked causes all rolls to be -2

I have almost all of my custom sheet finished. I am stuff on how to make a check box that will make any rolls -2. Is there a way to do this globally? I have added some script worker into my sheet for math on other stats. I am just unsure where to start to affect all dice rolls by that player.
Richard T.
Marketplace Creator
Sheet Author
Compendium Curator
Have the checkbox have a value added to an attribute. Throughout your sheet, whenever you have a roller, include the attr_global-penalty in the calculation.  <input type="checkbox" name="attr_global-penalty" value="2">

Edited 1597871897
Sheet Author
API Scripter
Do you mean to apply a -2 modifier to all rolls? If so, you don't need a sheet worker. Just set the checkbox value to -2 <input type="checkbox" name="attr_minus2" value="-2" /> then in each of your button rolls, add the following  +(@{minus2}) The brackets are important. Alternatively you could set its value to 2, instead od -2, and ise -@{minus2} When the checkbox is not checked, minus2 will be zero. When it is checked, it will have the listed value.
Thank you, I was making it too complicated in my head.