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 .
×

Spell caster macros

1616269349

Edited 1616281260
Hello there,  Been reading a lot of posts; can I create templated macro's and embed / call them from a master. I want to create a spell drop down menu. I created two macros and then made a dropdown list and called each but it won't work. Any ideas fam? Just don't want to hard code into the spell list macro would like the template to pull in when I select from the drop down. Thanks in advance! Happy Hoboin' Spell List: &{template:default} {{name=Spells}}{{?{Spells | Magic Missile, Magic Missile [[#Magic-Missle ]] | Fireball, Fireball [[#Fireball ]}}}  Spells Macros: &{template:default} {{name=Fireball}} {{Damage=[[7d6]]}} {{Save = 17 Reflex / 1/2dmg}}{{Size = 40ft}} &{template:default}{{name=Magic Missile}}{{Missile 1=[[1d4+1]]}}{{Missile 2=[[1d4+1]]}}{{Missile 3=[[1d4+1]]}}{{Missile 4=[[1d4+1]]}}{{Save= None}}
1616410124
Ziechael
Forum Champion
Sheet Author
API Scripter
When you try to call a macro from a query you are effectively placing the contents of the macro within the query which has the knock-on effect of breaking the query due to the problematic characters... usually the } that are part of the templates used. If you REALLY want it to work from a drop down you'd drop the template part of the query and just have (the space after the macro call is essential): ?{Spell|Magic Missile,#Magic-Missile |Fireball,#Fireball } But you'd have to update all the problematic characters in the resulting macros with their html counterpart (for the , | and } characters): &{template:default} {{name=Fireball}} {{Damage=[[7d6]]}} {{Save = 17 Reflex / 1/2dmg}} {{Size = 40ft}} The problem you'll have now is that those macros will not work as standalone entities in their own right due to the nesting, also, once saved in the collections section you'd have to NEVER reopen it otherwise you'll need to replace the html each time. If you choose to use a chat menu instead check out this wiki entry . Immediately followed by this post .