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

Macro help 'Success' Rolls

Hey, I was wondering if you guys could help me write a macro up. It's to help with an upcoming set of encounters, where the players will be against a large mob of creatures. We play text only, so am looking at a way to speed things up further…. I have a macro which currently works as follows: The xxx attacks x times, with x resulting in successful hits! This macro asks for a few prompts of course. The real text is: /em The ?{Creatures name|enemy} attacks ?{How many attacks} times, with [[?{How many attacks}d20>?{AC}]] resulting in successful hits! This actually works quite well. However, I would like to include a simple modifier to the dice roll. Which I assumed would be result in the code being something more like: /em The ?{Creatures name|enemy} attacks ?{How many attacks} times, with [[?{How many attacks} d20+?{modifier} >?{AC}]] resulting in successful hits! However, the result just seems to go badly, where it's in fact added all the results together and proclaims that out of lets say 6 attacks….. 23 of them hit! Any ideas?
1525350848
The Aaron
Pro
API Scripter
Try: /em The ?{Creatures name|enemy} attacks ?{How many attacks} times, with [[?{How many attacks}d20> [[?{AC}-?{modifier}]] ]] resulting in successful hits!
And if I can get this to work... my next challenge may be to try and include a simple damage result too... even if I myself type in a simple 'Damage per success' value manually... The xxx attacks x times, with x resulting in successful hits! Resulting in a total of x damage  Thanks :)
1525350924

Edited 1525351222
EDIT - Wow, that was a quick response! - I was still writing my follow-up comment when you replied. IT WORKS! - You genius... You reduced the ' Success   requirement' , instead of raising the result of the multiple dice rolls. - Cheers
1525351167
The Aaron
Pro
API Scripter
=D I try. =D
There are two ways you can handle this. The more complicated way involves creating a list of individual results and then adding them together, like this /em The ?{Creatures name|enemy} attacks ?{How many attacks |1, 1 time, with [[1d20+?{Modifier&#125>?{AC}]] |2, 2 times, with [[ [[1d20+?{Modifier&#125>?{AC}]] + [[1d20+?{Modifier&#125>?{AC}]] ]] } resulting in successful hits! You can see this method would quickly become more complex with the more options you add. The simpler approach would be to instead subtract the modifier from the target's AC, like this /em The ?{Creatures name|enemy} attacks ?{How many attacks} times, with [[?{How many attacks}d20>[[?{AC}-?{modifier}]] ]] resulting in successful hits! However this has two flaws, its asks for the modifier after the AC, and when you hover over the result it will show the result of the AC - modifier. If neither of these flaws bother you, great! However the latter flaw is impossible to remove using this simpler method, but you can reorder the queries by putting the queries on the previous line in the macro. A ! at the beginning of the line will mean that the line is not processed by the Chat window. This is a simple way of asking for the queries in a specific order, but then using them in a potentially different order. !?{Creatures name|enemy} ?{How many attacks} ?{modifier} ?{AC} /em The ?{Creatures name|enemy} attacks ?{How many attacks} times, with [[?{How many attacks}d20>[[?{AC}-?{modifier}]] ]] resulting in successful hits!
godthedj said: And if I can get this to work... my next challenge may be to try and include a simple damage result too... even if I myself type in a simple 'Damage per success' value manually... The xxx attacks x times, with x resulting in successful hits! Resulting in a total of x damage  Thanks :) Unfortunately this is not possible without utilizing the API, since you cannot re-use die rolls otherwise. So this will have to be a separate macro.
Hey Kyle - I could utilize the API, since I'm a pro subscriber, but as you can see from my struggle with Macros.... it's not something I can build myself :(