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

Drop dice based on condition

1482737822

Edited 1482739035
Working on a character sheet for a game that has you roll x number of dice equal to your attribute plus your skill, ie 4 in strength and 2 in carry would roll 6 dice. However if the character suffers from a condition they would drop a dice from their pool for each condition that they had until the final condition that makes them automatically fail the challenge. Currently I have this setup for a roll macro on the sheet <td class="attr-roll" ><button type='roll' value='&{template:default} {name=Sneak}} {{sneak= [[@{body}d6 + @{sneak}d6]] }}' /></td> How would I implement a check to see if the character is affected by any conditions which are check mark boxes on the sheet and then remove the number of dice equal to the current number of conditions or automatically roll a fail if the final condition is applied to the character? I'm extremely new to this and figuring it out as I go so please help me understand :) *Last min edit: If there's a way to prevent the final condition box from being checked until all of the other conditions are checked as well that'd be helpful!
1482739782

Edited 1482740052
Andrew C
Marketplace Creator
You multiply each condition by -1, since I assume "on"/"true" =1 "off"/"false"=0 As in [[ [[ @{stat1}+@{stat2} - @{crippled} - @{nauseous}-@{condition}...]]d6 ]]
That got it working, thank you!
1482782893
Andrew C
Marketplace Creator
Jason said: That got it working, thank you! Not a problem. Took me a little to learn that you could do things like calculate the number of dice as well as calculate the 'sides on the dice'.
1482796874
Lithl
Pro
Sheet Author
API Scripter
Andrew said: Jason said: That got it working, thank you! Not a problem. Took me a little to learn that you could do things like calculate the number of dice as well as calculate the 'sides on the dice'. To be fair, you weren't always able to do that (at least not with the complexity we have now) with an inline roll. =)