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

Help with adjusting a macro? I nearly got it!

So what I'm trying to do is for this macro to function while adding in a specific characters bonus to hit. I'll be doing the same thing for damage. I'm very new to this so I'm just guessing my way around. Here is what I'm using. /emas @{selected|token_name} attacks @{target|token_name} (AC @{target|ac}) a total of ?{How many attacks} times, with [[?{How many attacks}d20>[[@{target|ac}-?{modifier}]] ]] success. Basically I want to replace the modifier with an ability. So rather than request a modifier it just adds say, +5 to the d20 roll. Now I can get it to add the +5, but it just adds it to the total number of rolls and adds them all up. What I want it to do is roll the dice, add +5 to each and tell me how many succeeded. I assume I can translate this over to damage using this macro... /emas As a result of the successful hits, the enemy takes a total of [[(?{Number of hits}D?{Damage Dice})+([[?{Number of hits}*?{Damage Mod}]])]] HP's of damage! I'm using tokenmod, and though I've looked around this either isn't possible or I'm dumb...im probably dumb.
1587300391
GiGs
Pro
Sheet Author
API Scripter
You need to use what roll20 calls a group roll. This is how you'd rewrite it to use the modifier [[{?{How many attacks}d20+?{modifier}}>@{target|ac} ]] and here with an attribute [[{?{How many attacks}d20+@{selected|attribute}}>@{target|ac} ]] It'll tell you how many attacks succeed, and if you hover over the result, it'll show you the individual rolls which you can confirm its working properly. Your damage macro looks fine.
Doesn't work. Sure it's my fault though. Possible to just paste the whole completed macro?
1587350113

Edited 1587350310
GiGs
Pro
Sheet Author
API Scripter
Those are both complete macros. You should be able to copy them and paste into chat and have them work (once you change @{selected| attribute } to the actual attribute you want to use of course). You can add the same text you have in yours before and after them, but you dont need to do that to confirm they are working, In what way are they not working? Whats happened when you try them?
It looked like it needed to be inserted into my macro as a whole. Again, this is greek to me! I got it working now though. Thank you so much!
1587384829
GiGs
Pro
Sheet Author
API Scripter
Happy to help :)