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 query into variable ?

1430665786

Edited 1430665999
Hello everyone, i try to create a macro : /roll 1d[[@{selected|attribute}]] with ?{enternameofability} Combination -> /roll 1d[[@{selected| ?{enternameofability} }]] But it doesn't work. I would like to type in box the name of the ability directly and see a roll for the specific ability. It's possible to do this with macro or not ? Thank you for help : )
1430667097
Spren
Sheet Author
You can't have a query call an ability or another macro. It'd be nice if we could, but unfortunately that is the way Roll20's order of operations works. What specifically were you planning to use this for and maybe we can think up a workaround that will help you?
1430669451

Edited 1430670938
It's to avoid creating one macro for one ability like : a macro for /roll 1d[[@{selected|strength}]] an other macro for /roll 1d[[@{selected|dexterity}]] and an other /roll 1d[[@{selected|agility}]] etc... or to avoid creating a unique macro with all abilities of a character. My objective was : Players run the macro and type the name of the needed ability (He has 6 points in strength) Exemple he type strength and chat displays : roll 1d(strength) -> 4/6
1430670707

Edited 1430670784
vÍnce
Pro
Sheet Author
Grako said: It's to avoid creating one macro for one ability like : a macro for /roll 1d[[@{selected|strength}]] an other macro for /roll 1d[[@{selected|dexterity}]] and an other /roll 1d[[@{selected|agility}]] etc... Although not as elegant as you would like, you can create macros that roll multiple things in one macro #Ability-checks &{template:default}{{name=Ability Check for @{selected|character_name}}}{{STR-check:=[[1d20+@{selected|STR-mod}]]}}{{DEX-check:=[[1d20+@{selected|DEX-mod}]]}}{{CON-check:=[[1d20+@{selected|CON-mod}]]}}{{INT-check:=[[1d20+@{selected|INT-mod}]]}}{{WIS-check:=[[1d20+@{selected|WIS-mod}]]}}{{CHA-check:=[[1d20+@{selected|CHA-mod}]]}}
Thank you it is a more elegant display
1430671752
vÍnce
Pro
Sheet Author
Mark G. has a ton of great macro examples on the wiki(mostly pathfinder, but modify for your RPG). Roll templates are all the rage now, so start including roll templates as well to make your macros look pretty. cheers
I guess I better go update that for pathfinder-specific templates, huh? :) ( PF sheet didn't have templates yet when I last updated it, so those are just the default templates that work in any game)