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 .
×

Only one macro for NPC's attacks

Hi, I'm a newbie creating macros and I'm thinking if it's possible to create a macro for the attack of a NPC's token selected. I'm playing DnD 5ed. and in the NPC Character Sheet I have the actions. In this there are fields for bonus attack and damage. Is it possible create a macro that takes that information? I don't want to have the NPC sheet open to roll the attack or the damage. I'm thinking in a macro (really two) that can be used selecting one token and automatically have the bonus attack (or the damage dice) for the roll. Click the macro button and roll 1d20+(bonus attack to hit of the selected token).  The other macro will be click the macro button and roll the dice or dices that are in the field On Hit. For example, click the button and automatically roll 2d4+2. I have made a lot of attempts but I have not achieved anything. Thanks for your help and sorry for my english.
1587318092
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
This is a sheet setting. Click on the action will either generate a chat message showing the rolls to hit and the damage rolled, or just the rolls to hit, and clicking on the attack name in chat will roll the damage. The behavior is a setting on the settings tab for each NPC. You might be interested in this:  NPC Statblock Chat Menu for D&D 5e sheet — No API required!
Thanks! Finally I did that: For the attack:  %{selected|repeating_npcaction_$0_npc_action} If the NPC have a second attack:  %{selected|repeating_npcaction_$1_npc_action} And for the damage:  %{selected|repeating_npcaction_$0_npc_dmg} . The damage of a second attack:  %{selected|repeating_npcaction_$1_npc_dmg} Now, I know that if a NPC have more actions I must plus 1 after $. :)