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 for Custom Advantage Rolls

1701721617

Edited 1701721700
So I'm trying to make a macro for a stat called speed that queries if it's advantage, normal, or disadvantage with the result going into the initiative tracker. Yet for some reason, the macro isn't working as It's supposed to. Here's what I have so far, set in 4 different macros because of the nesting issue. &{template:default}{{name=@{selected|token_name} ❖ Speed}} {{ ?{Normal, Advatange, or Disadvantage?| Normal, #Norm-Speed | Advantage, #ADV-Speed | Disadvantage, #Disadv-Speed }} Normal Speed =[[1d6+ 1d@{selected|Speed}+ @{selected|Agility}/10&{tracker} ]] Advantage Speed =[[2d6kh1+ 2d@{selected|Speed}kh1+ @{selected|Agility}/10&{tracker} ]] Disadvantage Speed =[[2d6kl1+ 2d@{selected|Speed}kl1+ @{selected|Agility}/10&{tracker} ]] Individually, the three macros are working as intended, but I'm for some reason getting an issue in combining them into 1 macro. I'm either rolling all three macros at once or I'm rolling only the last macro in the sequence. Is there anyone who can help me fix it so that the first macro works correctly?
It looks like you have a space between the comma and the macro.  Per the  nested macros wiki , "If you are nesting a macro in a Roll Query, make sure there is a space after the macro name, and no space between the , and # so that it is properly recognized by Roll20."
1701731973

Edited 1701732419
Joshua N.  said: It looks like you have a space between the comma and the macro.  Per the  nested macros wiki , "If you are nesting a macro in a Roll Query, make sure there is a space after the macro name, and no space between the , and # so that it is properly recognized by Roll20." &{template:default}{{name=@{selected|token_name} ❖ Speed}} {{ ?{Normal, Advatange, or Disadvantage?|Normal,#Norm-Speed |Advantage,#ADV-Speed |Disadvantage,#Disadv-Speed }} That's still not working... When I remove the space around the comma and set it up exactly as that wiki describes, the query seems to read the macro as part of the query and gives no other options. And hitting submit on that one option outputs all 3 macros at once. See above for what I amended it to. I've already tried multiple combinations of spacing too. I genuinely don't know what could be wrong with this... Could you maybe try a similar macro yourself, to see if it works for you? It not working for me...
1701732842

Edited 1701733140
Ahh sorry. I see there must be some other interaction within the roll template. The following query works on its own. ?{Normal, Advatange, or Disadvantage?| Normal,#Norm-Speed | Advantage,#ADV-Speed | Disadvantage,#Disadv-Speed } So the roll template must be doing something. I don't use these as much these days so I suspect someone will know better than me but I can take a look in a bit as well. Might need some encoding as that is a common issue with nested queries. EDIT: Actually I think I made a mistake. There was a missing closing curly brace &{template:default}{{ name =@{selected|token_name} ❖ Speed}} {{ ?{Normal, Advatange, or Disadvantage?| Normal, #Norm-Speed | Advantage, #ADV-Speed | Disadvantage, #Disadv-Speed }}}
1701733137

Edited 1701739080
&{template:default}{{name=@{selected|token_name} ❖ Speed}} ?{Normal, Advatange, or Disadvantage?|Normal,#Norm-Speed |Advantage,#ADV-Speed |Disadvantage,#Disadv-Speed } I just figured it out. I had to translate all of the special characters of the nested macros into HTML and hit enter after the template section of the macro. After I did that, it worked fine. That and the spacing was all I had to change. The nested macros ended up looking like this. And if I edit them further, it'll revert back it seems. Normal Speed=[[1d6+1d@{selected|Speed}+@{selected|Agility}/10&{tracker} ]]