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

Dropdown menu result importing to Roll Template.

Is it possible to send a text selection from a drop down menu to a roll template (eg damage type, so it displays the damage type from the weapon in the final result of the roll template)? I have seen macros that do this using {dtype}, but I don't want to import a die roll, rather a description (like wounding vs bruising).

May 10 (4 years ago)

Edited May 10 (4 years ago)
Andreas J.
Forum Champion
Sheet Author
Translator

Yes you can. the dropdown query doesn't make difference on what you put inside it.


&{template:default} {{name=Attack}} {{Description=You deal a [[?{Type|Bruising|Wounding}]] strike. }}

If you have the text dropdown on the character sheet:

&{template:default} {{name=Attack}} {{Description=You deal a @{description} strike. }}

Thank you so much! I must have missed these examples when I was searching the wiki (I'm trying to relearn html, something I haven't played with in almost 20 years, and it's been frustrating).


Hopefully this will lead me to solving my next dilemma (a bit more complicated issue of conditionals, but that can wait). 

May 10 (4 years ago)

Edited May 10 (4 years ago)
Andreas J.
Forum Champion
Sheet Author
Translator

That page is the main hub for macro creation, linking to other pages with more info. I just made the examples on the spot as they where basic.


Learning of Inline Rolls should make it easier to understand that anything used on /r type rolls can be used in roll templates, using inline rolls.

It seems I got the drop down portion correct in the button macro, but the second example is where I want to go with this, so this solves my primary dilemma. 

May 10 (4 years ago)
Andreas J.
Forum Champion
Sheet Author
Translator

create a <select> element on the sheet, and then just reference the attribute on the sheet: https://wiki.roll20.net/BCS#Dropdown_menu

Again, thank you very much!


Honestly you'd think I'd care less considering this is a homemade (Frankensteined) character sheet for a game that pretty much no one plays anymore, but I love just how much having the template calculate and describe results makes the die rolling elements of the game run smoothly.  Let's everyone focus on the role playing much more (and the focus of this campaign turned out to be investigative, so making each roll a one stop result engine leaves more time for the PCs to ask questions and me to scramble mentally to keep everything from falling apart, heh). 


You're a life saver!