So I was in a Discord server last night, when one of the other members was looking at how to do a macro up for the cantrip “Toll the Dead”.  This cantrip is interesting for one reason, it’s modified by the level of the caster, AND modified if the target of the spell is already damaged or not.

A note here, this is for the SRD5 macro format,
and I will be doing this same spell in the
Community character sheet as well.

So on the right, you will see the description for the spell, with a highlight on the level modification. It also shows the modification based on the health of the target.

So what’s the biggest hassle?  Once again, no more IF statements.  Since I make these macros to be able to work with people who use Roll20 for free, and as the API is available if you are subscribed, then this is the cleanest way to achieve the results.

The Code

'Toll the Bell - Roll20 SRD5 Macro code:
A note here, this is for the SRD5 macro format, and I will be doing this same spell in the Community character sheet as well.@{xxx|wtype}&{template:spell} {{level=Necromancy Cantrip}} {{name=Toll the Dead}} {{range=60}} {{target=1 Creature}} {{v=1}} {{s=1}} 0 {{material=}}  {{description=Casting Level ?{CastingLevel1|1st,1|5th,2|11th,3|17th,4} ?{TargetWounded|Yes,5|No,1} @{xxx|character_name} casts Toll the Dead on the target at level ?{CastingLevel1}. The target takes [[?{CastingLevel1}d[[7+?{TargetWounded} ]]]] HP in Necrotic damage.}}

Once you have copied the code, paste it into notepad.  Once there, do a Search & Replace (Ctrl-H) and in the top box enter “xxx” (without the quotes) your character’s name.  Once done, copy that updated code into a new macro macro, call it what you want, and then

How does it work?

This is very much inline with the massive arrow macro I had for a Werewolf Assassin.  See details here.  However this one is FAR simpler to manage.

As always it needs ONE change, that’s the Ctrl-H details above.  After that it should run fine.   To start with:

Spell Information
@{xxx|wtype}&{template:spell} {{level=Necromancy Cantrip}} {{name=Toll the Dead}} {{range=60}} {{target=1 Creature}} {{v=1}} {{s=1}} 0 {{material=}}

This bit sets the top basic information.

Caster Level Determination
{{description=Casting Level ?{CastingLevel1|1st,1|5th,2|11th,3|17th,4}

This bit asks and sets the level of the caster.  Giving a value 1, 2, 3 or 4.

Determing Health of Target
?{TargetWounded|Yes,5|No,1}

This bit asks and sets the level of the caster.  Giving a value of 5 or 1.

Some Math

@{xxx|character_name} casts Toll the Dead on the target at level ?{CastingLevel1}. The target takes [[?{CastingLevel1}d[[7+?{TargetWounded} ]]]] HP in Necrotic damage.}}

This is the calculation that determines the final rolls needed.

The answer from the level gives the multiplier to the dice, and the second one about damage dice rolled.  Casting level is based on the following section: {CastingLevel1|1st,1|5th,2|11th,3|17th,4}  The value before the comma is presented to the caster, the second is the VALUE of the choice, and directly updates the final result like this:

Final inputs done, now for MORE math!
The target takes [[?{CastingLevel1}d[[7+?{TargetWounded} ]]]] HP in Necrotic damage.}}

This Takes the result of the casting level result to determine the number of dice rolled.  Let’s look at it a bit clearer:

  1. The number of dice rolled is either 1, 2, 3 or 4 as determined by Casting Level.
  2. The BASE number of sides is 7, plus the result of if the target is damaged or not.
    1. So if the target IS damaged, 7 (base) + the result of the query (5) generates a roll on a 12 sided die.
    2. If the target is NOT damaged, then the result (1) is added giving 8 sided dice are rolled.

That’s it really, not too hard, but non API friendly.  Feel free to edit this, use it as a starting point, just give me credit for it.  Don’t forget to change the ‘xxx’ to your character’s name.

PS:

While this is written in a style to make it work for everyone with the smallest amount of work on the part of the user, there are some who feel it’s too much to be asked a question, and suggest modifying it when you need to, and adjust the level manually.  The real thing is is that without actual IF statements, we’ll never get to the point a lot of us want to with the macro scripting, but this is another Psuedo IF macro as well.

But feel free to modify it, if you do, post a comment below what you did and the results.  I will also be doing an update later, to make it available for the Community Contributes sheet format as well.

Here is a screenshot of the output: