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

Maybe a stupid question. Macro help!

Is there a way to make a macro that functions similar to how the d&d 5e character sheet attacks work. In that I mean you click the attack, it rolls the attack and in the rolled attack results, if you click on the name of the attack it'll roll damage. Im trying to find a way to make macros work so it won't roll damage unless I find out if I hit. So I don't have to make both attack macros and damage macros. thank you for your time!
1590922311
Oosh
Sheet Author
API Scripter
You sure can, in fact you can steal them right off the sheet. Let's say your character is called Bob. On Bob's character sheet, roll one of the attacks from the Attacks & Spellcasting section (if you don't have one, just drag a weapon in from compendium). Once it has done its attack roll, click in the chat bar to get a cursor and push the up arrow key. It should fill the chat bar with the macro the sheet just pushed into chat. Copy this and paste it into a text editor and modify it to suit your needs.Save it as an Ability macro in your character sheet, saving it as whatever, e.g. Attack01 Back in the Attacks & Spellcasting section, edit the attack you've just pinched. Untick the 'Attack' checkbox and roll the attack again: it should now just output the damage part. Copy this and paste it into a text editor, modify to your liking and save this one as well, again as an Ability macro called Attack01Dmg. The fields that link to the damage rolls are {{rname=}} and {{rnamec=}}, the first for normal damage and the second for crit damage. The ones created by the sheet will have a long id string after the label, for example: {{rname=[Silver Dagger](~-NruGHgPSwql3Zu-Q|repeating_attack_-56gZXUjIVQ2adfRYzDm_attack_dmg)}} Luckily we don't have to use these references. If you go back to your Attack01 macro that does the attack roll, all we need to do is put this as the rname field: {{ rname=[Bob's Attack](~Bob|Attack01Dmg) }} And we now have a link at the bottom of the roll for Attack01 which you (or anyone with permission to Bob's sheet) can click on to roll damage. Now you need to repeat the damage template process again for a macro called Attack01DmgCrit (or whatever) which contains the rolls for crit damage. We then edit the {{rnamec}} field in the attack roll: {{ rnamec=[Bob's Attack](~Bob|Attack01DmgCrit) }} The 5e sheet will output the {{rnamec}} link if the d20 roll is a crit, otherwise it will output the {{rname}} link. This page has a bunch of info on these templates if you'd rather make them from scratch. Have a play around and report back if you need anything explained! Stealing the macros from the sheet and the template page should give you most of the info you need.