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

Negative STR modifier is resulting in zero damage

Hello, I'm new to Roll20 and coding in general but I'm trying to wrap my head around it. I have a wizard with the following PowerCard set up. I have a negative Strength modifier so, when I roll a 1 on the damage die it results in a zero total damage. I'm trying to create a way to check that if Damage == 0, then +1 to Damage. However, I'm not having any luck so far and could use some advice. !power {{ --titlefontshadow|none --name|Gerrin's Quarterstaff 2H --leftsub|Melee Attack --rightsub|5 ft Range --Attack:|[[ [$Atk] ?{Attack|Standard,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + [[@{selected|strength_mod}]] [STR] + [[@{selected|pb}]] [PROF]] ]] vs AC @{target|AC} --?? $Atk >= @{target|AC} AND $Atk.base <> 20 ?? Damage Bludgeoning:|[[ [$Dmg] @{selected|strength_mod} [STR] + 1d8 ]] --?? $Atk.base == 20 ?? Critical Hit! Bludgeoning:|[[ [$CritDmg] @{selected|strength_mod} [STR] + 2d8 ]] --soundfx|_audio,play,nomenu|Club --?? $Atk >= @{target|AC} AND $Atk.base <> 20 ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dmg] --?? $Atk >= @{target|AC} AND $Atk.base == 20 ?? alterbar2|_target|@{target|token_id} _bar|1 _amount|-[^CritDmg] _show|all }} Thanks in advance.
1604089439
The Aaron
Roll20 Production Team
API Scripter
I can't speak to the powercard logic, but in an inline roll, you can do this with a dice group like this: [[ {@{selected|strength_mod}+1d8,1d1}kh1 ]] The kh1 tells it to take the higher value of the rolls in the { } group.  Rolls are separated by , in the grouping.  If you have dice in one, then they all have to have dice, hence the 1d1.  This will roll and take the higher result, which will be 1 (from the 1d1) when the strength mod is sufficiently negative to reduce the 1d8 below 1.
1604139275
Oosh
Sheet Author
API Scripter
0 damage is perfectly allowable by RAW, by the way. 5e doesn't have a minimum damage of 1, unless a particular ability specifies it. Not that you have to play by RAW, of course, just thought I'd point it out.
Our recent Trail of Cthulhu game had tons of 0 damage attacks, at first it angered the players, then they started narrating it as exciting, "I shoot his hat off, part his hair, scare him..."
Those are good points. Thank you. I wasn't sure if 5e had a minimum damage result. I guess it makes sense if your character has a negative STR modifier that it would be possible to score a hit that did no damage. Much appreciated.
@The Aaron. Thanks for the code. I'll definitely give that a try. I couldn't come up with a logical way to do it so I appreciate the help.
Not sure of the application of this tbh.  If they have a negative mod and roll a 1 then it should be 0.  The inline Roll posted above will give you what you need tho