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 .
×

Selected Variables & Success Rolls

1380499173

Edited 1380499263
i'm trying to run a success test to see if an attribute is in a certain range like [[@{selected|CurHP}<{@{selected|MaxHP}/2}]] but that's a bit far in the future. let's go with a more simple test like... [[@{selected|bar_2}>1]] to see if there's anything in that bar. it seems that there isn't interaction between calling variables and success rolls. I have found a workaround that if i use [[{1d1+@{selected|bar_2}}>2]] it will work just fine, producing a success/fail result. but what i'm trying to do is if the check is successfull, add a bonus of 1 to the roll, and if failure do not add a bonus. i have achieved this with [[1d20+{{1d1+@{selected|bar_2}}>2}*1]] where the *1 at the end changes "1 SUCCESSES" into "1" so that further arithmatic can be performed [[Side note]] The ability to not have to use { } and *1 to convert a success check into a number would be nice. [[BACK ON TOPIC]] when i roll this the outline around the roll is blue, as rolling a 1 on a 1d1 counts as both the minimum and maximum rolls in the same command, therefore making it very difficult to tell if the d20 is a crit or botch. Fixing the ability for the attribute to be used in a success check roll would fix the need of the 1d1 and alleviate my concerns. Thanks for listening to me ramble. I love roll 20 so much i spend hours just testing it's features to see what i can make it do. PS: sorry if this isn't a bug. feel free to move it to suggestions
1380499724

Edited 1380499746
in hindsight i suppose this is a really old problem, as the Selected Variables is working absolutely perfectly, and the problem is that the roll engine doesn't like that there isn't a Dice roll in the success check, seeming it produces the same error if i type "/roll 2>1" which is effectively what is happening when i call an attribute check. Could not determine result type of: [{"type":"M","expr":2},{"type":"C","text":">1"}] if it was going to be fixed, it would have been fixed by now
1380509226

Edited 1380511710
Gauss
Forum Champion
Math rolls were only recently added. Many elements of the dice roller were not built to accommodate them. This is not really a bug so much as a design limitation. However, you can write the macro like this: /r {1d1-1+whatever}>target So your original macro can be made to work like this: [[{(1d1-1+@{selected|CurHP})*2}<@{selected|MaxHP}]] Note: The /2 has to be moved (multiply both sides by *2) to the other side for a couple reasons: 1) /2 can create a non-whole number. Target numbers currently only work with whole numbers. 2) While you can do multiple elements on the right side of an inequality you would have to put an inline bracket around them to make them work. Since you cannot currently do an inline inside another inline you need to move it to the left side. - Gauss
thanks for the quick response, even though you basically said what i already found out through "Dice Science" (what i call when i try to combine roll20 mechanics to do something not originally intended) it was still very nice to at least get conformation that you heard me. <3 #BestSiteEver
1380511750
Gauss
Forum Champion
If you have any further odd macros, shoot them my way. I will see if I can figure out a way to get them to work. :) - Gauss