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

Magic Missile Macro

I am wondering if this works it appears to work but I dont know about the +1 at the end and don't know enough about macros to know how to make it work. I tried putting the + after LevelX,X+1 but that then multiplied with the d4 and I tried to place it directly after d4 but for some reason that didn't work in my mind it should of played out (1*Level,X)(d4+1) when foiled out would work but clearly order of operations are different for macros so I can't tell what to do lol. If anyone could assist me on how to make this work it would be great. @{Aranus|wtype}&{template:dmg} {{rname=Magic Missile}}{{range=120 feet}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[3d4+3+[[[[(1*?{Cast at what level?|Level 1,0|Level 2,1|Level 3,2|Level 4,3|Level 5,4|Level 6,5|Level 7,6|Level 8,7|Level 9,8})d4]]+1]]]]}} {{dmg1type=Fire}} {{spelllevel=1}} {{innate=}} {{globaldamage=[[0]]}} {{globaldamagetype=@{Aranus|global_damage_mod_type}}} ammo= @{Aranus|charname_output}
1537070488
Kraynic
Pro
Sheet Author
The sheet you are using should have a level attribute.  Assuming it has, it looks to me like you could do something like this for the damage section: {{dmg1=[[(@{level}+2)d4+3+1]]}} Since you have 3d4 at the beginning, but your first option for level adds no dice, level +2 should give the same result.  If you can tie it to an attribute on the character sheet, then you won't have to answer any query and it will auto update as you update your sheet. If this isn't tied to a certain character, or you need to be able to select the level for some reason, the @{level} could be switched for a query: {{dmg1=[[(?{Level?|1}+2)d4+3+1]]}} That defaults to 1 so you can just hit enter at level 1, or put in whatever level you are at.
you get to choose the spell slot level that you want to cast it at, not the character level itself
1537079884
GiGs
Pro
Sheet Author
API Scripter
I'm not familiar with DnD Spells. Can you tell me what exactly this macro is doing wrong and what it should be doing? To start though, you can rewrite the dmg1 section: {{dmg1=[[3d4+3+[[[[(1*?{Cast at what level?|Level 1,0|Level 2,1|Level 3,2|Level 4,3|Level 5,4|Level 6,5|Level 7,6|Level 8,7|Level 9,8})d4]]+1]]]]}}  The above section can be written as {{dmg1=[[3d4+3+(?{Cast at what level?|Level 1,0|Level 2,1|Level 3,2|Level 4,3|Level 5,4|Level 6,5|Level 7,6|Level 8,7|Level 9,8})d4 +1]]}} It's a good idea to use as few [[ ]] brackets as necessary, so you can still hover over the roll and see what exactly has been rolled. You can also test this roll using  /roll 3d4+3+(?{Cast at what level?|Level 1,0|Level 2,1|Level 3,2|Level 4,3|Level 5,4|Level 6,5|Level 7,6|Level 8,7|Level 9,8})d4 +1 I'm curious what that +1 at the end is supposed to do, and why you didnt just add it to the earlier +3.
1537080112

Edited 1537080123
GiGs
Pro
Sheet Author
API Scripter
Oh! if each d4 is supposed to be d4+1, this is what you need: /roll 3d4+3+(?{Cast at what level?|Level 1,0|Level 2,1|Level 3,2|Level 4,3|Level 5,4|Level 6,5|Level 7,6|Level 8,7|Level 9,8})d4 +?{Cast at what level?} And in the rolltemplate: {{dmg1=[[3d4+3+(?{Cast at what level?|Level 1,0|Level 2,1|Level 3,2|Level 4,3|Level 5,4|Level 6,5|Level 7,6|Level 8,7|Level 9,8})d4 +?{Cast at what level?}]]}} This works because you can reuse a query in  a macro, but you need to remove all the options in the subsequent uses. It will then use the value selected by the player.
Thank you so much lol I didn't know I could reuse the query
1537081522
GiGs
Pro
Sheet Author
API Scripter
It occurs to me you can simplify that query by replacing ?{Cast at what level?|Level 1,0|Level 2,1|Level 3,2|Level 4,3|Level 5,4|Level 6,5|Level 7,6|Level 8,7|Level 9,8}) with  [[ ?{Cast at what level?|1}-1]] You'd have to trust that people only entered numbers in the boxes. But this accounts for levels above 9 too. The altered macro would be {{dmg1=[[3d4+3+(?{Cast at what level?|1}-1)d4 +[[?{Cast at what level?}-1]] ]]}} I wrapped the last in query in [[ ]] to hide the -1, and just show the result.
1537082122
Gen Kitty
Forum Champion
G G said: I'm not familiar with DnD Spells. Can you tell me what exactly this macro is doing wrong and what it should be doing? I won't speak to the macro, but I'll show you what the spell does in D&D 5e. You create three glowing darts of magical force. Each dart hits a creature of your choice that you can see within range. A dart deals 1d4 + 1 force damage to its target. The darts all strike simultaneously, and you can direct them to hit one creature or several. At Higher Levels. When you cast this spell using a spell slot of 2nd level or higher, the spell creates one more dart for each slot level above 1st.
So, you actually want to be doing multiple 1d4+1 rolls, so you can spread it around if need be.  To do that you might use a query that asks for the slot level, and each possible entry 1, thru 9, has progressively more 1d4+1 rolls.  So the query is like Level 1, [[1d4+1]] [[1d4+1]] [[1d4+1]] | Level 2, [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] | Level 3, [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] | and so on and so on.
1537083492

