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

Skip Parsing Empty Roll Fields?

Greetings! I'm looking to include a feature on my character sheet in which players can leave the damage field of a spell entry blank should they decide to do so. The problem is, when a player leaves the damage field blank and uses the associated roll button, it throws a syntax error since the parsing is done before it is sent to the roll template. Is there possibly a way to parse within a roll template or some other way to circumvent this issue? Thanks!
1539260990
Jakob
Sheet Author
API Scripter
Azurift said: Greetings! I'm looking to include a feature on my character sheet in which players can leave the damage field of a spell entry blank should they decide to do so. The problem is, when a player leaves the damage field blank and uses the associated roll button, it throws a syntax error since the parsing is done before it is sent to the roll template. Is there possibly a way to parse within a roll template or some other way to circumvent this issue? Thanks! There's a bunch of options. Use a sheet worker to detect if the damage field is blank and only send damage if it isn't. Make your roll formula include an extra 0, like [[0@{damage}]], and don't display damage if it's zero. Include a checkbox to toggle damage on/off.
The second option did the trick! Thanks for the expedient reply, Jakob!