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

Adding global_damage_mod to a Macro?

September 26 (4 years ago)

Simply put, attempting to have the Agonizing Blast macro for one of my players use the damages from Global Damage Mods, i.e. if he has flagged Hex or Hexblade's Curse damage in the Global Damage Modifier section of the 5e OGL sheet.  The macro I am working on is:

@{CHARACTER|wtype}&{template:atkdmg} {{mod=+8}} {{rname=Eldritch Blast}} {{r1=[[@{CHARACTER|d20}cs>20 + 5[CHA] + 3[PROF]]]}} @{CHARACTER|rtype}cs>20 + 5[CHA] + 3[PROF]]]}} {{attack=1}} {{range=120 feet}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d10 + 5[CHA]]]}} {{dmg1type=Force}} 0 {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[1d10[CRIT]]]}} {{crit2=[[0[CRIT]]]}} 0 {{desc=}}   {{spelllevel=cantrip}} {{innate=}} {{globalattack=@{CHARACTER|global_attack_mod}}} {{globaldamage=@{CHARACTER|global_damage_mod_roll}}} @{CHARACTER|global_damage_mod_crit} {{globaldamagetype=@{CHARACTER|global_damage_mod_type}}} ammo= @{CHARACTER|charname_output}
Of course, "CHARACTER" is in each instance replaced by the actual character name.  The macro works, in that it does display the spell, roll damage, etc. 

But no matter what the selection in the 5e OGL sheet Global Damage Modifier sections are, it only rolls the base damage of 1d10 force plus the CHA bonus.  No global damages are being rolled or applied.

Am I missing something painfully obvious here?  Of note, I do have the Pro subscription, so can use APIs if there is an easier/only existing way to do this.

September 26 (4 years ago)
Oosh
Sheet Author
API Scripter

It looks like the damage and attack sections should be working, at least. What happens if you call the player's global Attributes in chat, what's the value of them? So just

@{CHARACTER|global_damage_mod_roll}

in the chat bar. Does it look like a calculable value? The global field won't output if it can't calculate something.

September 27 (4 years ago)

Oh yes, the attack roll and damage roll are fine, save for the lack of global damage mods.  Here is the output from the above macro right now:

When I call that global Attribute in chat, the value is "0" when neither of the Global Damage Mods are checked on the character sheet, and "3[Hexblade's Curse]+1d6[Hex]" when they are selected - so it is certainly receiving them, just not outputting them. The output, regardless of global damage mods selected, or not, is the same as above (with different rolls of course).

September 28 (4 years ago)

Edited September 28 (4 years ago)
Oosh
Sheet Author
API Scripter

Ah yep, you're missing [[ ]] roll brackets around the Attribute call. As you can see from the value, the global_mod_roll doesn't include them. So:

{{globaldamage= [[ @{bob|global_damage_mod_roll} ]] }}    <==== you don't need the extra spaces, just there for readability

You're also missing the actual field from around the global crit call - not sure if that is intentional or not, but it won't do anything as it is now. This won't stop a non-crit from rolling properly though.

September 28 (4 years ago)


Bookwyrmm said:

Simply put, attempting to have the Agonizing Blast macro for one of my players use the damages from Global Damage Mods, i.e. if he has flagged Hex or Hexblade's Curse damage in the Global Damage Modifier section of the 5e OGL sheet.

Why do you not use attacks with Hexblade's curse with their own entries? They have a different crit range than normal attacks.

And why do you need to create a custom macro for Agonizing Blast when you can just check the box under Eldritch Blast for adding your ability modifier to the damage?

September 28 (4 years ago)

Edited September 28 (4 years ago)

Oosh said:

Ah yep, you're missing [[ ]] roll brackets around the Attribute call. As you can see from the value, the global_mod_roll doesn't include them. So:

{{globaldamage= [[ @{bob|global_damage_mod_roll} ]] }}    <==== you don't need the extra spaces, just there for readability

You're also missing the actual field from around the global crit call - not sure if that is intentional or not, but it won't do anything as it is now. This won't stop a non-crit from rolling properly though.

