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 .
×
May your rolls be chill this holiday season!
Create a free account

D&D 5e OGL character sheet Weapon Attack Magic Bonus macro help

Hello! I'm trying to find a way to modify a character's weapon roll to get a level-dependent bonus. It's supposed to add a +1 Magic Bonus, but I'd like it to automatically update when he gets to level 10 to become a +2 bonus. The trouble is, the macro seems to be ignoring any sort of roll or equation I put in. So far I have this: [[{1+round((@{base_level}-10)/10+0.5),2}kl1]] Unfortunately nothing registers for the Magic Bonus on an attack/damage roll. It only seems to like when you put an integer in; even putting in a simple [[1d4]] causes the attack macro to ignore the entry.  I've played around with it a bit, but I can't seem to figure out why it's not showing up. I know I could easily find other ways to slap the +1/+2 bonus on the attack, but I'm specifically curious if there is a syntax for the Magic Bonus slot for the weapon rolls that I could learn. Any help would be greatly appreciated!
1673424022
Gauss
Forum Champion
You cannot put a calculation in the magic bonus field. Many fields on the 5e by Roll20 sheet cannot take calculations. 
1673434361
Ziechael
Forum Champion
Sheet Author
API Scripter
What you can  do is utilise the field override trick in the description to use your calculation, put the following into the weapon description field: }} {{r1=[[@{d20}cs>20 + @{dexterity_mod}[DEX] + @{pb}[PROF] + [[{1+round((@{base_level}-10)/10+0.5),2}kl1]][MAGIC]]]}} @{rtype}cs>20 + @{dexterity_mod}[DEX] + @{pb}[PROF] + [[{1 + round((@{base_level} - 10)/10 + 0.5),2}kl1]][MAGIC]]] If you also want to still have a description you can add that to the end: }} {{r1=[[@{d20}cs>20 + @{dexterity_mod}[DEX] + @{pb}[PROF] + [[{1+round((@{base_level}-10)/10+0.5),2}kl1]][MAGIC]]]}} @{rtype}cs>20 + @{dexterity_mod}[DEX] + @{pb}[PROF] + [[{1 + round((@{base_level} - 10)/10 + 0.5),2}kl1]][MAGIC]]]}} {{desc= <insert your description text here> Ofcourse you'd need to update the DEX mod bit with STR mod if that is applicable to your weapon... you could probably tap into the sheets 'which attribute' setting for the weapon but I can't remember how to do that ¯\_(ツ)_/¯  All of this said, it might just be easier to change the magic bonus from a 1 to a 2 when they reach level 10 since it is a one-off update and wouldn't need to be changed again lol
Thank you both for your responses. Good to know, and good suggestions. Appreciate y'all!