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

Multiple drop down boxes

Hi, I just started experimenting with macros. I want to create a macro for cure wounds in pathfinder. I want to select the type of spell and the bonus it gets. So cure light wounds does 1d8+caster level, medium wounds does 2d8+caster level, and so on. To make it usable also for potions, I want to avoid having the caster level as an attribute. So the macro was ?{Type?:|Light,[[1d8+?{Level?}]]|Medium,[[2d8+?{Level?}]]} But that second ? Block doesn't work. Is it a bug or is it not possible to make this work?
No, this is exactly what I did not want to do. I want to use the macro for the spell, which adds the caster level (then your example works), but also for the potion, which could have been brewed by a person with a totally different caster level. So I want two inputs to appear. In the first you select the type of spell, in the second you input the bonus value
Try this- This will input the caster level of the token character you select - ?{Type? | Light,[[1d8+@{selected|caster_level}]] Light | Medium, [[2d8+@{selected|caster_level}]] Medium }
Thanks for your help, but you don't get what I want. I don't want to get the level from the selected token, I already know how that works. I want to set the level via input box.
1524215695
Ziechael
Forum Champion
Sheet Author
API Scripter
Stefan doesn't want to use an attribute for the caster level. The issue here is the nested query which is falling afoul of the need to replace some syntax with html entity replacements as per the  wiki . You'll need to do it like this (note that if you save this as a global macro you'll never be able to open the saved macro again or it will replace the html and you'll need to reset the code, the key is to save it off-site or as a character ability as well in case you need to reset it): ?{Type|Light,[[1d8+?{Level?}]]|Medium,[[2d8+?{Level?}]]} Alternatively you can use the query to define the variable but have everything else outside of it to avoid the need for html entities: [[ ?{Type|Light,1|Medium,2}d8 + ?{Level} ]]
Or to input your own level - /me casts [[ ?{Cast level? | 0} + ?{Type? | Light,[[1d8]] Light | Medium, [[2d8]] Medium }]]
I am really new to this. So I don't know all the tricks. So I sometimes go the long way.
1524216199

Edited 1524216242
@Ziechael That's excatly what I wanted, thanks :) The part with the html entities was the part of the wiki I didn't understand quite completely. So the second macro works perfectly
1524216246
Ziechael
Forum Champion
Sheet Author
API Scripter
There are many ways to achieve the same result :) James said: /me casts [[ ?{Cast level? | 0} + ?{Type? | Light,[[1d8]] Light | Medium, [[2d8]] Medium }]] Is a great example of another way to save having to nest your queries... also yet another user highlighting to me how awesome this community is, there is never a shortage of people willing to help!
1524216305
Ziechael
Forum Champion
Sheet Author
API Scripter
Stefan G. said: @Ziechael That's excatly what I wanted, thanks :) The part with the html entities was the part of the wiki I didn't understand quite completely. So the second macro works perfectly It's certainly a learning curve... even more to get the forum displaying correctly to help others learn lol. Nesting queries is certainly worth taking the time to learn but also only worth using when you REALLY have to ;) Happy rolling!
1524236626
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Since I started using a dedicated  macro sheet for 90% of my macros, it has really cut down on the number of HTML replacements I have to deal with.