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

Eldritch Blast Macro (5e)

Hey guys i'm pretty new to r20 and I noticed the "cantrip beam" progression, which i read was basically just for Eldritch Blast, doesn't work. I was wondering if someone had a macro to make it immediately roll each beam by character level, and how to use it! 
write it such that it tries to roll all 4 beams, but multiplies each iterative beam by a mathematical function such as the floor function, that can be tweeked to return 1 if level is equal to or higher than the break point, and 0 if it is lower.  So at low levels you get 1d10 + 0 + 0 + 0 and at three beams you would get your 1d10+1d10+1d10+0 and what ever else you need.
1552064512

Edited 1552065346
Due to the way Eldritch blast works. Each blast has a different attack roll and different damage roll. Since each beam can target a different creature and you can move or re target after each shot. It's best to just roll the macro multiple times. Treating Eldritch blast like a sword( or other physical attack) is the best. Cantrips like Fire Bolt, you can use a single damage calculation like  ((@{level} + 1) / 6 + 0.5)d8.
This is my script solution for Eldritch Blast: ***@{selected|token_name}'s eyes flash with the color of crimson*** *as a spell is cast, using the attack rolls:* ***for the first beam:*** *[[1d20 + @{selected|charisma_mod} [Charisma] + @{selected|PB} [Proficiency] ]] / [[1d20 + @{selected|charisma_mod} [Charisma] + @{selected|PB} [Proficiency] ]]*,  ***for the second beam:*** *[[1d20 + @{selected|charisma_mod} [Charisma] + @{selected|PB} [Proficiency] ]] / [[1d20 + @{selected|charisma_mod} [Charisma] + @{selected|PB} [Proficiency] ]]*,  ***for the third beam:*** *[[1d20 + @{selected|charisma_mod} [Charisma] + @{selected|PB} [Proficiency] ]] / [[1d20 + @{selected|charisma_mod} [Charisma] + @{selected|PB} [Proficiency] ]]*! ***If successful against target's AC, then damage is [[1d10 ]]] / [[1d10 ]] / [[1d10 ]] force damage!*** /fx beam-charm @{target|Caster|token_id} @{target|Foe1|token_id} /fx beam-charm @{target|Caster|token_id} @{target|Foe2|token_id} /fx beam-charm @{target|Caster|token_id} @{target|Foe3|token_id} Cheers, Barry Smith
Thanks a lot!