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 .
×
This post has been closed. You can still view previous posts, but you can't post any new replies.

Replacing "1 successes" "0 successes"

1465355291

Edited 1465363677
Hi Adventurers  Difficult to find a title for this topic ... Anyway here the idea : I want to use the CS and CF options to replace the "1 Successes" and "0 Successes" (which I think it's not good visually...) Example :   attribute Strength = 65 The system I use is based on 1d100 with a target. Meaning when the Strength is tested, to succeed it has to be 1d100  ⩽ Strength So when it's 1d100 ⩽ Strength , I want the score to be shown in the green box. ( and red if it failed) I don't have problem with the macro :  [[1d100cs<@{Strength}cf>@{Strength}]] here the result    - The first result is not successful, It means 1d100 ≥ Target,  so it shows red box. - The second result is a success, 1d00 ≤ Target,   it shows green  It's a quick way to see the result (for me and for others) But there is a little problem. What if there was a modifier to the target?  Example, a bonus 10 to the Strength  [[1d100cs<@{Strength}+?{Mod|0}cf>@{Strength}+?{Mod|0}]] First, I was expecting it asks twice the same modifier,  but it doesn"t, I don't know why, but it's good. It's what I wanted actually ... Second, it seems that macro is half working tho, the red doesn't appear when it's 1d100 ≥ Target + modifier To explain these two comments, I believe that the part  cf>@{Strength}+?{Mod|0} is not ignored. How to fix it?  Here my other question, is there a way to display specific visual hint or custom messages  depending the result ( fail or success) Example : display a special image when it's a success or it reaches a target  ?  Is it about API ?  thanks
Try parenthesis around @{Strength} and the ?{Mod|0}:  [[1d100cs<@{Strength}cf>(@{Strength}+?{Mod|0})]] Roll templates can make this prettier, but this should work.  If not, replace the parenthesis with double square brackets ("[[" and "]]", as appropreate) Second question:  Roll templates and helper functions to the rescue.   I am pretty sure API can do all of this, but I am an API thief, not a API craftsman.  There are others much more skilled than I (at just about everything) who can better answer API stuff.  
1465362643

Edited 1465362725
Coal Powered Puppet ,  thank u for your help and the link ^^ About the link, yeah i had seen it , but to be honest i wish they illustrate more the formulas with examples, I get headache easily lol and I can't test most of the things there coz i have basic subscription. ( will buy one soon when ready, but mainly for the dynamic light) So I have tested your formulas with ( )  but it doesn't work, it shows always the number "1" then I have tested with brackets :   [[1d100cs<@{Strength}cf>[[@{Strength}+?{Mod|0}]]]] it kinda works, but funny (and logic) ,for example if  Strength = 65 ,  mod = +10  ( so Strength = 75) from 1 to 65, it will show green box from 65 to 74, it will not work,  just normal box from 75 to 100, it will show red box 
Try this: [[ 1d100cs<[[@{Strength} + ?{Mod|0}]]cf>[[@{Strength} + ?{Mod}]] ]]
Silvyre said: Try this: [[ 1d100cs<[[@{Strength} + ?{Mod|0}]]cf>[[@{Strength} + ?{Mod}]] ]] Oh Silvyre,  u save me again? lol it's working indeed, It showed blue box for 75  , i guess it means something special lol but it does work  thank u
1465365276

Edited 1465365290
Jospel . said: Silvyre said: [[ 1d100cs<[[@{Strength} + ?{Mod|0}]]cf>[[@{Strength} + ?{Mod}]] ]] It showed blue box for 75  , i guess it means something special lol but it does work Ah, just add 1 to the cf term to prevent that from happening. Happy rolling!
ok :)  thanks we can say it's solved admins