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

Complex Macro Question

Running a 5e campaign as the DM, and I have a very basic understanding of macros. As of right now, I've just been dragging the attack from the monsters character sheet (supplied by roll20) into my macro bar. However, when I'm running a larger dungeon or encounter series the macro bar gets extremely clustered. Is there anyway a macro could be set up to roll an attack for a selected token? For example, if I have a goblin token selected and hit this macro, could it then present me a drop down list of things like, Action 1, Action 2, etc. And then once those are pressed, they select the action from the character sheet and then use the macro already supplied by the character sheet? Long question I know i'm sorry, but any and all help would be greatly appreciated.
1502882920

Edited 1502883271
I use the 5e Community sheet by John Myles and have setup macro's to do this very thing for both the players and NPC's, as well as for Saves and Skills. If you use a different sheet, will probably have to change some of the field values but should work the same. First, in the Collections section, I created an individual macro for each item (whether it be for a save, skill, attack, etc) they all look similar, but will provide a few as examples: PC attack: Macro name= Melee1 &nbsp; &nbsp; &nbsp; &nbsp;Macro code=&nbsp;/me attacks @{target|token_name} with &#13,%{selected|MeleeAttack1} NPC attack: Macro name=NPC-Action1 &nbsp; &nbsp; &nbsp;Macro code=&nbsp;/w gm %{selected|NPCAction1} Skill Check: Macro name= Acrobatics_Chk &nbsp; Macro Code=&nbsp;/w gm %{selected|Acrobatics_check} Now that you have created an individual macro for each type in a category (I generally setup like 6 melee and 6 ranged macros) you create the macro to tie them all together. Example Listed below will be for the PC Melee attacks: Macro Name (and set as Show as Token Action): Melee_Attack Code: /w @{selected|token_name} &{template:5eDefault}{{title=Melee Attacks}}{{subheader=for @{selected|token_name}}}{{emote=[@{selected|meleeweaponname1}](! &#13, #Melee1) [@{selected|meleeweaponname2}](! &#13, #Melee2) [@{selected|meleeweaponname3}](! &#13, #Melee3) [@{selected|meleeweaponname4}](!&#13, #Melee4) [@{selected|meleeweaponname5}](!&#13, #Melee5) [@{selected|meleeweaponname6}](!&#13, #Melee6)}} A Carriage return is represented with the &#13, once in the code, that will not show. Hopefully this makes enough sense to help you out. Having these setup for both me and players means less accessing of the character sheet and helps out quite a bit. This is where I learned to do this, and he has lots of other great tips:&nbsp;<a href="https://www.youtube.com/watch?v=8RxRODcMRRo&index=6&list=PL4ihyL-PTq4N5DRmy72zCqD1eQhnqaCTp" rel="nofollow">https://www.youtube.com/watch?v=8RxRODcMRRo&index=6&list=PL4ihyL-PTq4N5DRmy72zCqD1eQhnqaCTp</a> Good luck.
Using the OGL 5e sheet here's what I do -- I have these macros to cover Attacks 1 - 5:&nbsp; %{selected|repeating_npcaction_$0_npc_action} %{selected|repeating_npcaction_$1_npc_action} %{selected|repeating_npcaction_$2_npc_action} %{selected|repeating_npcaction_$3_npc_action} %{selected|repeating_npcaction_$4_npc_action} And then these to cover lair actions 1 - 5&nbsp; %{selected|repeating_npcaction-l_$0_npc_action} %{selected|repeating_npcaction-l_$1_npc_action} %{selected|repeating_npcaction-l_$2_npc_action} %{selected|repeating_npcaction-l_$3_npc_action} %{selected|repeating_npcaction-l_$4_npc_action} That way I only have the 10 small buttons named A1 - A5; L1-L5 that will cover any selected token. But now I'm thinking if I can work them into a query macro with the assigned names that might be worth the bother.&nbsp;
1502888328

Edited 1502888395
I ran into a similar discussion on the 5e OGL sheet forum. Long story short, you can have the actions as a dropdown if you are willing to then also click a button in the chat to actually call the action. The reason for this is because you are getting into the area of HTML equivalents. If you were to have the dropdown directly call the actions, you would need to go through each action and change the ',', '|', and '}' to their HTML equivalents. However, if you do a combination of roll queries (?{}) and API/Ability command buttons you can get this to work. For example, this will work for the 5e OGL character sheet. ?{Action |@{repeating_npcaction_$0_name},[@{repeating_npcaction_$0_name}](&amp;#126;selected&amp;#124;repeating_npcaction_$0_npc_action) |@{repeating_npcaction_$1_name},[@{repeating_npcaction_$1_name}](&amp;#126;selected&amp;#124;repeating_npcaction_$1_npc_action) }