Extra Calculations & Display Based on Total Spell Level Cast Used in Spells and Global Damage Mods "Non Auto damage Version (Free), Auto damage Version (ChatSetAttr Script needed)" - Template used: D&D 5E by Roll20 - Why? What can you do with it, and why do I post the macros here? I'm playing in a campaign where we have to pay with hp to cast spells, if the "mana stones / foci" are empty or you do not want to use it. This is the reason why you get prompted to choose if a Focus is been used. If "No" then the damage calculation happens (1d6+<spell level>) otherwise the damage gets set to 0, and shows up as such. The next piece of info that gets shown is the Actual level of the spell used + up casting, since this is by default not tracked. The Result looks like this and shows up where you put the macro: (-<dmg> HP, Lvl. <total spell level used>) Since I'm lazy and do not want to look up what I got to roll for damage, and we all forgot to roll for damage for over 1 year of playing the campaign. Repurpose it for your needs and hope it helps someone, the nested queries are a nightmare. Since the sheet and roll templates got updated and behave differently. For example, depending as what the Up cast die is set as (NONE / Valid Die) the calculations of spell levels etc. seem to be different. It took me a long time to find all the weird edge cases, this is why there are multiple macros depending on the settings. The Walls of Text with instructions and Macros KEYWORD INFO: raw = Pure Macro without Auto damage, no Script needed. plug = Version with Auto damage, Script required. This can be used without setting up the custom Abilities. inna = Version I put into the Innate Field of Spells. Remember to Replace the Name in ability calls like this %{Zic Nethercut|p1} with your character name. And make sure you got the custom abilities p1 - p7 set up. IMPORTANT: I USE THE INNATE FIELD AND OVERWRITE THE TEMPLATE OF THIS FIELD. IN THE "plug" & "custom abilities", look for these macro pieces. I break out of the current Template Field at the beginning with }} Then put in the script commands starting with "!" since you can't call them from within a template field without it also showing up. After that I start to overwrite the Field I put the macro in. see the {{innate= piece in the macros. This is where the overwrite happens and ends with }} IMPORTANT: POSTING THE SPELLS DESCRIPTION TRIGGERS THE MACRO TOO IF YOU USE THE INNATE FIELD. I COULD NOT FIGURE OUT HOW TO PREVENT EXECUTION IF ONLY POSTING THE DESCRIPTION. Custom Abilities (OPTIONAL) Used ONLY in "inna" keyword. NOT needed for raw/plug keyword macros. Copy as is, white space at the end are required, those are Macro snippets. Name: p1 }} !modattr --silent --name @{character_name} --HP|{{innate=([[-1*(?{Use Focus?|No, Name: p2 &#124; Level 1&#44; 1&#124;Level 2&#44; 2&#124;Level 3&#44; 3&#124;Level 4&#44; 4&#124;Level 5&#44; 5&#124;Level 6&#44; 6&#124;Level 7&#44; 7&#124;Level 8&#44; 8&#124;Level 9&#44; 9&#125;]]+1d6|Yes, 0})]] HP, Lvl ?{Cast at what level? Name: p3 )}} !!! Name: p4 [[?{Cast at what level? Name: p5 +1d6|Yes, 0})]] HP, Lvl Name: p6 [[{?{Cast at what level?&#124; Level 1&#44; 1&#124;Level 2&#44; 2&#124;Level 3&#44; 3&#124;Level 4&#44; 4&#124;Level 5&#44; 5&#124;Level 6&#44; 6&#124;Level 7&#44; 7&#124;Level 8&#44; 8&#124;Level 9&#44; 9&#125; Name: p7 &#125;k1]]+1d6|Yes, 0})]] HP, Lvl [[?{Cast at what level?} Macros for the Spell page . Put them where you want. I used the Innate Field for it. Used for spells that can be Up cast, got the OUTPUT of "Spellcard" and prompts you with "Cast at what level ? <spell level > " . Since the Sheet update new spells add the level after the question raw: ([[-1*(?{Use Focus?|No, [[?{Cast at what level? @{spelllevel}&#124; Level 1&#44; 1&#124;Level 2&#44; 2&#124;Level 3&#44; 3&#124;Level 4&#44; 4&#124;Level 5&#44; 5&#124;Level 6&#44; 6&#124;Level 7&#44; 7&#124;Level 8&#44; 8&#124;Level 9&#44; 9&#125;]]+1d6|Yes, 0})]] HP, Lvl ?{Cast at what level? @{spelllevel}}) plug: }} !modattr --silent --name @{character_name} --HP|{{innate=([[-1*(?{Use Focus?|No, [[?{Cast at what level? @{spelllevel}&#124; Level 1&#44; 1&#124;Level 2&#44; 2&#124;Level 3&#44; 3&#124;Level 4&#44; 4&#124;Level 5&#44; 5&#124;Level 6&#44; 6&#124;Level 7&#44; 7&#124;Level 8&#44; 8&#124;Level 9&#44; 9&#125;]]+1d6|Yes, 0})]] HP, Lvl ?{Cast at what level? @{spelllevel}})}} !!! inna: %{Zic Nethercut|p1}%{Zic Nethercut|p4} @{spelllevel}%{Zic Nethercut|p2} @{spelllevel}}%{Zic Nethercut|p3} Used for spells that can be Up cast, got the OUTPUT of "Spellcard" and prompts you with "Cast at what level ? " . This is used by Spells that did not get updated by the Sheet yet. You can force an update by just Switching the Output mode to Attack and back. This is here for compatibility reasons. raw: ([[-1*(?{Use Focus?|No, [[?{Cast at what level?&#124; Level 1&#44; 1&#124;Level 2&#44; 2&#124;Level 3&#44; 3&#124;Level 4&#44; 4&#124;Level 5&#44; 5&#124;Level 6&#44; 6&#124;Level 7&#44; 7&#124;Level 8&#44; 8&#124;Level 9&#44; 9&#125;]]+1d6|Yes, 0})]] HP, Lvl ?{Cast at what level?}) plug: plug: }} !modattr --silent --name @{character_name} --HP|{{innate=([[-1*(?{Use Focus?|No, [[?{Cast at what level?&#124; Level 1&#44; 1&#124;Level 2&#44; 2&#124;Level 3&#44; 3&#124;Level 4&#44; 4&#124;Level 5&#44; 5&#124;Level 6&#44; 6&#124;Level 7&#44; 7&#124;Level 8&#44; 8&#124;Level 9&#44; 9&#125;]]+1d6|Yes, 0})]] HP, Lvl ?{Cast at what level?})}} !!! inna: %{Zic Nethercut|p1}%{Zic Nethercut|p4}%{Zic Nethercut|p2}}%{Zic Nethercut|p3} Used for spells that can be Up cast, got the OUTPUT of "Attack" and the "HIGHER LVL CAST DMG" dice is set to a dice. This is where the funny businesses begins with templates changing their behavior and calculations for seemingly no reason. The built in query for up casting spells returns here not the value of the drop down item, but instead a 0 based index based on the first selection possibility. How to get the real spell slot level used: I.e. a level 2 spell will start with the level 2 selection item and value 0, the spell level attribute has value 2 and adding them together. Then we compare the result and spell level, and are keeping the higher number between those two. This results in the correct total spell slot level used, and only needs to be done with certain spell settings like these, the others seem to return the correct Query value. raw: ([[-1*(?{Use Focus?|No, [[{?{Cast at what level?&#124; Level 1&#44; 1&#124;Level 2&#44; 2&#124;Level 3&#44; 3&#124;Level 4&#44; 4&#124;Level 5&#44; 5&#124;Level 6&#44; 6&#124;Level 7&#44; 7&#124;Level 8&#44; 8&#124;Level 9&#44; 9&#125;+@{spelllevel}&#44; @{spelllevel}&#125;k1]]+1d6|Yes, 0})]] HP, Lvl [[?{Cast at what level?}+@{spelllevel}]]) plug: }} !modattr --silent --name @{character_name} --HP|{{innate=([[-1*(?{Use Focus?|No, [[{?{Cast at what level?&#124; Level 1&#44; 1&#124;Level 2&#44; 2&#124;Level 3&#44; 3&#124;Level 4&#44; 4&#124;Level 5&#44; 5&#124;Level 6&#44; 6&#124;Level 7&#44; 7&#124;Level 8&#44; 8&#124;Level 9&#44; 9&#125;+@{spelllevel}&#44; @{spelllevel}&#125;k1]]+1d6|Yes, 0})]] HP, Lvl [[?{Cast at what level?}+@{spelllevel}]])}} !!! inna: %{Zic Nethercut|p1}%{Zic Nethercut|p6}+@{spelllevel}&#44; @{spelllevel}%{Zic Nethercut|p7}+@{spelllevel}]]%{Zic Nethercut|p3} Used for spells that can be Up cast, got the OUTPUT of "Attack" and the "HIGHER LVL CAST DMG" dice is set to NONE. raw: ([[-1*(?{Use Focus?|No, [[{?{Cast at what level?&#124; Level 1&#44; 1&#124;Level 2&#44; 2&#124;Level 3&#44; 3&#124;Level 4&#44; 4&#124;Level 5&#44; 5&#124;Level 6&#44; 6&#124;Level 7&#44; 7&#124;Level 8&#44; 8&#124;Level 9&#44; 9&#125;&#44; @{spelllevel}&#125;k1]]+1d6|Yes, 0})]] HP, Lvl ?{Cast at what level?}) plug: }} !modattr --silent --name @{character_name} --HP|{{innate=([[-1*(?{Use Focus?|No, [[{?{Cast at what level?&#124; Level 1&#44; 1&#124;Level 2&#44; 2&#124;Level 3&#44; 3&#124;Level 4&#44; 4&#124;Level 5&#44; 5&#124;Level 6&#44; 6&#124;Level 7&#44; 7&#124;Level 8&#44; 8&#124;Level 9&#44; 9&#125;&#44; @{spelllevel}&#125;k1]]+1d6|Yes, 0})]] HP, Lvl ?{Cast at what level?})}} !!! inna: %{Zic Nethercut|p1}%{Zic Nethercut|p6}&#44; @{spelllevel}%{Zic Nethercut|p7}]]%{Zic Nethercut|p3} Used for spells that can not be Up cast . raw: ([[-1*(?{Use Focus?|No, @{spelllevel}+1d6|Yes, 0})]] HP, Lvl @{spelllevel}) plug: }} !modattr --silent --name @{character_name} --HP|{{innate=([[-1*(?{Use Focus?|No, @{spelllevel}+1d6|Yes, 0})]] HP, Lvl @{spelllevel})}} !!! inna: %{Zic Nethercut|p1}@{spelllevel}%{Zic Nethercut|p5}@{spelllevel}%{Zic Nethercut|p3} Macros for Global Damage Mod . The shown Macros are used for my Divine Smite. Put this into the Damage and Crit Damage Field. [[1+?{Cast at what level?|Level 1, 1|Level 2, 2|Level 3, 3|Level 4, 4}+?{Undead/fiend target|No, 0|Yes, 1}]]d8 Put this into the Type Field. raw: Radiant (-[[?{Use Focus?|No, [[?{Cast at what level?&#124; Level 1&#44; 1&#124;Level 2&#44; 2&#124;Level 3&#44; 3&#124;Level 4&#44; 4&#125;]]+1d6|Yes, 0}]] HP, Lvl ?{Cast at what level?|Level 1, 1|Level 2, 2|Level 3, 3|Level 4, 4}) plug: }} !modattr --silent --name @{character_name} --HP|{{rname=Radiant ([[-1*(?{Use Focus?|No, [[?{Cast at what level?&#124; Level 1&#44; 1&#124;Level 2&#44; 2&#124;Level 3&#44; 3&#124;Level 4&#44; 4&#125;]]+1d6|Yes, 0})]] HP, Lvl ?{Cast at what level?|Level 1, 1|Level 2, 2|Level 3, 3|Level 4, 4})}} !!!