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 macro difficulties

I'm trying to create macros for use with Armour Astir's confidence/despair mechanic, when it's combined with the advantage/disadvantage mechanic. In brief, the game is a 2d6 system, and confidence turns 1s into 6s, while despair turns 6s into 1. Advantage lets you roll an extra die (keeping the highest two), while disadvantage makes you roll an extra and keep the lowest two (advantage and disadvantage can be stacked). For the basic confidence/despair stuff, I'm basically using rollable tables that are meant to work as d6s where 1 or 6 is present twice and the other is absence (6 with weight 2 for confidence, 1 with weight 2 for despair). The tables seem to work fine. Combining them with advantage/disadvantage works fine as well. Confidence with advantage looks like this: /r {3t[conf]}kh2 You can probably figure out what the other combos look like. They work as expected. However, I'm trying to make a macro with a dropdown query so that players don't have to sift through macro buttons. I have this for the confidence roller: /r ?{Advantage|    Standard,2t[conf]|     Advantage,#conf-adv|     Disadvantage,#conf-dis|     Double Advantage,#conf-dbl-adv|     Double Disadvantage,#conf-dbl-dis}?{Bonus|+0|-3|-2|-1|+1|+2|+3} The standard roll works find, but the others do not. I just get an error message. I thought the issue could be using # instead of HTML escape replacements, but switching it to that didn't work. I also tried removing the "/r" from the macros being called. I'm a little stumped, so I'd appreciate any advice on what to try next. Thanks!
1727418414

Edited 1727418768
Gauss
Forum Champion
Hi Artemis,  Short version is...it is the contents of the macros. You only displayed one macro so I will use that as an example.  This is what you see:  /r ?{Advantage|    Standard,2t[conf]|     Advantage,#conf-adv|     Disadvantage,#conf-dis|     Double Advantage,#conf-dbl-adv|     Double Disadvantage,#conf-dbl-dis}?{Bonus|+0|-3|-2|-1|+1|+2|+3} This is what the system sees:  /r ?{Advantage|    Standard,2t[conf]|     Advantage, /r {3t[conf]}kh2 |     Disadvantage,#conf-dis|     Double Advantage,#conf-dbl-adv|     Double Disadvantage,#conf-dbl-dis}?{Bonus|+0|-3|-2|-1|+1|+2|+3} I underlined the relevant section.  So now, you have put /r /r <calculation>.  That alone will break it. So lets remove the second /r. Now we have:  /r ?{Advantage|    Standard,2t[conf]|     Advantage, {3t[conf]}kh2 |     Disadvantage,#conf-dis|     Double Advantage,#conf-dbl-adv|     Double Disadvantage,#conf-dbl-dis}?{Bonus|+0|-3|-2|-1|+1|+2|+3} But that too is going to break things.  Here is what the system sees:  /r ?{Advantage|    Standard,2t[conf]|     Advantage, {3t[conf]} It is that ending "}" in your {3t[conf]}kh2 that tells the query "all done now". It needs to be replaced with an HTML entity.  There may be other issues, but that is the only macro you provided. 
1727448778

Edited 1727484385
To make things easier to test, I'm using a version of the final macro that currently reads as this: /r ?{Advantage|Standard,2t[conf]|Advantage, # conf-adv} Meanwhile, conf-adv reads: {3t[conf ] }kh2 At the moment, the standard roll still works, and the advantage roll still does not. Am I missing any other HTML entities? EDIT I tried doing this: /r ?{Advantage|Standard,2t[conf]|Advantage,{3t[conf]}kh2} It works! So I guess the problem came from how I was trying to nest the macro. I'm not sure what the issue was, but I can just use this format instead of the macros, especially since it's not going to look good either way lol
For more complex selection, consider a chat menu - unlike with a query, you don't need to bother with html substitutions to call abilities containing problem characters.
Thanks, I'll look into that, that may make for a better UI