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

Custom Sheet Curiosity: Attribute taken from a query?

So, i'll keep it short. I recently won a battle against some code I was working on and GG helped me out, in his example I saw he used the value of a query further in the text of the ability and this brought up a curious question.&nbsp; Is it possible to use the labels in a query as an attribute for a sentence/emote/description?&nbsp; Allow me to provide an example: @{character_name} makes a ranged ***Archery*** attack at their target for [[1d10+@{dex}+@{archery}?{Range to Target?|Point Blank,+5|Close,+0|Medium,-2|Long,-4|Extreme,-6}?{Attack Type?|Fast,+0|Strong,-3}?{Body Part?|Head,-6|Torso,-1|Arm,-2|Leg,-2}]] The code above, when used in my sheet, makes a result that looks like this:&nbsp; The Archer makes a ranged Archery &nbsp; attack at their target for &nbsp; <span class="inlinerollresult showtip tipsy-n-right" original-title=" Rolling 1d10+6+6+0+0-1 = ( 4 )+6+6+0+0-1" style="font-weight: bold; box-sizing: content-box; border: 2px solid rgb(254, 246, 142); padding: 0px 3px; cursor: help;">15 What I am curious to know, is there a way to make the query labels, and your selection, usable to 'call' upon them in the sentence before the rolls? Perhaps like this: The Archer makes a medium ranged fast Archery attack at their target's head for a roll of X
1536528252
GiGs
Pro
Sheet Author
API Scripter
The short answer is no, sadly. To report both the range label, and use the range modifier, you'd need two queries, one for each. What you can do is report the number. Something like @{character_name} makes a ranged ***Archery*** attack at ?{query for range mod here} against their target So you report the range number in the description, and use it again in the calculation later.
Nope, that answers that. I got the feeling it might be the case, thanks again ha :D&nbsp;