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

Using macros in roll querys?

1435629335

Edited 1435629347
Alright, I have a problem here. I have tried for two hours now with no success. I am trying to make a macro, where it will call a macro in depending on a conditional input. It is difficult to explain with words, but those familiar with the system should understand if I post what macro I have thus far. %{Name|Thrust?{Augment|0}} That is what I have thus far. But it just refuses to work. It is supposed to work on the basis that it calls up an ability depending on which number is input. It would call up "Thrust0" if 0 was inputted, and "Thrust1" if 1 was inputted. But it refuses to work.
1435629897
Gen Kitty
Forum Champion
Macros don't quite work that way, alas. You can't use a roll-query to pick which macro to use. It's possible that if you post the macros you're using, one of us can help you out in other ways to achieve your end goal. :)
Ah, but that's the thing... The only other macros are two that are called "Thrust0" and "Thrust1". And both contain only text. So I need some form of Input-popup that allows me to pick what secondary macro the main macro will call upon.
1435631640
The Aaron
Roll20 Production Team
API Scripter
The reason this won't work is because of the order of operations: <a href="https://wiki.roll20.net/Dice_Reference#Order_of_Op" rel="nofollow">https://wiki.roll20.net/Dice_Reference#Order_of_Op</a>... Macros are expanded in step 2, Roll Queries in step 4. You could do something like this: ?{Thrust 0?|!} %{Name|Thrust0} ?{Thrust 1?|!} %{Name|Thrust1} This is a method of selectively activating macros (pretty sure this was invented by GenKitty herself). The idea is you are queried about each macro to run, if you want to run it, you remove the !, if not, you leave it. You can accomplish this quickly by hitting enter to ignore it, or space enter to run it. Not ideal, but very effective.
1435631744
Gen Kitty
Forum Champion
Gold is the one who taught me this method. I was just looping back here to explain about the order of operations, but ya beat me! ^_^
That... Seems like a bit of roundabout way of doing it. But I suppose it works, thanks for the suggestion. But this really seems like something they should include. To have an input prompt that is based on multiple-option mousclicks rather than a text/number input.
1435668927
DK Heinrich
Marketplace Creator
Sheet Author
if they just output text, can you make each on the only option in its on rollable table - then have your option T0/T1 - seclect to roll on the respective table (only output is your answer) and have that spit out to chat?
It is to be used by both players and a gm. Rollable tables cannot be created by a player.
1435673497
DK Heinrich
Marketplace Creator
Sheet Author
can't be created by, but can be called out by macro's they write as long as they know the table name
And that is exactly the problem. If every player is going to use this, with custom texts and etc. How many rollable tables wouldn't that be that the gm would have to type up?
1435677049
DK Heinrich
Marketplace Creator
Sheet Author
agreed, it could be lengthy :) but its just time - we all unlimited amounts of that right?
But it would be tedious. Which would sort of defeat the point of having such a macro in place in the first place.