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

Chose a dice in a macro

1458232170

Edited 1458232198
Hello all, i'm trying to built a macro for my Savage World game which permits the player/GM to select the main dice and roll this dice and the wild card dice automatically. These macro should be very useful as a generic roller in the macro bar. For exemple, i need to roll a d8 for a wild card. Just click on the macro button, select d8 in the list and the "/roll {1d8!,1d6!}kh1" is done in the chat But i'm not able to use the drop-down query with the {1d8!,1d6!}kh1 in the same command. I wonder if its possible to make something like that : ?{Choose Dice|1d4, {1d4!,1d6!}kh1|1d6, {1d6!,1d6!}kh1|1d8, {1d8!,1d6!}kh1} this one does not work, probably due to { } limitation in the same command but if someone knows how to manage that.... thanks a lot !
1458232544

Edited 1458232630
You would need to replace the } and the , with the HTML entities for them. }  for } and , for the commas. And save the macro as an ability on a character sheet. The macros in the settings tab will auto convert them. 
1458237212
Ziechael
Forum Champion
Sheet Author
API Scripter
As Ed says your nested curly braces and commas will cause conflict with the overall syntax of a roll query. Check out the  advanced usage for queries section of the macros wiki for further information. Also, please note that this will  work saved as a general macro but if you reopen that macro again it will convert the html entities and 'break' it, in other words you'd need to re-paste the macro again with the entities intact before saving to close the macro... that is why abilities are the safer option ;)
1458240732

Edited 1458240811
Thanks for the answers... but i don't really understand the problem. If i replace the braces and commas with the HTML code taken in the wiki page (for example & # 124 ; for the brace) it seems not work (the code is managed like a alpha value...).  I'm trying to use the 5e Attack Roll example of the wiki which should be ok for my use, with all special character replaced, but nothing to do... there's a bug... (probably a little one but not able to understand why).
1458241049

Edited 1463541880
I generally recommend that elements common to every drop-down field of a Roll Query be factored out. e.g. ?{Q|A, [[1d20 + 1]]|B, [[1d20 + 2]]|C, [[1d20 + 3]]} → [[ 1d20 + ?{Q|A, 0|B, 1|C, 2} + 1 ]] So, instead of bothering with Advanced stuff in this instance, I'd recommend using this: {1?{Choose Dice|d4|d6|d8}!, 1d6!}kh1
Thanks for the idea, it's a very smart solution ! Works perfectly ! Thanks everyone for help !