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

Critical Hit to roll amount of dice equal to custom attribute

I am having trouble trying to get the critical hit to roll the amount of dice desired. I have an npc character sheet using the default D&D 5e sheet. Using third party rules for the npc, one of its actions does 1d10 plus 1d10 per its power level. I made its power level an attribute and it does the right amount of dice except in cases of a crit. ON HIT: 1d10 ON HIT 2:(@{power_level})d10  Description: You lash out at your foe with a whip of smoke and flame. Make a melee power attack against a target you can see up to 5 feet beyond your normal reach (typically 10 feet if you have a 5-foot reach).  On a hit, the target takes 1d10 fire damage plus @{power_level}d10 fire damage.  Also on a hit, the target takes persistent fire damage equal to [[3+@{power_level} ]]. Attributes: Name                    Current                    Max power_level          1                        /|   Is there a way to get the crits to roll right or should players just roll the crit damage when it happens?
1712013912

Edited 1712013922
Gauss
Forum Champion
Hi Doueb,  NPC character sheets are pretty basic and do not include the same fields as the PC sheet, such as the critical hit field.  My usual solution to this is to include a line in the text that says something like:  **On Critical** add [[ (@{power_level})d10]]
1712015417

Edited 1712015819
try it with: ON HIT:  (@{power_level}+1)d10 ON HIT 2: edit: scratch that - just got a critical on my tester with this setup, and critical damage still = [0] "rolling +0 = 0"  apologies. NB According to the wiki,  $0_attack_crit2  is hidden on the NPC sheet, but might be possible to edit with APIs like  ChatSetAttr
1712017661
Gauss
Forum Champion
Good point James, are you the game owner Doueb?
The D&D 5E by Roll20 sheet 'crit' values for NPC attacks must have a dice roll in order to display. I believe it's a bug, but i t's easily verifiable. I have a Giant Rat with it's bite attack set up like this:  Using the crit damage roll command %{selected|repeating_npcaction_$0_npc_crit} this is the output: Changing the 'On Hit 2' to be a '4' or ' @{power_level}d4' results in this: You can also check with this macro: &{template:npcaction} {{rname=@{selected|token_name}}} {{description=Dmg1 = @{selected|repeating_npcaction_$0_attack_damage} Dmg2 = @{selected|repeating_npcaction_$0_attack_damage2} Crit1 = @{selected|repeating_npcaction_$0_attack_crit} Crit2 = @{selected|repeating_npcaction_$0_attack_crit2}}} Getting this output for '1d4' in 'On Hit 2': Getting this output for '4' in 'On Hit 2': The same thing happens to the Crit1 output if you change the 'On Hit' field to be a non-dice roll. You should be able to use a Mod script (such as ChatSetAttr or BrutalBot ) to manually adjust the 'attack_crit2' value. It looks like this hacky workaround does not work to adjust the crit2 field either. It still requires the crit2 field to have a dice roll.
Yes, I am the game owner. Thanks, Jarren and James. I will take a look at ChatSetAttr and see if I can get it to do it there or if not will just do as Gauss suggested and put in in the description. I have not used many API's in the past but will look into those. Thank you again!
It looks like this has also been a longstanding issue:&nbsp; <a href="https://app.roll20.net/forum/post/7082898/dnd-5e-character-sheet-rolling-crits-incorrectly" rel="nofollow">https://app.roll20.net/forum/post/7082898/dnd-5e-character-sheet-rolling-crits-incorrectly</a> <a href="https://app.roll20.net/forum/post/10336599/critical-damage-always-comes-to-zero" rel="nofollow">https://app.roll20.net/forum/post/10336599/critical-damage-always-comes-to-zero</a>