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

Trying to create an attack Macro for DnD 5e character sheets

So basically I am trying to make a Macro that will automatically roll an attack for my PCs' main weapons, for example the Paladin's longsword, the Monk's shortsword, etc. I have looked around and can't really find anything anywhere. I know that my players can simply drag the attack from their sheet to their universal Macros, but I am trying to keep all of their Macro's on their token actions to not confuse them. Does anyone have any ideas, or better yet a way I can see the Macro's code when it is copied so I can just copy and paste? 
1612151452
Oosh
Sheet Author
API Scripter
If you're happy with the output from the sheet roll, and just want to move it to a token action, you can just reference the sheet's roll: %{bob|repeating_attack_$0_attack} This would roll the first ability (0-indexed) in the repeating attacks section for character Bob. The second ability would be $1 instead of $0, and so on. The index reference will change if a player reorganises a repeating section. To deal with that you can reference them by their row ID instead of the index - this is a 20 character unique identifier which you can grab in a few ways. Dragging the ability to the bottom macro bar is one, HTML inspection is another. Either way, if you create an Ability macro on the character, using the row ID instead of the index, it'll always point to the same ability. So: %{bob|repeating_attack_-DGNh-9g2h_hNBU8on_attack} Save that as an Ability macro on Bob's character sheet, name it something helpful, and tick the "token action" checkbox.
Oosh thank you for your quick reply. I am sure this was an easy answer but I really am clueless with this Macro stuff. I really appreciate such a swift reply. This should make the combat flow smoother for my new players. 
A trick I've been using, assuming you are using the standard Roll20 D&D 5E sheet, is to click on the attack on the character sheet so it brings up the attack in the chat pane and then go into the part of the chat box where you would start typing in chat and use the up arrow key, this will bring up the macro for the ability you just used.  Select it all, and then use Ctrl C to copy it and Ctrl V to past it into an ability on the appropriate character sheet.  Then you can set that as a token action, or link it to a chat menu button.  This works for weapons, spell attacks, saves, skills etc, pretty much anything you can click on the character sheet to come up in chat can be copy/pasted into an ability macro.