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

First time macro user question.

Hi there, Many apologies if this has been posted before. I have been happily GMing a D&D 4e game on Roll 20 for a few months now. I am just dipping my toe into the macros waters now. What I would like to do is write a macros for my players that have burst type powers that would require a variable number of attack rolls made, but one damage roll. The text below is what I had cobbeled together for a single attack, but I am unsure how to approach a scienario where many enenimes are targeted. Your help and guidance is appreciated. /em conjures Thunderwave /desc You lash your foes with a wave of thunderous power. Atk: [[1d20+13+?{Additional Attack Modifiers|0}]] vs Fortitude Hit: [[1d6+7+?{Additional Damage Modifiers|0}]] thunder damage, and push the target 3 squares.
In terms of 4e scripts you may be better off looking into API's. Macros, in of themselves, can't iterate through multiple rolls. You just have to do it manually. One method would be to basically create separate Attack macros that you can manually hit several times and a separate Damage macro. Alternatively, you could create an attack macro that ALWAYS targets XX number of creatures, and just ignore the extra rolls when they're not needed. Burst 1 would hit 9 targets, Burst 2 hits 25, etc. (note: This is really only viable up to Burst 2 or so) Example: ( and yes, this looks messy as hell to read, but the output is pretty clean ) /me casts a Burst 2 spell vs. Fortitude [Burst 2] [[1d20+13+?{Additional Attack Modifiers|0}]] | [[1d20+13+?{Additional Attack Modifiers|0}]] | [[1d20+13+?{Additional Attack Modifiers|0}]] | [[1d20+13+?{Additional Attack Modifiers|0}]] | [[1d20+13+?{Additional Attack Modifiers|0}]] [[1d20+13+?{Additional Attack Modifiers|0}]] | [[1d20+13+?{Additional Attack Modifiers|0}]] | [[1d20+13+?{Additional Attack Modifiers|0}]] | [[1d20+13+?{Additional Attack Modifiers|0}]] | [[1d20+13+?{Additional Attack Modifiers|0}]] [[1d20+13+?{Additional Attack Modifiers|0}]] | [[1d20+13+?{Additional Attack Modifiers|0}]] | [[1d20+13+?{Additional Attack Modifiers|0}]] | [[1d20+13+?{Additional Attack Modifiers|0}]] | [[1d20+13+?{Additional Attack Modifiers|0}]] [[1d20+13+?{Additional Attack Modifiers|0}]] | [[1d20+13+?{Additional Attack Modifiers|0}]] | [[1d20+13+?{Additional Attack Modifiers|0}]] | [[1d20+13+?{Additional Attack Modifiers|0}]] | [[1d20+13+?{Additional Attack Modifiers|0}]] [[1d20+13+?{Additional Attack Modifiers|0}]] | [[1d20+13+?{Additional Attack Modifiers|0}]] | [[1d20+13+?{Additional Attack Modifiers|0}]] | [[1d20+13+?{Additional Attack Modifiers|0}]] | [[1d20+13+?{Additional Attack Modifiers|0}]] After prompting the end-user for the Additional Attack Modifier, the output of this mess will look like this: You can then either just take the first rolls for however many you need or use the output like the shape of the spell (the 31 in the middle is the center of the spell, the first 24 would be the top-left corner, etc.) So um, yeah... I suggest looking into API scripts.
Thanks for the idea! I think I may use this array for now. I don't think any of my players have any attack powers larger then a burst 2. API Scripts do sound like a more permanent solution. I just have to work my way up to that.
1406420385

Edited 1406420429
Toki
Plus
Greetings, Game format D&D 3.5e I've been trying to get a handle on these macros for spells. I am currently working on one that incorporates Range for Caster level divided by 2 and to set a maximum +modifier for spells like Cause Fear and Inflict Light Wounds. This is the macro that I am currently working on /em @{selected|token_name} casts Inflict Light Wounds on ?{Recipient's name|the BBEG} Necromancy; Level Clr 1; Components: V, S; Casting Time: 1 Std action; Range: Touch; Target: Creature Touched; Duration= Instantaneous; Saving Throw: Will half; Spell Resistance: Yes; Caster level check = [[1d20+@{casterlevel2}+@{spellpen}]] vs spell resistance. Concentration check = [[{1d20+@{concentration}}>?{DC=15+Spell Level or 10+Damage Received|16}]] success. The Death Priest lays their hands upon the subject, pushing dark energy into their body![[1d8+@{casterlevel}]] The ending line [[1d8+@{casterlevel}]] is where I would like to set a maximum to +5. Any insight on this would be greatly appreciated.
1406421784
Sungrass
Plus
Sheet Author
Something like /roll {?{Number|0}d20+?{Modifier|0}}>?{AC|0} will let you make multiple d20 rolls with the same modifier against a single AC, which ideally your DM will tell you. This does require separate rolls for enemies with different ACs, but it's probably the most elegant way of doing things, code-wise.
1406421827

Edited 1406422122
[[ { @{CasterLevel}, 5 }kl1 ]]
Calle A. said: Something like /roll {?{Number|0}d20+?{Modifier|0}}>?{AC|0} will let you make multiple d20 rolls with the same modifier against a single AC, which ideally your DM will tell you. This does require separate rolls for enemies with different ACs, but it's probably the most elegant way of doing things, code-wise. The problem with that, unfortunately, is three-fold: - When you get a room full of baddies in a burst 2, you're going to complete fill your chat window with up to 25 D20 dice images - You'll get the number of successful hits, but you will still need to look at the die to see which ones they were. - A lot of GM's don't like saying enemy DC's / AC's., letting you work out for yourself just how tough something is.
1406424087
Sungrass
Plus
Sheet Author
(1): Yes, running into 25 enemies that happen to advance in a box formation would be unfortunate, but I've been playing 4e for a good half-decade now and that has yet to happen in any game. (2): Yes, you will need to look at the dice. I don't see that as a problem. (3): Knowing the AC/DC is more for convenience's sake than anything else; sadly, there has to be some number to compare to for this particular arrangement to work. Overall, I would still say that the option I presented is ideal for the majority of situations that players will actually run into.
Mark G. said: [[ { @{CasterLevel}, 5 }kl1 ]] Thank you! You have won my internets for the day!