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

Attack Macro Help

Hi all I'm very new here. I've been trying to find a good way to do attacks (for both PCs and NPCs) but haven't been able to come up with one that is able to decide whether an attack hits AND calculate damage. Ideally I'd also like it to be weapon neutral (or rather, able to grab weapon stats at the player's discretion) but I'm not sure that's possible. My big question is: is there any way to do flow control (if/else etc) with the macro syntax? Does anyone have other recommendations on how to do attacks? (is it best to just do it all traditional style by remembering pertinent stats?)
1522385522
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The macro references for pulling characteristics will vary by sheet. What works for the Roll20 OGL won't necessarily work for the Shaped Sheet and certainly not for Savage Worlds, for instance. There really isn't any good If/Then structure usable by macros; it would require an API script.
1522385610
vÍnce
Pro
Sheet Author
Macros do not include conditional logic. You can use a queries to allow user input or offer choices. [[ 1d20+?{mod|0} ]] and that combined with some known attribute names may be all you need.  Some sheet's use roll templates to hide/show rolls based on certain criteria ie "crititcal hits".  All that said, many sheet's will handle nearly any roll you want to make directly from the sheet with no need create additional macros... What system/sheet are you using Axel?
Vince said: Macros do not include conditional logic. You can use a queries to allow user input or offer choices. [[ 1d20+?{mod|0} ]] and that combined with some known attribute names may be all you need.  Some sheet's use roll templates to hide/show rolls based on certain criteria ie "crititcal hits".  All that said, many sheet's will handle nearly any roll you want to make directly from the sheet with no need create additional macros... What system/sheet are you using Axel? D&D 5th ed, nothing too complicated. I know you can do skill checks through the sheet, but I haven't tried it with attacks yet. queries sound really useful i'll definitely try those out. thanks for the help!
1522387935

Edited 1522387992
vÍnce
Pro
Sheet Author
In case you didn't know; If you enable the quickbar from your sidebar|collection|"Show macro quick bar?", you can drag/drop any button from the sheet (attacks, skills, saves, etc.) to the quickbar and rename/colorize them as needed. Once you do this, there isn't much of a reason to even open your sheet unless you need to edit something.
Vince said: In case you didn't know; If you enable the quickbar from your sidebar|collection|"Show macro quick bar?", you can drag/drop any button from the sheet (attacks, skills, saves, etc.) to the quickbar and rename/colorize them as needed. Once you do this, there isn't much of a reason to even open your sheet unless you need to edit something. :O (mind blown) oh man that's much easier thank you So much