Edited 1537083544
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If you want to make the macro absolutely canon for 5e, it's 1d4+1, with a notation of how many missiles are produced. It's not 1d4+1 per missile. I.e. you roll 1d4+1 and get a result of 3, for example. You produce x number of missiles that each do 3 points of damage. It's a weird spell, and I normally wouldn't bring up a rules discussion on the board*, but you are trying to make a Roll20 macro that conforms to the rule, so it could be something like: Presto the Wizard produces [[?{Spell level|1}+2]] glowing darts of magical force that each do [[1d4+1]] points of force damage. *If you would like a citation, PM me, I won't link it here. It's only implicit in the rules, and explicit in designer rulings. Further note: Nobody I know actually runs it this way, including me.
with the macro I have made it does 1*X then multiplies that by the d4 removing the for the need for multiple [[1d4]]s you have Aranador and still rolling them. 
@keithcurtis you are absolutely right lol after all this I have gone about this completely wrong lol thank you for the reminder and UGH lol
Arandor I see what you were saying since you would have to split the damage which you would have to be able to actually see what each roll is I really wish I was better with macro building lol
1537084074
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If you do this, you will be the first person I know of who actually runs it the right way. :D
1537085075
GiGs
Pro
Sheet Author
API Scripter
If you want to have separate d4+1 rolls for each level, here's what the dmg1 section should look like {{dmg1=[[1d4+1]] [[1d4+1]] [[1d4+1]] [[?{Cast at what level?|Level 1,[[1d4+1]] [[1d4+1]] [[1d4+1]]|Level 2,[[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]]|Level 3,[[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]]|Level 4,[[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]]|Level 5,[[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]]|Level 6,[[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]]|Level 7,[[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]]|Level 8,[[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]]|Level 9,[[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]]} }} And again, outside of a code block: {{dmg1=[[1d4+1]] [[1d4+1]] [[1d4+1]] [[?{Cast at what level?|Level 1,[[1d4+1]] [[1d4+1]] [[1d4+1]]|Level 2,[[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]]|Level 3,[[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]]|Level 4,[[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]]|Level 5,[[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]]|Level 6,[[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]]|Level 7,[[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]]|Level 8,[[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]]|Level 9,[[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]] [[1d4+1]]} }} If the dmg1 section of the rolltemplate is expecting a single total number though, this might not work very well.
1537085333

Edited 1537085547
so all the formula would be is spell level+2 multiplied by a single 1d4+1 roll
@{Aranus|wtype}&{template:dmg} {{rname=Magic Missile}}{{range=120 feet}} {{damage=1}} {{dmg1flag=1}}{{dmg1=[[?{Spell level|1,3|2,4|3,5|4,6|5,7|6,8|7,9|8,10|9,11}]] darts dealing [[1d4+1]]}} {{dmg1type=Fire}} {{spelllevel=1}} {{innate=}} {{globaldamage=[[0]]}} {{globaldamagetype=@{Aranus|global_damage_mod_type}}} ammo= @{Aranus|charname_output} Ok I think this is it lol 
1537086542
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You can make your spell level part simpler with: [[?{Spell level|1}+2]] 
@{Aranus|wtype}&{template:dmg} {{rname=Magic Missile}}{{range=120 feet}} {{damage=1}} {{dmg1flag=1}}{{dmg1=[[?{Spell level|1|2|3|4|5|6|7|8|9}+2]] darts dealing [[1d4+1]]}} {{dmg1type=Fire}} {{spelllevel=1}} {{innate=}} {{globaldamage=[[0]]}} {{globaldamagetype=@{Aranus|global_damage_mod_type}}} ammo= @{Aranus|charname_output} The super slick final form of Magic Missile Macro lol
1537090753

Edited 1537091552
keithcurtis said: If you do this, you will be the first person I know of who actually runs it the right way. :D To be fair they've said RAI it doesn't matter which way you choose, but yeah unless someone is playing an Evoker where it being one roll changes stuff it's rarely chosen. I'm considering taking it as a Wild Magic Sorcerer, with DM approval I'd like to start out as the more chaotic "each dart does its own thing" way most run it, then after several castings learn to control it more and do "each dart of a casting is uniform" way, but have the version triggered by Surging still doing the chaotic version since that's by definition uncontrolled
1537117390
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
There are some huge implications that spring from the way you run it, but again, this isn't the forum* for rules discussion. PM me if you are interested, but a look-through on the Sage Advice site can turn up interesting rulings and combos. *heh.