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 .
×
🍵 What is a cleric’s favorite hot drink? Divini-tea. 🍵
Create a free account

Conditional Attacks and Rolling When Needed

1533569976
Shukin
Sheet Author
Hello. I'm the author of the Tormenta RPG (Tabbed) character sheet, and I'm updating some of it's issues, but there's one that I have no idea how to fix. The case is: When you fill a weapon stats, you have to set it as a melee or ranged weapon. The way I found to make this work was to roll both melee and ranged attacks when you click the weapon name, but to only show the one that was selected in the Roll Template. It works, but it creates an additional roll that messes up everyone that uses 3D dice. Is there a way for me to only make a roll when clicking a button if a certain variable (we can call it wtype ) is set to 1?
You could add a sheet worker that detects when wtype  changes and change the rolloutput  for that weapon to the correct roll. For example a rollmelee  and a rollranged  hidden attribute. When wtype  changes to 1 (Melee),  rolloutput  is set to rollmelee . When wtype  changes to 0 (Ranged), rolloutput  is set to rollranged .