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

Powercards help

If I want to use powercards to do the following:  --AttackRoll:|~R[[{((@{selected|agility}+@{selected|skills}-?{Situation|0})-floor((@{selected|bar1|max}-@{selected|bar1})/3) )d6}>5]] ~R How do I do it. Currently it doesnt like the floor expression.  Thanks.
1477398225

Edited 1477398517
This isn't a powercards issue per se. I tried that roll in chat (by replacing the attributes with numbers) and it didn't do anything at all. I was able to get around it by wrapping the floor section in a nested inline roll as follows: [[ { ((3 + 2 - 0) - [[ floor(3/3) ]])d6}>5 ]] Also, you don't need to wrap the roll in curly brackets. The following works as well. [[ (3 + 2 - 0 - [[ floor(3/3) ]])d6>5 ]]
Sweet, so easy when you know, thanks.
1477482403
Kevin Flynn said: Sweet, so easy when you know, thanks. No problem. Just always try your rolls in chat without running it through a powercard. Just to make sure it's an actual script issue and not a roll20 issue. :)
1477484384
The Aaron
Forum Champion
API Scripter
Good advice for pretty much any script you're passing rolls to.  I often just take the ! off the front to see what the command will look like.
Is the updated Power Card Script on Github? I don't see it...
1477582995
Ziechael
Forum Champion
Sheet Author
API Scripter
It is located in SkyCaptain's repository, the link is in the  OP of the Power Cards thread ... or here: gist.github.com/Sky-Captain-13/452330a3d926b32da49c
Thank you. Is there an accompanying README that would act as a tutorial? The Power Card threads here on the Roll20 API forum are overwhelmingly large.
1477603440
Dustin said: Thank you. Is there an accompanying README that would act as a tutorial? The Power Card threads here on the Roll20 API forum are overwhelmingly large. Everything you need is in the first post of the most recent thread.
Ah, it is indeed. Thanks much, team. Very helpful.