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

Target Custom Attribute Macro

February 04 (10 years ago)
So, I am in a Savage Worlds game and trying to do a custom macro without using API that allows input by the user to determine the attribute to roll. This is what I have but it doesn't work.

@{selected|name} makes a ?{Attribute|Spirit} check: [[((1d@{selected|?{Attribute|Spirit}}, 1d6!)kh1)]]

The problem I have with this is that it will always roll the value of Spirit even if I type in a separate attribute. Any ideas on how to get it to work
February 04 (10 years ago)
vÍnce
Pro
Sheet Author
Hi DarkLotus. I don't believe you can call an attribute's value by using a query. It will either be a number or a text value that you give it when prompted. More info: Using a variable with a Macro and Roll Queries
February 04 (10 years ago)

Edited February 04 (10 years ago)
Vince is correct. There's only one 'level' of operations. A Query will resolve to whatever you've entered, but it won't in turn resolve another value deeper than that. So you won't be able to make a macro to ask for the name of an attribute that calls a value, it'll stop resolving values at the "attribute" name the user has entered.

***
What I generally do in my own games is create a small handful of macros combining related skillchecks.
For example, I'll have one macro for all conversation skills (diplomacy, intimidation, bluff, sense motive, and a list of languages known). I'll have another macro for Athletics (Jump, Climb, Swim, Acrobatics, Fly). Etc, etc.
February 05 (10 years ago)
Perhaps this is something roll20 should add so that it will support nesting inside a query
Generally, that's where the API comes in. The macro system I've found is suitable for anything you might do at the table. To make a computer game that does more, you need to ante up for Mentor status and make use of the API.
February 05 (10 years ago)
Lithl
Pro
Sheet Author
API Scripter

Mark G. said:

Vince is correct. There's only one 'level' of operations. A Query will resolve to whatever you've entered, but it won't in turn resolve another value deeper than that. So you won't be able to make a macro to ask for the name of an attribute that calls a value, it'll stop resolving values at the "attribute" name the user has entered.

Actually, it's an issue of order-of-operations. Attributes get filled out at step 3, while roll queries get substituted at step 4.

February 05 (10 years ago)

Brian said:

Mark G. said:

Vince is correct. There's only one 'level' of operations. A Query will resolve to whatever you've entered, but it won't in turn resolve another value deeper than that. So you won't be able to make a macro to ask for the name of an attribute that calls a value, it'll stop resolving values at the "attribute" name the user has entered.

Actually, it's an issue of order-of-operations. Attributes get filled out at step 3, while roll queries get substituted at step 4.


Would placing the ?{Attribute|Spirit} in parenthesis do anything to resolve that since in mathematical operations parenthesis come first?
February 05 (10 years ago)
The Aaron
Pro
API Scripter
No. It has to do with the way in which the Roll20 chat command parser deals the input.
February 05 (10 years ago)

Edited February 05 (10 years ago)
vÍnce
Pro
Sheet Author
I'm not familiar with Savage Worlds(gasp), but I think Mark's idea of grouping similar rolls into one macro is a great idea. I have "borrowed" this idea in my own campaigns after reading his wiki article on Pathfinder macros. Could you make a "Attributes-Check" macro that would include a separate line for Agility, Smarts, Spirit, Strength and Vigor? Each SW attribute could pull the sheets attribute for the roll needed without the need for a prompt. I know it's not as elegant as having a single queried macro, but...
February 05 (10 years ago)
It can be done that way, just wanted to be able to do it a neater way and only throw a single roll
February 06 (10 years ago)
Gen Kitty
Forum Champion
I dream of collapsible/expandable tokenbar groups, so that (for example) all 17+ of my skillroll buttons can be under a master SKILLS button. I dream of this being part of the native code, so I don't have to talk a GM into installing an API to accomplish it. ^_^