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

Roll Under Auto Calculated Value

Is there a way to have a sheet roll that successfully executes a roll under command for an auto calculated value? Thusfar it either does not work at all or rolls the die then replaces it with the first number in the value calculation and states a result of 0.x results.
1535665247
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
What do you mean by roll under? Do you want it to count as a success when under the value, be lited to that value or less, or something else?
I mean to be counted as a success if it's less than the auto calculated value. The exact thing I'm trying to do is  /roll 1d10 < @{StunCheck}. In this case Stun check is Stun/10 so if they have a stun of 40 it should be 4. It populates in the sheet properly but when i try to do a sheet roll with it puts the formula instead of the result, so it might populate as an error in the formula or replace the Stun value with the result of the d10 depending on if I put /roll 1d10 < @{StunCheck} or /roll 1d10 < (@{StunCheck}) in the button's code
1535671534
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, that's easy then, just wrap your autocalc attribute in inline roll brackets: /roll 1d10 < [[@{StunCheck}]]
Awesome I had no idea, thanks.
1535676924
GiGs
Pro
Sheet Author
API Scripter
Also, you might need to remove those spaces either side of the < symbol. That often causes issues.