Found some bugs with the Global Damage Modifier section when using Variables and interacting with Critical damage calculations. I managed to figure out some workarounds for in the meantime. (As of v4.21) BUG1: Variables are treated as dice rolls when critting, even if the variable is a number, and is not attached to a d# value. I
found this out while trying to set up Hexblade's curse, and was going
to simply add @{pb} (proficiency bonus) to the last modifier field for
the weapon I'd be using it with (which also handles the increased crit
range) but unless that field has an actual number in it, it gets
ignored. Instead I created a Global Damage modifier and set it
to @{PB} but I found out that when I rolled a crit, the Hexblade bonus
was being added to the crit damage as well, even though it's not a dice
value This does NOT happen if the value in the Global Damage Modifier Field is set to an actual numeric value. BUG2: Variables are stripped of all math when calculating crit damage field. I
found this out while trying to set up Booming Blade, Greenflame Blade,
and Sneak Attack to scale with level, putting them into the Global
Damage Modifier section so that they would be included in the dice crit
calculations Sneak attack should be simple to do; (@{level}/2)d6,
(the ceil() operation will clean it up, but it's not necessary for
function due to rounding) plug it in once and never need to touch it as
you level. The problem is that a level 7 rogue would normally roll 4d6
sneak attack regularly, and an additional 4d6 on a crit for 8d6 total.
Instead, roll20 ignores the math for the crit damage field, and treats
the variable as the only value. As a result a level 7 rogue that does
4d6 normally, will now do 7d6 additional, for a total of 11d6 sneak
attack damage on a crit. TEMPORARY PATCH FOR BUG1: (using Bug2, so please fix Bug1 before fixing Bug2) If
we set up Hexblade's Curse to reference @{pb}, we'll wind up with that
damage also getting doubled, even though it's not a dice value. A workaround for those who want to be able to set a variable as a
non-dice value in the GDM field is to use Bug2 to our advantage; math isn't recognized by crits. With
this in mind, we will set up an equation where the math will prevent
the equation from nullifying itself, so that when the math is removed by
the crit it will nullify itself; @{pb}-floor(@{pb}/1000) regular attack rolls will treat this as @{pb} - 0, which will allow the value to be added to damage properly for regular rolls. crits
will do the same thing for the regular dice calculations, but for the
crit calculations, it will only see @{pb}-@{pb} which will result in 0,
thus preventing it from being added a second time. TEMPORARY PATCH FOR BUG2: Since
Bug2 means that crit damage will only recognize the unmodified variable
value, the bypass for this is pretty straightforward; just create a new
variable that will not need to be modified. I created 2 variables, C_level for cantrips, and SA_level for Sneak attacks C_level = (ceil((@{level}+2)/6)-1) //1-4=0, 5-10=1, 11-16=2, 17-22=3 SA_level = (ceil(@{level}/2) //alternatively use @{base_level} or @{multiclass#_lvl} if you are a multiclass rogue) from there it's just a matter of setting the GDM fields to Sneak Attack = [[@{SA_level}]]d6 Booming Blade/Greenflame Blade = [[@{C_level}]]d8 This way the math is already done before the crit ever checks the GDM for the variable. for the secondary damage for Greenflame Blade, just create another attack that does [[@{C_level}]]d8 + SPELL for
the secondary damage for Booming Blade, just create another attack that
does [[@{C_level}+1}d8 //crit doesn't apply to this damage, so you
don't need to worry about it ignoring the crit calculations.