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 Problem Question

I am playing 13th age, and in the powers in the character sheet there is a description box and a macro box. In the description you can put the macros however i ran into a snag. If i put in a macro for multiple d20 rolls all the d20 rolls are the exact same number as the first d20. Also if i have another roll macro before the d20 rolls they become that number also.  For example if i set it to roll a 1d4 for target and it rolls a 3 all the d20 rolls come up as 3. Does anybody know a way to fix this or is it because these aren't in the macro box?
1605790347
Andreas J.
Forum Champion
Sheet Author
Translator
Show us your macro.
1605825182

Edited 1605825275
OK i was wrong the d20's are rolling different numbers, it's the showing of the natural number is the same for each attack. **Attack1 **[[[[1d20ro=2]]+@{DEX-mod}+@{level}+@{tracker|Escalation}+1]] with a natural roll of $[[0]]! **Attack 2 **[[[[1d20ro=2]]+@{DEX-mod}+@{level}+@{tracker|Escalation}+1]] with a natural roll of $[[0]]! **Attack 3 **[[[[1d20ro=2]]+@{DEX-mod}+@{level}+@{tracker|Escalation}+1]] with a natural roll of $[[0]]! And if i throw in this before that they show whatever it roles as seen below **Target** [[1d3]]
1605834919

Edited 1605834988
Try $[[1]] instead. Just a guess but it appears the $[[0]] is capturing the first roll of your macro and you need to capture the 2nd roll. May need to continue down the sequence. However, note that this format is technically available to use in certain aspects, it's not supported in Roll20.
1605843344
Oosh
Sheet Author
API Scripter
Those $[[0]] callbacks are indexed over the entire macro sent to chat. So you probably want $[[0]], $[[2]], $[[4]] or something - though the order can get pretty messed up. Once there's a few nested rolls in there, R20 does a bit of a drunken stagger to the finish line. There's a ton of posts in Stupid Tricks if you still need more info.
1605873726

Edited 1605873764
David M.
Pro
API Scripter
Hm, when I ran the three lines (only) as listed in a macro, I got the correct result, as they are three separate commands (with one roll each). Is this maybe some weirdness with the template being used?
1605875800
Ziechael
Forum Champion
Sheet Author
API Scripter
I think it operates on a 'by line' basis and since templates are technically a single line you'd need to use the ids as Oosh suggested... as three lines, even when sent at the same time, it makes sense that each line has it's own $[[0]] reference... Of course with emergent functionality all bets are off anyway!
1605879024
Oosh
Sheet Author
API Scripter
Yeah they'll work as separate lines, but not in a template as OP has them, or even just inside some {{ }} handlebars. You could send them as 3 separate templates with $[[0]] in each one, but I'm figuring that isn't the intent.
1605881838
David M.
Pro
API Scripter
Makes sense