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

Where to put Chat Menus and Roll Templates?

For my 5e DnD 2014 game, I've recently come up with a variety of Chat Menus and Roll Templates to use for a lot of the Homebrew we have. What I mean by Chat Menus and Roll Templates in this case is creating a link in chat, which can be used to activate an ability or general macro, which oftentimes contains a roll template of sorts, depending on the situation. In testing these, I have found that the whole [command name](~ability-name) can be placed in a variety of places, but not everywhere. I was wondering if there is a clear overview on all the places on the D&D 5E by Roll20 Character Sheet where you can place these and actually use them? I have used them in the description of attacks, in features (when send to chat), default templates, and even hand outs. When I have a special kind of attack however, I don't think I can put them in the standard list of attack options. Or if I have some sort of weapon which allows me to choose from several kinds of attacks which have different calculations, am I truly forced to have each of those attacks as separate attacks, instead of 1 button which then gives a Chat Menu of options? One of the things I want to avoid is to create a super long list of Ability buttons at the bottom of screen or when selecting a token. I would like something that creates the same kind of ease of clicking a standard attack, in as much as that is possible of course. Another thing I encountered is that apparently, you cannot put a template as an option in a drop-down of another macro. So something like this is not possible: ?{Name of Query|Label 1, &{template:desc} {{desc=desc}} |Label 2, &{template:desc} {{desc=desc}} }
1761147405
timmaugh
Forum Champion
API Scripter
On your last point, first... The reason those options fail is because the query processes first (check out the order of operations from the wiki) before the template is rendered to chat. Part of the query processing is that the parsers are looking for characters that matter to the query: }  => a right brace ends the query |  => a vertical pipe separates dropdown options ,  => a comma differentiates the label (what you visibly see in the dropdown of the query) from what is returned to the command line from enacting that option Those two facts, together, mean that if you want to use one of these control characters within a query for something other than those listed jobs, you have to use HTML substitution to have them go undetected by the query parsing. I prefer these substitutions to the ones listed on that linked page: }  => } |  => | ,  => , So your example would work as: ?{Name of Query|Label 1, &{template:desc} {{desc=desc }}|Label 2, &{template:desc} {{desc=desc}} } On a similar note, if you include an attribute or ability within a query and that attribute or ability has these control characters, they will break the query (again, look at the order of operations). In this case, you have 3 options: change the included attribute/ability to do the HTML substitutions (rendering it workable through a query, but not as a stand-alone operation); use a Chat Menu instead of a query (creating a button for each option rather than an entry in a query; or use a mod script. Finally (at least as it bears on when/how things resolve) it bears mentioning that shorthand attribute/ability reference (ie, @{hp} vs @{Bob|hp} ) only works from the context of the sheet, itself. Sometimes people render buttons from command lines that would work from a character sheet, but which don't work as a button from Chat. That said, if such a shorthand reference was in your query, it would resolve first (see previous discussion of the Order of Operations), before the button was rendered to chat, so that might not always come up. I'm just mentioning it for thoroughness. On your question of what places in the 2014 sheet will run a command like this... I will defer to those who know the sheet better to answer that.
There is no clean list of which fields on the D&D 5E 2014 by Roll20 character sheet can accept text, inline rolls, or queries. It will be a matter of experimentation depending on exactly what you're trying to do. As an example, if you have an attack that can deal different damage types, then you can add a query to the damage type field and each time that attack is used, the player will have to choose the damage type they want for that attack. Not too difficult. If the choice of attack means that there is a different damage roll and damage type, then your best bet is to create a separate attack. But it might be possible to provide a workaround in a single attack, using an html trick in the description field to replace multiple other fields in the roll template. If you're doing this for a single or a few PCs, then that's doable. It's not something you'll want to do for a bunch of NPCs.  You'll have to provide more specifics on what you're trying to accomplish.
1761159793
Gauss
Forum Champion
Lyriander D.,  I too have a lot of macros etc for simplifying things in the 2014 sheet. If you'd like I can come take a look over your setup and offer suggestions. 
Very informative! Thanks a lot. I should have thought about the fact that there is an order of operations. Seems obvious in hindsight. Good to know that there is still some degree of being able to use the queries like that. timmaugh said: On your last point, first... The reason those options fail is because the query processes first (check out the order of operations from the wiki) before the template is rendered to chat. Part of the query processing is that the parsers are looking for characters that matter to the query: }  => a right brace ends the query |  => a vertical pipe separates dropdown options ,  => a comma differentiates the label (what you visibly see in the dropdown of the query) from what is returned to the command line from enacting that option Those two facts, together, mean that if you want to use one of these control characters within a query for something other than those listed jobs, you have to use HTML substitution to have them go undetected by the query parsing. I prefer these substitutions to the ones listed on that linked page: }  => } |  => | ,  => , So your example would work as: ?{Name of Query|Label 1, &{template:desc} {{desc=desc }}|Label 2, &{template:desc} {{desc=desc}} } On a similar note, if you include an attribute or ability within a query and that attribute or ability has these control characters, they will break the query (again, look at the order of operations). In this case, you have 3 options: change the included attribute/ability to do the HTML substitutions (rendering it workable through a query, but not as a stand-alone operation); use a Chat Menu instead of a query (creating a button for each option rather than an entry in a query; or use a mod script. Finally (at least as it bears on when/how things resolve) it bears mentioning that shorthand attribute/ability reference (ie, @{hp} vs @{Bob|hp} ) only works from the context of the sheet, itself. Sometimes people render buttons from command lines that would work from a character sheet, but which don't work as a button from Chat. That said, if such a shorthand reference was in your query, it would resolve first (see previous discussion of the Order of Operations), before the button was rendered to chat, so that might not always come up. I'm just mentioning it for thoroughness. On your question of what places in the 2014 sheet will run a command like this... I will defer to those who know the sheet better to answer that.