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

Skill Check Macro

Hey, quick macro question. I notice I can make a macro that rolls for a skill easily with: /r d20+@{selected|balance} to roll a Balance for example. And I also see there are roll queries so a player can input a variable that they are aware of. However, can I have them input the name of a field, such as a skill, and then have the macro roll for that skill? I want this in place of having a macro for each individual skill, something like: /r d20+@{selected|?{Skill}} Where it would prompt them for the name of the skill they are rolling. Possible? Thanks in advance! :)
I just do not understand why I can find the value of a specific skill using that skill's variable name, and the query will take their exact input, but I cannot use that input in the equation, very frustrating. I'm thinking it has something to do with the Order of Operations specific to this language? I've been playing around with parenthetical marks to no avail.
1402117398
Lithl
Pro
Sheet Author
API Scripter
Dice Reference#Order of Operations Abilities are expanded (meaning the definition of the ability is placed in the formula anywhere that ability appears). Macros are expanded, including nested macros up to 99 levels deep. Variables are substituted Roll queries are executed (the player making the roll is asked to provide a value for each query, and that value is substituted in where the roll query appears in the formula) Inline rolls are executed, and the overall result of the inline roll is substituted in wherever the inline roll appeared in the formula. The remaining roll is executed: first, dice are rolled for any dice (e.g. "2d6" is rolled; including any special dice such as dropped or exploding), then the result of that roll is substituted into the formula. Next, floor() and ceil() functions are executed. Finally, the entire remaining formula is evaluated, including observing proper math order of operations (parentheses first, then multiplication/division, then addition/subtraction). Thus, you won't be able to use roll queries to pick which variable will be pulled from the selected character.
That is super sad. Alright, thanks for your help! :)