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

"Yes" or "no" returned by 1d20 > target number

Dead easy question I hope When I do this  [1d20>@{selected|crumble}] it works fine but returns "1" or "0", which is a bit bald. Is there a trick to substitute that for "Yes" or "No" or something? Cheers! 
1603117660
David M.
Pro
API Scripter
With your Pro sub, the Powercards script can handle conditional statements, so basically in pseudocode: "if roll result=1, then output Yes", etc. Without using an api script, you could do this, but takes some setup: creating two rollable tables, say "0Result" and "1Result", with one item each, "No" and "Yes" respectively. Or "Failure" & "Success", whatever. You could then call the appropriate table with something like this:  [[ 1t[[[1d20>@{selected|crumble}]]Result] ]] When your interior inline roll returns 1 or 0, it will create the string 1Result or 0Result (which conveniently are your new table names!), and which subsequently get rolled using the [[ 1t[TableName] ]] syntax. Kinda hacky, but it should work if you don't want to mess with learning Powercards. Of course, with Powercards, you can do a lot of cool things, so imo it is worthwhile to eventually dabble with it :)
Thanks!  May give Powercards a look, too :)
1603150884
David M.
Pro
API Scripter
Cool! It's a bit of a learning curve if you haven't done much macro work and/or coding before, but sometimes you just need the thing to do the thing!
I did have an entire career in IT including years as a programmer, so I may be able to pick it up :)
1603193348
David M.
Pro
API Scripter
Haha, yeah that should do it! Happy gaming!