Hello! I am fairly new to macros. I've been able to cobble this one together from various sources (and cannot thank my fellow roll20 DMs posting here enough!) but was wondering if there was a way to increase the efficiency of this magic missile macro. I've currently got it working so any character can input the spell level and roll individual darts as one token action. Is there a way to have the macro also auto-calculate the total damage and input to a separate line? That way we don't have to add each dart during gameplay for total damage? @{selected|output_option} &{template:5e-shaped} {{character_name=@{selected|token_name}}} {{title=Magic Missile}} {{spell=1}} {{spell_first_line=1}} @{selected|attacher_spell} @{selected|attacher_spell_level_1} {{spell_level=^{1ST_LEVEL}}} {{school=^{EVOCATION}}} {{casting_time=^{1_ACTION}}} {{range=120 feet}} {{components=^{COMPONENTS_V_S}}} {{materials=}} {{duration=^{INSTANTANEOUS}}} @{selected|hide_gm_info} {{@{selected|shaped_d20}=1}} {{content=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.
**}} {{higher_level=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.}} {{attack_type_macro=[Ranged Spell Attack:](~-M3xEYpvVsMC_b40cluI|repeating_spell0_-M7BHN4IiROGImlSVC6y_attack)}} {{attack_damage_type=force}} {{has_attack_damage=1}} {{attack_damage= ?{Spell level?|1, 1st Level:[[1d4+1]]-[[1d4+1]]-[[1d4+1]]
|2, 2nd Level: [[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]
|3, 3rd Level: [[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]
|4, 4th Level: [[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]
|5, 5th Level: [[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]
|6, 6th Level: [[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]
|7, 7th Level: [[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]
|8, 8th Level: [[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]
|9, 9th Level: [[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]-[[1d4+1]]
}}} This is what it currently looks like: I'd like to include a line below the hit area. So in this case it would read "Total Damage: 27". Alternatively, if that doesn't work, would there be a way to have a total damage line that doesn't calculate from the previously rolled darts but does still do damage based on the spell's level query without having to input the level query twice? I tried adding the following to the bottom of the macro but the problem then was that I had to input the spell's level twice and the difference is noticeable. ?{Spell level|1|2|3|4|5|6|7|8|9} {{Force Damage= [[[[2+?{Spell level}]]d4+[[2+?{Spell level}]]]]}} It looked like this: Though the individual dart macro works great, if there's a way to auto-calculate the damage easily, I'd love to include it. Thanks in advance for any help/advice! Edited to add: I am using the 5e Shaped sheet! Sorry, I forgot to include that info the first time!