That was exactly the problem!  Thank you!  Though, the second part, about the crit... not sure I understand you there. Does that mean that the macro is not pulling the crit information from the OGL sheet automatically?  I am VERY new to all of this. :D  Rolling it on the screen seems to support what you are saying, in that it does not double the roll for the Hexblade's Curse.  What would I change to make that work properly?


Dakota H. said:

Why do you not use attacks with Hexblade's curse with their own entries? They have a different crit range than normal attacks.

And why do you need to create a custom macro for Agonizing Blast when you can just check the box under Eldritch Blast for adding your ability modifier to the damage?

The short answer is that he is firing four off most rounds of combat (he's a maxer, and he's playing a sorlock), and has Elven Accuracy (did I mention the min-maxing? :) ) so he has to choose his roll type on each roll.

I am setting this macro so it runs twice with each click, so he gets both the blasts with one press, and one selection of his roll type (Dis/Elven/Advantage/Standard) to help speed things up.

I had forgotten about the change to his crit range when he uses his Curse... I will have to find another way to help that out as well.  Of course, the Curse effects every attack he makes, not just his blast, so I don't imagine this will be a factor for this macro.  Thanks for the reminder on that!

EDIT:  And just found a way to have it query whether or not he has Curse on the target.  Might have to do it for all his attacks, but that's for another day. Thanks again for pointing that out.  He would have noticed.




September 28 (4 years ago)

Edited September 28 (4 years ago)
Oosh
Sheet Author
API Scripter

Here's one with a few changes:

@{bob|wtype}&{template:atkdmg} {{mod=+[[@{bob|charisma}+@{bob|pb}]]}} {{rname=Eldritch Blast}} {{r1=[[@{bob|d20}cs>?{Target HB Cursed?|No,20|Yes,19} + 5[CHA] + 3[PROF]]]}} @{bob|rtype}cs>?{Target HB Cursed?} + 5[CHA] + 3[PROF]]]}} {{attack=1}} {{range=120 feet}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d10 + @{bob|charisma}[CHA] + [[abs(?{Target HB Cursed?}-20)*@{bob|pb}]][PROF]]]}} {{dmg1type=Force}} 0 {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[1d10[CRIT]]]}} {{crit2=[[0[CRIT]]]}} 0 {{desc=}}   {{spelllevel=cantrip}} {{innate=}} {{globalattack=@{bob|global_attack_mod}}} {{globaldamage=@{bob|global_damage_mod_roll}}} {{globaldamagecrit=[[@{bob|global_damage_mod_crit}]]}} {{globaldamagetype=@{bob|global_damage_mod_type}}} ammo= @{bob|charname_output}

Down the bottom is the global crit Attribute I was talking about - you didn't have it wrapped in the {{globaldamagecrit}} field, so it wasn't doing anything. Nothing outside the template {{fields}} will be visible in chat (thought you can do hidden math there).

The Query for Hexblade's curse is pretty straight-forward (personally I prefer having a separate macro bar button for HB attacks):

[[@{bob|d20}cs>?{Target HB Cursed?|No,20|Yes,19} + 5[CHA] + 3[PROF]]]

That's probably pretty much what you had in mind at the end of your last post. But, you can use the same Query result to apply the damage, so you don't need a second pop-up to add PB:

{{dmg1=[[1d10 + @{bob|charisma}[CHA] + [[abs(?{Target HB Cursed?}-20)*@{bob|pb}]][PROF]]]}}

Note that I've changed the flat numbers to Attribute calls - this means the macro will pull the updated values if the character's ability scores change. I'd recommend going through and changing the rest. You don't want to have to sift through 20 macros and update stat values when the party levels up.


If you change the "Target HB Cursed?" Query label (ok, so I'm not good at names...), you need to change all instances of it so they're exact matches.


Personally, I prefer a separate macro for HB to reduce pop-ups, but it really depends on how many attacks you're likely to be using it with. Generally 1 weapon and 1 cantrip is about it - very few leveled spells have attack rolls, so the increased crit range is wasted. That's all personal preference though!