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

Need Macro help

I am trying to create a macro based on a D6 that will ignore odd numbers when rolled so it will only show a 2 4 or 6, or a macro that will show a 2,4 or 6 as a success. Example if I roll 5d6 and roll a 2,5,4,2,3 then the macro will either drop the 5 and 3 or tell the player that they had 3 success's. Anyway can anyone help or come up with a formula that I can use, thanks.
1436030540

Edited 1436032334
vÍnce
Pro
Sheet Author
Hi J G. Will this work? This will highlight 2,4,6 in green. [[ d6cs2cs4cs6 ]] Although this doesn't show all the inline rolls separately, you can hover over the inline and count the number of green results. [[ (?{how many?|1})d6cs2cs4cs6 ]] You could also create a separate macro for each number of rolls if you wanted some separation in chat. #1d6 [[ d6cs2cs4cs6 ]] #2d6 [[ d6cs2cs4cs6 ]] [[ d6cs2cs4cs6 ]] #3d6 [[ d6cs2cs4cs6 ]] [[ d6cs2cs4cs6 ]] [[ d6cs2cs4cs6 ]] etc... Another option that use GenKitty's exploit of the API ( you don't have to have API access to use this trick ) Make a macro #EvenRoll [[ d6cs2cs4cs6 ]] Make another macro that will prompt you for up to the number of included macros. Remove " ! " from the query to continue adding dice. Once you hit the number of dice you want to roll, leave the " ! " and just hit enter thru the remaining queries of the macro. (note: you could have as many #EvenRolls you think you might need. I included 6 queries below. up to 6d6) #QueryRolls ?{1d6?|!} #EvenRoll ?{2d6?|!} #EvenRoll ?{3d6?|!} #EvenRoll ?{4d6?|!} #EvenRoll ?{5d6?|!} #EvenRoll ?{6d6?|!} #EvenRoll I'm sure there is probably a better way to do this as well.
Thanks yeah they kind of work, but really don't do anything single clicks on a D6 macro wouldn't achieve. Thanks for answering my question though.
That kind of specific dice rolling method would require the API to do properly.
If you're just counting successes and don't care about the specific numbers, Xd6>4 and Xd2-X are both mathematically equivalent.
basically what i need is a macro which is the equivalent of flipping a coin, is their anything like that?
1436050938

Edited 1436051260
I would probably just make a rollable table that functions as a d3, but the three choices are 2, 4, and 6. Yeah, I tested it. Set up a rollable table named d3, add the items, 2, 4, and 6, and then you can roll it as an inline roll. [[1t[d3]+10]] Edit, I just reread your post. I misunderstood it. =/.
Reading your post, it seems like it would just be easier to roll 5d2 instead of 5d6. You can set it up so that when it rolls 1 it shows a failure and 2 shows success. Or hell, you could just roll d2s and let the green/red box tell you if you won or not.
[[ 5d2>2 ]] This will give you successes for each roll of two. The only reason to use the api would be if special things happen on different even or odd numbers.
so this still shows the roll whether it be a 1 or a 2, which basically cuts out the need of a api at all as the player etc can see whether the number is odd or even, what would be good that on a roll of a 2 it just says success rather than show result. Anyway maybe the idea is a bit to simple for it to work on here.
It won't show the word success... but it will show the number of successes.
1436091513
Ziechael
Forum Champion
Sheet Author
API Scripter
[[ 5d2>2 ]] success(es) Will give you the word if it helps lol, simple hacks are sometimes the best way round a problem :) Failing that build a rollable table with 2 entries in it; one called Success and the other Failure, weight them as 1 each (reduced down from the 3 each a d6 equivalent would be) and call it something like coinflip. Then you can call it as follows: [[1t[coinflip]]] The issue there is that trying to do more than one roll at a time will not give you the overall result (it comes out as Success all of the time even if 4 of the 5 where a fail) but you could either repeat it the requisite number of times or resort to the >2 successes option for multiple die rolling?