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

Evaluate an attribute and output flavor text

So, I've wandered around stupid tips and tricks, used google search, not finding what I am looking for.  I am wanting to use conditional evaluation in a macro to look at an attribute on a character sheet, compare it to a fixed value, and output text.  I've found a number of examples showing using conditional evaluation to compare two values and then do math, but nothing showing outputting messages.  The logic of what I want to do is: If selected character attribute strength <= 8      Then "you can't do that"         Else "with a mighty heave you succeed" Can somebody point me to the formatting to make something like this work?  I'm sure it's out there, I just haven't found it.
1585570201
GiGs
Pro
Sheet Author
API Scripter
Standard macros cant do this. You'd need to use an API script to achieve this. I'm not aware of any existing script that does this out of the box.
Ok.  That's beyond my capability at the moment then.  Though I know somebody local who may be able to help.  Will just have to leave this bit of automation alone for now.  
1585611061
GiGs
Pro
Sheet Author
API Scripter
Actually I just remembered there is a workaround for this. Set up two rollable tables, each with one entry: Create a table named strength0, and its one entry says "you can't do that" Create another table named strength1, and its entry says "with a mighty heave you succeed" Then you can use your roll macro and make sure it evaluates to 0 or 1, and call it like this /roll 1t[strength[[your roll macro goes here ]]] Its very clunky, forcing you to create two tables for every situation where you want to do this, so I don't use it and had forgotten it.