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

Need Help with Attack and Damage Macro

Hello.  I am trying to modify the macro in Roll20 on a Character's Dagger Attack.  The macro works for the attack but I can't seem to get it to automatically roll damage as well.  The damage for this would be 1d4 piercing.   If anyone can assist me with this I would greatly appreciate it.  Below is the code. @{TestCharacter|wtype}&{template:atk} {{mod=+4}} {{rname=[Dagger](~-MtYfK1jPvKlUf3s4C_M|repeating_attack_-MthePaTUcAJ-DwTZQyc_attack_dmg)}} {{rnamec=[Dagger](~-MtYfK1jPvKlUf3s4C_M|repeating_attack_-MthePaTUcAJ-DwTZQyc_attack_crit)}} {{r1=[[@{TestCharacter|d20}cs>20 + 2[DEX] + 2[PROF]]]}} @{TestCharacter|rtype}cs>20 + 2[DEX] + 2[PROF]]]}} {{range=20/60}} {{desc=}} {{spelllevel=}} {{innate=}} {{globalattack=@{TestCharacter|global_attack_mod}}} ammo= @{TestCharacter|charname_output}
<a href="https://wiki.roll20.net/5e_OGL_Roll_Templates" rel="nofollow">https://wiki.roll20.net/5e_OGL_Roll_Templates</a> There are numerous things in your macro that I always never do when making a token action for my players.&nbsp; First off the Mod is a flat value that will break the second that player characters PB or attack attribute modifier changes, repeating rows always break when the sheet is given to a player because players looooove to move their rows around after I've setup a macro with them.&nbsp; If you ever intend on putting that token action in a query to consolidate their token actions the wtype entry at the beginning and the character output at the end will break the query, so I always omit them and make the macros always roll twice and take the chatoutput entry from the wiki and leave that blank(I hide names in templates anyway).&nbsp;&nbsp; However the reason why your macro is not rolling damage is because you are not rolling a damage template.&nbsp; My guess is you copied a template spat out by a sheet that doesn't "auto roll damage".&nbsp; The template you want is &amp;{template:atkdmg} and you are missing a ton of the required entries for that template to work for it.&nbsp; Check the above url out for the exact syntax.&nbsp;&nbsp;
Thanks for the reply Eddie.&nbsp; I knew I was missing a few things.&nbsp; Good info on the template and thank you for the link.&nbsp;&nbsp; I will read over it and see what I can learn.
Got it.&nbsp; This one is not quite as complicated.&nbsp; You are right about players and access, I had not thought of that.&nbsp; I'll use this code with NPC's,&nbsp; Below is an example of the code.&nbsp; Thank you again for the input.&nbsp; @{Skeleton|wtype}&amp;{template:npcfullatk} {{attack=1}} {{damage=1}} {{dmg1flag=1}}&nbsp; @{Skeleton|npc_name_flag} {{rname=Shortsbow}} {{r1=[[@{Skeleton|d20}+(4+0)]]}} @{Skeleton|rtype}+(4+0)]]}} {{dmg1=[[2d8 + 2 +0]]}} {{dmg1type=piercing}} {{dmg2=[[+0]]}} {{dmg2type=}} {{crit1=[[2d8+0]]}} {{crit2=[[+0]]}} {{description=}} @{Skeleton|charname_output}