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

How to output a text string from a drop down menu / roll query?

I'm still new to roll20 macro coding and am trying to design macros for 3.5 psionic energy powers, such that when I use one, it gives a drop-down list of the energy types to select, and then displays the chosen energy type on the information table.  I have this for Energy Cone:

&{template:DnD35StdRoll} {{spellflag=true}} {{name=@{character_name} }} {{subtags=manifests [Energy Cone!](https://www.d20srd.org/srd/psionic/powers/energyCone.htm)}} {{Energy Type:= [[?{Energy?|Cold|Electric|Fire|Sonic}]] }} {{Overchannel:= [[?{Overchannel?|0|1|2|3}]] }} {{Augment:= [[?{Augment?|0}]] }} {{Discipline:= Psychokinesis}} {{Level:= Energy 3}} {{Display:= Auditory}} {{Manifesting Time:= standard action}} {{Range: = 60 ft}} {{Area:= Cone-shaped spread}} {{Duration:= Instantaneous}} {{Save DC:= Reflex or Fort (Cold) Half (DC [[13+@{wis-mod}+?{Augment?|0}/2]]) +2 if Electric }} {{Power Resist:= Yes}} {{Power Points:= [[5 +?{Augment?|0}]]}} {{ML check: = [[d20+@{manifesterlevel}+?{Overchannel?|0}]] (+2 if Electric) vs Power Resistance.}} {{Damage=[[5d6 +?{Augment?|0}d6]] energy damage %NEWLINE%+[[5+?{Augment?|0}]] damage if Fire/Cold %NEWLINE%-[[5+?{Augment?|0}]] damage if Sonic}}


My problem is specifically with the Energy Type part:

{{Energy Type:= [[?{Energy?|Cold|Electric|Fire|Sonic}]] }}


If I remove it, the power's output posts fine.
If I change the cold|electric|fire|sonic to 1|2|3|4, the power's output posts fine (w/ a number 1-4 in the "Energy Type" section).
But I want it to actually output the text.  How do I do this?
Thanks.

January 12 (1 month ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator

Just remove the square brackets you have around the roll query. In roll20, these are known as inline roll brackets and denote a set of code that you want roll20 to parse as a dice roll and/or do math on.

That worked, thanks