Skip Parsing Empty Roll Fields?

1539258761
Azurift
Pro
Sheet Author
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
Pro
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.
1539263085
Azurift
Pro
Sheet Author
The second option did the trick! Thanks for the expedient reply, Jakob!