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 .
×

Automatically activate Global Attack Modifier at half health

Hi! I've been playing D&D 5e for a while now, and having a lot of fun. We're using the 5th Edition OGL sheets I believe. So as the title says, I'm wondering if there's a way to automatically activate the Global Attack Modifier (Henceforth known as GAM) at half health. My DM has gracefully allowed my Pugilist to use a homebrew feat which basically allows a +2 to hit when at or below half health. Thing is, I kinda keep forgetting about it, so I was hoping that perhaps there was a way to make it happen automatically. Which is how I figured out why there is a thing like the GAM, but there doesn't seem to be an option to let it activate under set conditions by itself. Any help is much appreciated! Also, kinda new to the whole forum thing, so if this is posted wrong, let me know so I can delete it and repost where it belongs.
1526330521

Edited 1526330974
Ziechael
Forum Champion
Sheet Author
API Scripter
As part of your attack calculation you can include: + [[ {1d0+@{selected|hp}}<[[@{selected|hp|max}/2]]*2 ]] That would automatically check your hp against it's half value and give you a +2 if true or a +0 if false. Not a regular 5e OGL user so not 100% how you'd add it into the attack calculation, may need a regular 5e OGL user to stop by and give you that piece of the puzzle...
Thanks Ziechael, that calculates the 0 or 2 for the feat. I don't think I can add that directly to the attack on the sheet, so I'm trying to create a macro for it. I have the below so far, but the macro doesn't run or give an error. [[ (1d20cs>20) + ( ({ 1d0+@{selected|hp }} < [[@{selected|hp|max}/2]]*2 ) + @{selected|strength_mod} + @{selected|pb} ) ]] If I remove the d20 roll part, the remainder calculates the full attack bonus correctly including the strength mod and prof bonus. Has anyone got any ideas what I'm missing? Thanks for the help :D
1526374404
Ziechael
Forum Champion
Sheet Author
API Scripter
If you run a normal attack from your sheet, then click into the chat pane and press the up key you'll get the code for an attack. Insert the code I gave and you'll have a functioning attack :) Normal attack: @{Hoid|wtype}&{template:atk} {{mod=+2}} {{rname=[Longsword](~-L1vaz6HzxKqwBxaCdoP|repeating_attack_-L7UzHXveCnlqbac0iKo_attack_dmg)}} {{rnamec=[Longsword](~-L1vaz6HzxKqwBxaCdoP|repeating_attack_-L7UzHXveCnlqbac0iKo_attack_crit)}} {{r1=[[@{Hoid|d20}cs>20 + 2[PROF]]]}} @{Hoid|rtype}cs>20 + 2[PROF]]]}} {{range=}} {{desc=[Slayer's Prey](~Jerin Lightstep|repeating_attack_-L6skpcdzB-BGjfPJ5kK_attack) [Sneak Attack](~Jerin Lightstep|repeating_attack_-L7UKWTAuLdnanZVq6j9_attack)}} {{spelllevel=}} {{innate=}} @{Hoid|global_attack_mod} ammo= @{Hoid|charname_output} With extra code: @{Hoid|wtype}&{template:atk} {{mod=+2}} {{rname=[Longsword](~-L1vaz6HzxKqwBxaCdoP|repeating_attack_-L7UzHXveCnlqbac0iKo_attack_dmg)}} {{rnamec=[Longsword](~-L1vaz6HzxKqwBxaCdoP|repeating_attack_-L7UzHXveCnlqbac0iKo_attack_crit)}} {{r1=[[@{Hoid|d20}cs>20 + 2[PROF] + [[ {1d0+@{selected|hp}}<[[@{selected|hp|max}/2]]*2 ]] ]]}} @{Hoid|rtype}cs>20 + 2[PROF] + [[ {1d0+@{selected|hp}}<[[@{selected|hp|max}/2]]*2 ]]  ]]}} {{range=}} {{desc=[Slayer's Prey](~Jerin Lightstep|repeating_attack_-L6skpcdzB-BGjfPJ5kK_attack) [Sneak Attack](~Jerin Lightstep|repeating_attack_-L7UKWTAuLdnanZVq6j9_attack)}} {{spelllevel=}} {{innate=}} @{Hoid|global_attack_mod} ammo= @{Hoid|charname_output}
1526385761

Edited 1526385802
That seems promising! I'll have a look later, as I'm a bit busy today. Thank you! Oh, and congrats on the promotion!
1526389640
Ziechael
Forum Champion
Sheet Author
API Scripter
Vallumaen said: Oh, and congrats on the promotion! Thanks... I've been a mod a while, I just take my hat off when I'm not being 'an authority' on something ;) Any problems with it just holler
Thanks Ziechael, it's working that way