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

Create a macro that has clickable macros inside

January 26 (7 years ago)
I'm trying to put all my individual dice macros into 1 macro and like the single macro to my bar at the bottom.  Example:

Macro bar has button called "Dice".  I click it, and it shows me a list of dice I use, d4, d6, d8, etc.  I click the one I need, and it runs this macro for the dice I need: [[?{Number of dice?|1}d10+?{Modifier?|0}]]

How do I make this happen?
January 26 (7 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Are you looking for something like a Chat Menu?
January 26 (7 years ago)

Edited January 26 (7 years ago)
vÍnce
Pro
Sheet Author
For the love of Iomedae, definitely go chat menu(API buttons) vs a query of nested macros to avoid all the additional special character replacements.
January 26 (7 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Also, look into making them character abilities (macros tied to a character sheet). You can also vastly reduce the need for HTML replacements that way.
January 27 (7 years ago)
I like the idea of the character abilities.  That sounds like the easiest way to handle it.  I'm not very good with coding or API.  So having a character designed for loot options, dice options, and all other things I need as a GM would be the easiest solution.

Thank you.
January 27 (7 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Watoni said:

I like the idea of the character abilities.  That sounds like the easiest way to handle it.  I'm not very good with coding or API.  So having a character designed for loot options, dice options, and all other things I need as a GM would be the easiest solution.

Thank you.

More info on Macro Character Sheets
January 29 (7 years ago)
Keithcurtis, I appreciate the link to the Macro Character Sheets, and I've read it over a few times, but I can't seem to get the coding right.

Is it possible if you can show me a sample code that I can better understand what characters are where and why?  I think if I can understand that, then I can build macros as needed.

Thank you.
January 29 (7 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I sent you a PM, but here is the answer for public consumption, in case others have the same problem:

I would suggest making your macros as abilities on a character sheet, as exampled elsewhere on that thread. Make a macro called dice on that sheet as a character ability, and a menu macro ability on the same sheet with code something like:

/w gm &{template:5e-shaped} {{title=Dice}} {{text=[Dice](~Dice)}}
The "~" references an ablity macro on the same sheet and is far easier than trying to put a general macro reference into a roll template.

Without that, you have to mess around with HTML replacements. It becomes something like:

/w gm &{template:5e-shaped} {{title=Dice}} {{text=[Dice](! & # 13 ; #Dice)}}
But remove all the spaces in the characters before "#Dice". I have to type it oddly, or the forums will parse the characters.  The actual code is here. But I would really, really advise going with abilities on a character sheet. Much easier and more straightforward. Every time you open up that roll template macro to edit it, you will find that your code has converted and you will manually need to replace the converted bit. Let me know if this helps.

And my template is of course, from the Shaped Sheet. You'll need to declare either the default template, or one associated with the sheet you are using.