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

Adding an attribute on the fly to a macro

September 26 (11 years ago)
Is there a way to add an attribute variable on the fly when typing in a macro? If so, what is the syntax?

%roll20 +STR_MOD <---The attribute.

I ask this question because I have a HUGE set of options when it comes to specific character. If I were to create a macro for each option, it would be about 2 dozen total when taking to hit macros + damage macros.

So if I could just create a base macro then add an Attribute variable depending upon the option I chose that round, that would be a HUGE time saver.
September 26 (11 years ago)
Pat S.
Forum Champion
Sheet Author
What you want would be roll queries. Look on this page and it will explain plus give examples :https://wiki.roll20.net/Dice_Reference#Roll_Queries
September 26 (11 years ago)
Thanks for the note; I am aware of roll queries.

What I want is to know whether or not the ability to add an Attribute variable to a Macro.
September 26 (11 years ago)
Pat S.
Forum Champion
Sheet Author
Oh. That I don't know. Sorry
September 26 (11 years ago)
:D No worries! Thanks for the help anyway!
September 26 (11 years ago)

Edited September 26 (11 years ago)
Gauss
Forum Champion
You can put in: %Ability +@{charactername|attributename}

Note: it will add it to the end of the macro so if you need it in another part of the macro it won't work.

- Gauss
September 26 (11 years ago)
Ahhh, ok that is the syntax I was missing. Lemme go try that.
September 26 (11 years ago)
Cool...that works just fine, but doesn't really save any time when I have to type the +@{name|attribute}

I know there is a function of "OnClick" to roll that characters Initiative directly into the initiative chart now.

Is there any similar function for selecting the attribute of the selected token?

BTW, correct format is %macro +@{charactername|attribute}
September 26 (11 years ago)
It's fairly moot now, because I went ahead and just created all the macros :)

BUT if the functionality is there, I'd like to see it!
September 26 (11 years ago)
Gauss
Forum Champion
KCRift, could you explain what you meant by "correct format is..."?

- Gauss

September 26 (11 years ago)
It was a minor thing in what you posted. I'm sorry I was not trying to be obnoxious. It was %Ability vs %Macro. Perhaps 'correct' was not the right word. I was speaking semantically to clarify what worked for me.
September 26 (11 years ago)

Edited September 26 (11 years ago)
Gauss
Forum Champion
Abilities are a form of macro in the character sheets while Macros are a different form of macro in the settings tab. I was being quite specific for the purposes of being clear which system is being referenced. :)

Thus, %Ability and #Macro are the two ways I reference the two types of macros lest people get confused and try to do #Ability or %Macro

- Gauss
September 27 (11 years ago)
Gotcha! Thanks for the clarification!