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

Rookie Master in need for a Macro!

Hello beautiful people! I'm a total noob on macroing and i couldnt find the right tutorial to make a (potentially) easy macro. What i need is just a string that allow the character to: /roll 2d6, take the result (the sum of the two dice) compare to the @attributes and give the "Success" IF the result is Minor (less) than the attribute value, or the "Failure" if it is Major. I've tried some basic string like /r 2d6 < [[{@attribute}]]     but it not work properly.. Thanks in advance if someone is cool enough to help! =D (oh, I dont have the Plus account, I'm just a rookie master ^^)
1613050966

Edited 1613051658
Ziechael
Forum Champion
Sheet Author
API Scripter
You are almost there, you've just misplaced one of your brackets /r 2d6<@ { attribute} You may need to add a selector to the attribute call when using it directly in chat: @{selected|attribute} will use a selected token's sheet @{target|attribute} will prompt for a token selection to link to a sheet (These ^^ options require a token linked to a journal entry to function) @{bob|attribute} is a hard coded version and will look for an attribute on the sheet called 'bob' With regards to measuring against the sum of the rolls... this used to work but doesn't seem to want to for me right now: /r {2d6, 0d0}<@{attribute} Will keep playing to see what I've done wrong!
1613053039

Edited 1613053168
Ziechael
Forum Champion
Sheet Author
API Scripter
Looks like it needs to be a bit more complicated, even more so when wanting to do it as a less than: /r {[[2d6]], [[ 50d1 ]]}<@{attribute} Note that in the above example I've ensured that the comparison needed to group the 2d6 is always going to be higher than the target to ensure no false successes... don't ask why it needs to be so complicated, just seems like it does for some reason lol! I should take this opportunity to point out that in Roll20 terms the < > syntax is inclusive: > is the same as >= < is the same as <= That might impact your eventual macro: /r {[[2d6]], [[50d1]]}< [[ @{attribute} -1]]
Ziechael said: Looks like it needs to be a bit more complicated, even more so when wanting to do it as a less than: /r {[[2d6]], [[ 50d1 ]]}<@{attribute} Note that in the above example I've ensured that the comparison needed to group the 2d6 is always going to be higher than the target to ensure no false successes... don't ask why it needs to be so complicated, just seems like it does for some reason lol! I should take this opportunity to point out that in Roll20 terms the < > syntax is inclusive: > is the same as >= < is the same as <= That might impact your eventual macro: /r {[[2d6]], [[50d1]]}< [[ @{attribute} -1]] Hey Thanks for the answer!! I've made it to  /r [[1d6 + 1d6]] <[[@{attribute}]] this way it sum the d6 roll, but still it does not compare the attribute to the result, it does with ur example, but seems that doesnt work if u remove the uneccessary roll (50d1 or 0d0 for ex) Still LF ^^
1613060331
GiGs
Pro
Sheet Author
API Scripter
Ziechael formtted his macro that way because it needs to be that way. You need to use group roll brackets { }, and you need a second number that must be larger than the possible roll or attribute that is being compared. You can simplify Ziechael's macro a little bit, like /r {[[2d6]], 50}< [[ @{attribute} -1]] That 50 can be anything, as long as it is larger than the largest possible attribute value. It must  be larger than the largest possible attribute value. The -1 is there is you need an actual less than  comparison. If you are using  less than or equal to , you should remove the -1.
1613061380
Ziechael
Forum Champion
Sheet Author
API Scripter
GiGs said: You can simplify Ziechael's macro a little bit... Huh, thought I'd tried that and still got the mixed roll error... must have been an earlier iteration of trying to remember how to do sum comparisons lol!
1613065473
GiGs
Pro
Sheet Author
API Scripter
Ziechael said: GiGs said: You can simplify Ziechael's macro a little bit... Huh, thought I'd tried that and still got the mixed roll error... must have been an earlier iteration of trying to remember how to do sum comparisons lol! Easy to do! Inline roll brackets turn the roll into a number, so there's no mixed type there.