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

Variable # of Attacks in one macro

1384339014

Edited 1384416418
Hello all! Trying to work on a macro that allows a variable amount of attacks in a DnD 4e. For instance the following wizard would like to emote what he is doing, state a couple mechanics, and then make a burst attack that my target multiple enemies but doing static damage (payers know that the attack order for determining which creature is hit and which is not is counterclockwise starting at 12 o'clock). Line item #4 is my problem. Macro: Cloud of Daggers 1. /me creates a small cloud of whirling daggers of force that relentlessly attack creatures in the area. 2. Area 1 within 10 squares 3. Target: Each creature in square 4. /r {[[?{ndice|1}]]d20+7}s vs Reflex <- (the attack rolls) 5. DMG: [[d6+4]] Force 6. Effect: The power’s area becomes a zone that lasts until the end of your next turn or until you end it as a minor action. Any creature that enters the zone or starts its turn there takes force damage equal to your Wisdom modifier (minimum 1). A creature can take this damage only once per turn. so what i want to happen is once the player hits his macro button, for it to prompt him using the ndice command how may d20's to roll (ie how many creatures are in his burst) + his static attack modifier for EACH individual roll. So, for example, if he attacked three creatures, he would hit the macro, it would prompt him to type in the number (3) and the following rolls would be made d20+7, d20+7, d20+7. Can it be done?
I hope someone will correct me if I'm wrong because I'd love to be able to do something similar, but you cannot execute looping logic in a macro -- which is what you're attempting. You can tell it to roll x number of d20s+7 but it will total them instead of iterating through that number of rolls separately. I imagine that this is possible with the API though.
Thanks Perry! what you say makes sense; unfortunately i am not clever enough with scripting. for now i'll just settle for a 2ndry macro for the additional attacks.
It looks like grouping doesn't work with sorting. Grouping does work with success checks, and with keep and drop functions. For example, the following rolls work: /r {[[?{ndice|1}]]d6+5}>10 /r {[[?{ndice|1}]]d6+5}kh1 But this does not work: /r {[[?{ndice|1}]]d6+5}s Even though this does: /r [[?{ndice|1}]]d6s I would submit this as a bug. "Grouping does not work with sorting in the die roller".
David, cool call on that! will do :-)
1384407975
Lithl
Pro
Sheet Author
API Scripter
Note: Cloud of Daggers in D&D 4e is "Area 1 within 10 squares," not "Burst 1 within 10 squares." Area 1 is a single square; burst 1 is 9 squares (3x3 -- origin square plus radius 1) and blast 1 is 1 square (touching but not containing the origin square). The Cloud of Daggers attack will only hit multiple targets if the targets are occupying the same square (meaning at least one of them would be a Tiny creature). What you are looking for is not possible within the vanilla macro system. It is possible with the API, and in fact I have created a script explicitly for this purpose: Roll Repeater . Note: the creator of the campaign must have a mentor subscription in order to use the API.
1384416551

Edited 1384416693
Brian, good catch! you're right. Either way there is definitely multiple powers that require separate attack rolls. I prob would upgrade my membership as there are some pretty awesome scripts out there but not savvy enough to even know how to insert them. Your script looks to be exactly what i was looking for. You wouldn't happen to know if there is a roll20 scripting for dummies out there? not so much as to make them, just how to insert them.
1384476394
Lithl
Pro
Sheet Author
API Scripter
If you're not a programmer and you just want to install a script someone else has written, simply copy and paste the script's code into the Script Editor .
There it is! exactly what i needed! Thanks!