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

Nested queries for Advantage and Disadvantage using the standard template

I'm trying to create abilities for my characters that run a roll query for adv/disadv and use the standard template to show the results. The ability I'm trying this with (Eldritch Blast in DD5E) also uses the target bar to show the value in bar 2 of the targeted NPC (for AC).

I've tried lots of different options including nesting a standard, advantage and disadvantage version of the ability and calling them from the roll query.  

This is what I have at the moment all in a single ability macro. 

&{template:default}{{name=Eldritch Blast}}?{Adv Dis?|No,{{Attack:=[[1d20+6]] vs @{target|bar1}}}{{Damage:=[[1d8+4]]}}|Adv,{{Attack:=[[2d20kh+6]] vs @{target|bar1}}}{{Damage:=[[1d8+4]]}}|Dis,{{Attack:=[[2d20kl+6]] vs @{target|bar1}}}{{Damage:=[[1d8+4]]}}}

This for some reason just skips the roll query, rolls 1d20 and 3d8 and gives the below error in the chat

No character was found for 'target|bar1}}}{{Damage:=[[1d8+4]]}}'

I can seem to get individual pieces of this to work but not all together. Any help would be greatly appreciated.

April 11 (5 years ago)

Edited April 11 (5 years ago)
GiGs
Pro
Sheet Author
API Scripter

You never replace characters in attribute call, and only replace the characters that are needed to make the nesting work.

For example you have replaced the characters in a target call, which is an attribute call:

 @{target|bar1}}}

which should be 

 @{target|bar1}}}

There may be other issues, but on a quick look, that might be all you need to fix.

Brilliant! That has fixed the issue. I realise now that I had read the advise re attribute calls on the wiki but obviously forgot about it when writing the macro. 

This may a problem for a different thread but the adv and disadv options aren't rolling 3d dice for the d20s like the standard one does?

April 11 (5 years ago)
GiGs
Pro
Sheet Author
API Scripter

I dont use 3d dice so cant help you much there, but its weird that they are being used for one setting and not the other.

It was another issue in my macro - I had 2d20kh but it should have read 2d20kh1 

Thanks for the help GiGs

April 11 (5 years ago)
GiGs
Pro
Sheet Author
API Scripter

I'm glad you got it sorted :)