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

Macro Help Affecting one roll with another result

I am attempting to make a macro that will use the minimum of either the given number or 10 as the target number for the actual roll I am able to get the desired result of Min(givenNumber, 10) (by using the kl1 method) but I am not able to use that as the target number for the other dice rolled.... /roll {0D1+?{TargetNumber}, 0d1+10}kl1    <- This works to give you the given number, or 10 whichever is lowest I have tried adding brackets but think i am probably using the wrong type or in the wrong place.  /roll 2D10>({0D1+?{TargetNumber}, 0d1+10}kl1)    <- Gives a result of 2, always. /roll (2D10)>({0D1+?{TargetNumber}, 0d1+10}kl1)    <- Rolls two dice and adds them together. Any help would be appreciated!
1584745731

Edited 1584745887
Kraynic
Pro
Sheet Author
A couple things about your macro there.  You don't need the 0d1.  If you have a roll on one side, you need a roll on the other, but if you have 2 rolls or 2 static numbers (one you enter and the 10 it is compared to) then you don't need to do anything extra.  The 2 sides just need similar items in them. There are 2 ways to call for rolls.  There is /roll that you are using, and then there is the inline roll, which requires that you just put your macro in between double square brackets: [[ calculations here ]].  To do what you are wanting to do, you need to mix the 2 types of rolls, because you need your comparison (chosen number and the 10) to resolve to a number before anything is applied to determine successes.  This seems to work for me (if I am understanding correctly what you are after): /roll 2D10>[[{?{TargetNumber},10}kl1]] Edit: If you are wanting the 2d10 to be summed before the success/failure is applied, I don't think there is a way to do that outside an api script (which would require a pro subscription). 
Works prefectly! Thankyou, I knew I needed brackets :D Thanks for the info in the {}k1l as well, that makes it easier to read/see!