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

Possible for a roll query to output different results?

Let's say I have attributes called Strength and Dexterity, with values of 3 and 4 respectively. I know if I write a dropdown roll query and use it in multiple places, the same option will be selected for all places. Is it possible to output different values from the selected option though? What I'm trying to do is write a query to the effect of ?{Attribute|Strength|Dexterity}: [[?{Attribute|Strength, @{Strength}|Dexterity, @{Dexterity}d10]] Which would parse something along the lines of Dexterity: [[4d10]] Without having to write it ?{Attribute|Strength|Dexterity}: [[?{Attribute2|Strength, @{Strength}|Dexterity, @{Dexterity}d10]] and select Dexterity in two different dropdowns. (if roll queries won't work for this but there's another way to get the same effect, that'd be great to. I'm not married to the route, just trying to reach the destination)
1645585536

Edited 1645585572
I would use chat buttons. On your character sheet, create the following 3 macros: attribute-roll (set this one as a token action) Which attribute would you like to use? [Strength](~strength-roll) [Dexterity](~dexterity-roll) strength-roll /r @{strength}d10 dexterity-roll /r @{dexterity}d10 It's not a drop down, but it's very versatile and might get you what you want.
Nah, my end-goal is for an attribute+ability macro (white wolf systems). What I was hoping for was a simple select attribute -> select ability -> output @{attribute name} + @{ability name} : [[@{attribute value} + @{ability value}]] Even with chat buttons, a seperate macro for all the combinations of 9 attributes and ~30 abilities is... a lot.
1645617195

Edited 1645617218
Ziechael
Forum Champion
Sheet Author
API Scripter
You can nest as much as you need to in a query... the key is to only nest the variations: ?{Attribute|Strength,Strength: [[[[ @{Strength}|Dexterity,Dexterity: [[[[@{Dexterity}}]]d10]] Obviously the more you nest, the messier it gets but totally doable with a single query :)
1645623440
GiGs
Pro
Sheet Author
API Scripter
Several sheets with this kind of approach have a button next to each ability and attribute, that button sets the active attribute, and then in a separate place on the sheet you have a roll section. It shows the attribute and ability you have selected, and has a button to click to make the roll. It's a bit clunky but also very simple. Personally I'd use custom roll parsing to make sure the selected attributes are cleared after every roll, and if either attribute or ability is set no roll is made. This is to make sure players dont accidentally roll with the last values set, instead of selecting the values needed for the new roll. But even without that element, just using a standard roll button, it works well enough.
Is it possible to do that in a macro, without using an appropriate character sheet - game's being run with completely the wrong character sheets in settings (pathfinder community sheet) and all the players are using external sheets and macros. No idea why, but I just joined and don't want to go demanding the ST change things to my preference.
1645642003

Edited 1645642056
GiGs
Pro
Sheet Author
API Scripter
If your using a macro, you'll need two prompts, once for attribute and one for ability. Something like /roll [[?{Attribute?| Strength,@{selected|Strength}| Dexterity,@{selected|Dexterity}| Presence,@{selected|Presence}} + ?{Ability| Athletics,@{selected|Athletics| Brawl,@{selected|Brawl| Computer,@{selected|Computer}]]d10>7sd There are ways to make it prettier (like using the default roll template), but that's the basic process - have a query for each attribute, add them together, and roll them. The macro would need to be tweaked for the stats you use, and the attribute names the sheet uses for them. The sd at the end makes the output dice sorted from high to low, making them easier to read
Yeah, I have no problem with that part. I think my problem is trying to work more flexibility from the system than it's capable of; I want one dropdown to provide a label in one part of the macro, and a value in another, and I'm guessing that's just not possible.
1645704414
GiGs
Pro
Sheet Author
API Scripter
No, unfortunately thats not possible, unless you follow Ziechael's advice and have a really BIG dropdown.
I'm not even sure how that would work for pulling through the attribute + ability lists and labels without essentially writing a macro for every possible attribute + ability combination, which kinda defeats the object of the exercise.
1645710958

Edited 1645710979
GiGs
Pro
Sheet Author
API Scripter
You can include more on one line of the macro, so you could do something like /roll [[?{Attribute?| Strength+Brawl,@{selected|Strength}+@{selected|Brawl}| Strength+Athletics,@{selected|strength}+@{selected|athletics}}]]d10 So yes, you'd neeed to list every possible attribute and ability combination, which is why I said it would be a BIG query. Using two queries is a lot easier, but to write and to use.
With some restrictions on ordering it is possible to have something output as @{attribute name} + @{ability name} : [[@{ability value} + @{attribute value}]] Note the ability/attribute names are switched. But by having both ability sections together the drop-down can be defined identically for all attributes and as such can be partially de-nested to avoid a lot of duplication and HTML entity problems. For example ! ?{Ability| AbilityOne,AbilityOne : [[@{AbilityOne}| AbilityTwo,AbilityTwo : [[@{AbilityTwo}| AbilityThree,AbilityThree : [[@{AbilityThree}} ?{Attribute| Strength,Strength + ?{Ability} + @{Strength}| Dexterity,Dexterity + ?{Ability} + @{Dexterity}}]] This defines the abilities on an API call line which gets hidden (No subscription required). This then allows the attribute roll query to reference the ability roll query by name without needing to provide the drop down definitions every time.