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

Help setting up some Quality of Life Macros

Hi,  Im very new to roll20 and I've been trying to set up some macros to allow my players to not have to worry about pulling up their character sheets all the time.  Some of them are working although they're not pretty (I like the 5e templates as a personal preference) But one im currently struggling with is this @{selected|wtype}&{template:atkdmg}  ?{Attack Choice |Attack1, %{selected|repeating_attack_$0_attack} |Attack2, %{selected|repeating_attack_$1_attack} |Attack3, %{selected|repeating_attack_$2_attack}} The intention being that it can be a token action that allows players to just pull up a drop down menu of their attack options and go any help would be appreciated. Currently it brings up the drop down menu and allows me to choose between attack1, attack2, attack3 but then no roll is made.
1564103737
Mike deBoston
Compendium Curator
The way most people do this is to make this macro display a menu of buttons in the chat window, and the player clicks on the button for Attack1 or Attack2, or whatever. For what you've shown here you create a menu macro and 3 attack macros. Check out this post, and if you can't get it to go, pop back with another question. <a href="https://app.roll20.net/forum/post/5899495/stupid-roll20-tricks-and-some-clever-ones/?pageforid=5927072#post-5927072" rel="nofollow">https://app.roll20.net/forum/post/5899495/stupid-roll20-tricks-and-some-clever-ones/?pageforid=5927072#post-5927072</a>
1564108813

Edited 1564108827
GiGs
Pro
Sheet Author
API Scripter
Chat menus are the best way to do this, and Mike says. But if you do try to use dropdown queries, never ever replace any of the characters in an attribute. You have %{selected&amp;#124;repeating_attack_$0_attack&amp;#125; This will cause the macro to break. it should be %{selected|repeating_attack_$0_attack} It can be tricky to identify which characters to replace with html entities, but the golden rule, never to be broken, is never replace characters in an attribute call . <a href="https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries" rel="nofollow">https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries</a> The section under the table explains this, but its easy to misunderstand that section, it's pretty confusing. That section ends with: Hence,&nbsp; calls &nbsp;are not problematic! Do not subject them to character replacements! Never do this: @{target&amp;#124;token_name&amp;#125;
So the problem I seem to be having is doing it without the html replacements doesn't give me a list of options only the first which then attempts to roll the second 2 macros.&nbsp; With the HTML replacements I get the 3 options but none of them roll correctly. I will take a look at a chat menu but it's not quite what I was going for. GiGs said: Chat menus are the best way to do this, and Mike says. But if you do try to use dropdown queries, never ever replace any of the characters in an attribute. You have %{selected&amp;#124;repeating_attack_$0_attack&amp;#125; This will cause the macro to break. it should be %{selected|repeating_attack_$0_attack} It can be tricky to identify which characters to replace with html entities, but the golden rule, never to be broken, is never replace characters in an attribute call . <a href="https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries" rel="nofollow">https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries</a> The section under the table explains this, but its easy to misunderstand that section, it's pretty confusing. That section ends with: Hence,&nbsp; calls &nbsp;are not problematic! Do not subject them to character replacements! Never do this: @{target&amp;#124;token_name&amp;#125;
1564197795
GiGs
Pro
Sheet Author
API Scripter
Maya R. said: So the problem I seem to be having is doing it without the html replacements doesn't give me a list of options only the first which then attempts to roll the second 2 macros.&nbsp; With the HTML replacements I get the 3 options but none of them roll correctly. I will take a look at a chat menu but it's not quite what I was going for. It is almost certainly possible to make that drop down work using html replacements, but you have to make the correct replacements in the right places. Replacing characters in attribute calls will always fail, so you need to do something else to fix it. The problem is the Abilities you are calling contain characters that need replacing. For instance you are trying to all&nbsp; %{selected|repeating_attack_$0_attack} The problem is not that call, but the contents of that ability. When you run a macro, roll20 expands the contents of all ability calls and makes them a single giant macro. If you have any characters like } or | or , within those abilities, they will cause the dropdown query to fail. The only way to avoid this is to abandon the idea of having separate abilities you can call in the dropdown. Instead you have to put everything that is in those abilities in the dropdown itself, and then study it to figure out what characters need replacing.&nbsp; For example, here's perhaps the simplest way to use a dropdown to make a set of skill rolls for D&amp;D from Silvyre . If your abilities have their own rolltemplates and other complex syntax, it will be a LOT more complictaed than that and you'll need to restructure them massively to make it work. Repeat for emphasis: you cannot use separate abilities (unless they are extremely basic) &nbsp; within a dropdown menu, and expect them to work. Either they work on their own and dont work in a dropdown, or if they are edited to work in a dropdown, they stop working as standalone macros. There's no way around this. A dropdown menu must be built from the ground up with every element on the menu built to work within the dropdown. That's really hard and most of us have given up on the approach since chat menus are so much easier to create. They do work with separate abilities.