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

Macro Question

Heyo. I've been cooking up ways to simplify the headache of level added numbers to dice rolls and come up with a few ideas from reading the forums. I'm trying to use this little gem.... {{HP Recovered=[[1d8]] + [[{@{spellclass-0-level}, (5+0d0>6)}kl1]]}} But, I get the following error, "Cannot mix M and success rolls in a roll group" I'm not sure what that means or what to do to fix whatever it is that I'm doing wrong. :/ That's for a CLW btw
1465181546

Edited 1465181568
vÍnce
Pro
Sheet Author
Seth, what are trying to do with (5+0d0>6) ? That is the problem area of your macro. If you set it to a number or a calculation it should work.   Example &{template:pf_generic}{{HP Recovered=[[ [[1d8]] + [[ { @{selected|spellclass-0-level}, 5 }kl1 ]] ]]}}
1465181556

Edited 1465181706
Silvyre
Forum Champion
This error stems from the fact that every sub-roll expression within a  Grouped Roll must contain the same type of elements, those being: "Rolls" (e.g. 1d6), "Success rolls" (e.g. 1d6>5), or "Sums" (which are just numbers) So, in your case, replacing (5+0d0>6) with 5 will prevent the error. Likewise, adding something like 0d0>0 to @{spellclass-0-level} would also prevent the error.
Oooooooooooo. Ok. I'm not fluent in macros yet, and my mind is still wrapping itself around html from the last month straight @.@ Thanks guys, trying to do a lot of pre-work for my upcoming game.
{{Damage=[[(({round(@{spellclass-0-level}/2), 5}kl1)d4)]] + [[({round(@{spellclass-0-level}/2), 5}kl1)]] }} Ok, the next one I have is this. Same basic kind of equation, only now I need to factor in a variable for the number of d4 rolled. I get the following: "SyntaxError: Expected ")", "[", [ |\t] or [+|\-|*|\/|%] but "d" found." Am I supposed to put something in particular in front of the d4 to make it roll it? Or, is that even possible?
1465190034

Edited 1465190391
vÍnce
Pro
Sheet Author
Try using double brackets(inline rolls) to reduce sections of your macro so from this {{Damage=[[ ( ( {round(@{spellclass-0-level}/2), 5}kl1 )d4 ) ]] + [[ ( {round(@{spellclass-0-level}/2), 5}kl1 ) ]] }} try this {{Damage=[[ [[ [[ {round(@{spellclass-0-level}/2), 5}kl1 ]]d4 ]] + [[ {round(@{spellclass-0-level}/2), 5}kl1) ]] ]]}} Also, I recommend adding space before and after double brackets.  It seems to prevent occasional "anomalies" that crop up with macros and roll templates.   You can usually isolate issues with macros by verifying you can get values for each part of your macro. ie {round(@{spellclass-0-level}/2), 5}kl1  if that works, try another part. This should help solve problems with larger more complicated macros. Good luck.
1465195072
Silvyre
Forum Champion
Vince's advice is very good. Seth said: ({round(@{spellclass-0-level}/2), 5}kl1)d4 This is the cause of your error; keep/drop functions require nesting within inline roll brackets before they can be placed within a dice expression.
ahhh, ok, believe it or not, I am writing this stuff down, I'm just kind of thick headed :) Thanks again guys.