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

Chat Menu Macro Output

1657644138

Edited 1657645128
So I am running Power Rangers here on the platform and Honestly its been awful. So to speed things up I created the following Macro. &{template:default} {{name=Normal Menu}}{{[D20](`/r 2d20kl1) }}{{[D2](`/r 2d20kl1 + 1d2) }}{{[D4](`/r 2d20kl1 + {1d2, 1d4}kh1 ) }}{{[D6](`/r 2d20kl1 + {1d2, 1d4, 1d6}kh1 ) }}{{[D8](`/r 2d20kl1 + {1d2, 1d4, 1d6, 1d8}kh1 ) }}{{[D10](`/r 2d20kl1 + {1d2, 1d4, 1d6, 1d10}kh1 ) }}{{[D12](`/r 2d20kl1 + {1d2, 1d4, 1d6, 1d10, 1d12}kh1 ) }}{{[2D8](`/r 2d20kl1 + {1d2, 1d4, 1d6, 1d10, 1d12, 2d8}kh1 ) }}{{[3D6](`/r 2d20kl1 + {1d2, 1d4, 1d6, 1d10, 1d12, 2d8, 3d6}kh1 ) }} This outputs this  How can I apply a roll template to the output of these rolls? 
1657644938
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Renderance! It looks like you intended to include a screen shot in your post? Roll20 forums don't take copy and paste images. You'll need to either use the upload button or drag an image in from your desktop. Weirdly, you can copy and paste if you are copying and pasting directly from a source that is already online (i.e. not copied from an image on your hard drive). My suspicion has always been that it's some sort of metadata issue. In any case, if the image helps to present your issue, that's how to get it to display.
1657645151

Edited 1657645612
Sorry Keith I added it Output of the buttons on the menu look like this. Those do a standard roll but i'd like clean it up so that it applies the default roll template to the output off that menu. 
1657647038
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Nesting templates is very tricky. I would suggest setting up a  Macro Character Sheet  and creating an ability for each one. If everything is on the same sheet, then the syntax for calling each one is: [button name](~name-of-Ability) Other benefits are no HTML substitution headache, and the sheet can be transmogged into new games easily. If you want other players to be able to use the macro, give them control of the sheet, but not journal view permissions (every character has two permission fields). They can use the macro, but not mess it up. Easiest method is to create a collections macro that calls the master macro: %{Macro Sheet Name|Name-of-Chat-Menu-Macro} give permission for that master macro to "All Players". They can turn it on in their own Macro Quick Bar if they like, or if they aren't particularly savvy, also click the button to make that Collections Macro into a Token Action, and the button will appear at the top whenever they have selected a token they control.
1657651706

Edited 1657651722
GiGs
Pro
Sheet Author
API Scripter
It looks like that roll is "easily" reduced to a single roll, dispensing with the need for a chat menu. &{template:default} {{Normal Roll=[[2d20kl1 + {?{dice?| D20, 0| D2, 1d2| D4, 1d2+ 1d4| D6, 1d2+ 1d4+ 1d6| D8, 1d2+ 1d4+ 1d6+ 1d8| D10, 1d2+ 1d4+ 1d6+ 1d8+ 1d10| D12, 1d2+ 1d4+ 1d6+ 1d8+ 1d10+ 1d12| 2D8, 1d2, 1d4, 1d6, 1d8, 1d10, 1d12, 2d8| 3D6, 1d2, 1d4, 1d6, 1d8, 1d10, 1d12, 2d8, 3d6} }kh1 ]]}} I've written it this way to reduce the number of html entity substitutions, but the bottom two lines still need them. So if you store this in a macro, if you ever reopen it, the html entitles will be removed and that macro wont work properly. You are better off storing it in a character ability, and sharing it with the players. You can hover over the inline roll to see the individual dice.
1657653979
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Very elegant! HTML substitutions make my eyes water, so I avoid them when I can. :D
1657656867
GiGs
Pro
Sheet Author
API Scripter
Thanks, I hate them too and use chat menus whenever possible :) That said, if you're using the original method with a bunch of chat menu buttons, you might find it better to make the output more compact like this: &{template:default} {{name=Normal Menu}}{{[D20](`/r 2d20kl1) [D2](`/r 2d20kl1 + 1d2) [D4](`/r 2d20kl1 + {1d2, 1d4}kh1 ) [D6](`/r 2d20kl1 + {1d2, 1d4, 1d6}kh1 ) [D8](`/r 2d20kl1 + {1d2, 1d4, 1d6, 1d8}kh1 ) [D10](`/r 2d20kl1 + {1d2, 1d4, 1d6, 1d10}kh1 ) [D12](`/r 2d20kl1 + {1d2, 1d4, 1d6, 1d10, 1d12}kh1 ) [2D8](`/r 2d20kl1 + {1d2, 1d4, 1d6, 1d10, 1d12, 2d8}kh1 ) [3D6](`/r 2d20kl1 + {1d2, 1d4, 1d6, 1d10, 1d12, 2d8, 3d6}kh1 ) }}
I compromised and went another way with it. LOL
1657660537
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Renderance said: I compromised and went another way with it. LOL If you think your solution may be valuable to other users, feel free to post it here. Other folks with similar problems may benefit.
&{template:default} {{name=Edge With Spec Menu}}{{[D20](`/r 2d20kh1) = [D2](`/r 2d20kh1 + 1d2) }}{{[D4](`/r 2d20kh1 + {1d2, 1d4}kh1 ) = [D6](`/r 2d20kh1 + {1d2, 1d4, 1d6}kh1 ) }}{{[D8](`/r 2d20kh1 + {1d2, 1d4, 1d6, 1d8}kh1 ) = [D10](`/r 2d20kh1 + {1d2, 1d4, 1d6, 1d10}kh1 ) }}{{[D12](`/r 2d20kh1 + {1d2, 1d4, 1d6, 1d10, 1d12}kh1 ) = [2D8](`/r 2d20kh1 + {1d2, 1d4, 1d6, 1d10, 1d12, 2d8}kh1 ) }}{{[3D6](`/r 2d20kh1 + {1d2, 1d4, 1d6, 1d10, 1d12, 2d8, 3d6}kh1 ) }} This is what it will look like when done. Just change these out for the right formula. 
1657661031
GiGs
Pro
Sheet Author
API Scripter
You might want to make the first one on a row of its own, to make it stand out and line things up better.
Below are the final products.  Edge Menu &{template:default} {{name=Edge Roll Menu}}{{EDGE}}{{[D20](`/r 2d20kh1)}}{{[D2](`/r 2d20kh1 + d2) = [D4](`/r 2d20kh1 + d4) }}{{[D6](`/r 2d20kh1 + d6) = [D8](`/r 2d20kh1 + d8) }}{{[D10](`/r 2d20kh1 + d10) = [D12](`/r 2d20kh1 + d12) }}{{[2d8](`/r 2d20kh1 + 2d8) = [3d6](`/r 2d20kh1 + 3d6) }}{{With Speciliazation}}{{[D4](`/r 2d20kh1 + {1d2, 1d4}kh1 ) = [D6](`/r 2d20kh1 + {1d2, 1d4, 1d6}kh1 ) }}{{[D8](`/r 2d20kh1 + {1d2, 1d4, 1d6, 1d8}kh1 ) = [D10](`/r 2d20kh1 + {1d2, 1d4, 1d6, 1d10}kh1 ) }}{{[D12](`/r 2d20kh1 + {1d2, 1d4, 1d6, 1d10, 1d12}kh1 ) = [2D8](`/r 2d20kh1 + {1d2, 1d4, 1d6, 1d10, 1d12, 2d8}kh1 ) }}{{[3D6](`/r 2d20kh1 + {1d2, 1d4, 1d6, 1d10, 1d12, 2d8, 3d6}kh1 ) }} Normal Roll Menu &{template:default} {{name=Normal Roll Menu}}{{Normal}}{{[D20](`/r d20)}}{{[D2](`/r d20 + d2) = [D4](`/r d20 + d4) }}{{[D6](`/r d20 + d6) = [D8](`/r d20 + d8) }}{{[D10](`/r d20 + d10) = [D12](`/r d20 + d12) }}{{[2d8](`/r d20 + 2d8) = [3d6](`/r d20 + 3d6) }}{{With Speciliazation}}{{[D4](`/r d20 + {1d2, 1d4}kh1 ) = [D6](`/r d20 + {1d2, 1d4, 1d6}kh1 ) }}{{[D8](`/r d20 + {1d2, 1d4, 1d6, 1d8}kh1 ) = [D10](`/r d20 + {1d2, 1d4, 1d6, 1d10}kh1 ) }}{{[D12](`/r d20 + {1d2, 1d4, 1d6, 1d10, 1d12}kh1 ) = [2D8](`/r d20 + {1d2, 1d4, 1d6, 1d10, 1d12, 2d8}kh1 ) }}{{[3D6](`/r d20 + {1d2, 1d4, 1d6, 1d10, 1d12, 2d8, 3d6}kh1 ) }} Snag Menu &{template:default} {{name=Snag Roll Menu}}{{Snag}}{{[D20](`/r 2d20kl1)}}{{[D2](`/r 2d20kl1 + d2) = [D4](`/r 2d20kl1 + d4) }}{{[D6](`/r 2d20kl1 + d6) = [D8](`/r 2d20kl1 + d8) }}{{[D10](`/r 2d20kl1 + d10) = [D12](`/r 2d20kl1 + d12) }}{{[2d8](`/r 2d20kl1 + 2d8) = [3d6](`/r 2d20kl1 + 3d6) }}{{With Speciliazation}}{{[D4](`/r 2d20kl1 + {1d2, 1d4}kh1 ) = [D6](`/r 2d20kl1 + {1d2, 1d4, 1d6}kh1 ) }}{{[D8](`/r 2d20kl1 + {1d2, 1d4, 1d6, 1d8}kh1 ) = [D10](`/r 2d20kl1 + {1d2, 1d4, 1d6, 1d10}kh1 ) }}{{[D12](`/r 2d20kl1 + {1d2, 1d4, 1d6, 1d10, 1d12}kh1 ) = [2D8](`/r 2d20kl1 + {1d2, 1d4, 1d6, 1d10, 1d12, 2d8}kh1 ) }}{{[3D6](`/r 2d20kl1 + {1d2, 1d4, 1d6, 1d10, 1d12, 2d8, 3d6}kh1 ) }} This incorporates GiGs suggestion and puts the d20 roll by itself. Is there a way to take this from just text to actual buttons? The pink buttons would actually be better here than the text version.
1657841922
GiGs
Pro
Sheet Author
API Scripter
I think you'd need to create a macro or character ability for each dice roll, instead of using this methid: `/r That said, I remember there's a way to embed styles in a button that might work - if it works, it'll make the code a lot clukier and ugglier. Honestly using macros would be easier. But if it interests you, I'm usure its mentioned in the Useful Tips & tricks thread, by Oosh I think.