PDA

View Full Version : Coding a weapon effect triggered by a critical hit



muule
June 15th, 2020, 14:24
Hi,
I am very unfamiliar with coding and have been (unsuccessfully) trying to use the Wiki page to figure out how to code an effect that is caused by a critical hit. Specifically, what I am trying to code is a homebrew magic weapon that has a lightning bolt cast on the target on a critical hit.

damned
June 15th, 2020, 15:18
Just add a second weapon with slightly different name and set the damage up as required. If you score a crit then roll damage from teh second weapon.

Zacchaeus
June 15th, 2020, 17:30
There is no effect which you can produce which will do that automatically. damned's solution is is one method; another would be to create an effect which the user would apply just before rolling damage such as DMG: 1d6, lighting.

Scuba72
June 16th, 2020, 02:10
According to this article on the wiki page 36898
You can use the word critical after a damage effect and it will only happen on a critical.
So, I tried it. It does indeed appear to work.
pic of chat showing the results - 36899
The first damage roll was just drag and drop, the second roll I clicked the critical button in the modifier box then drag and dropped the regular damage which automagically added the second d4 as well as the 2d8 I had specified.

and if I did it correctly I think I created a youtube video with the screen recording that you should be able to watch here.
https://youtu.be/M2z3UmxRZ2Y

Scuba72
June 16th, 2020, 02:42
Disregard this post... I ran a second test that seemed to work but it was only because I had forgotten to remove the effect from the previous test.
So if I understand correctly, you can not create a weapon property that only applies on a critical, but you can create an effect on a character that only applies on a crit. Is that correct?

Zacchaeus
June 16th, 2020, 09:58
Disregard this post... I ran a second test that seemed to work but it was only because I had forgotten to remove the effect from the previous test.
So if I understand correctly, you can not create a weapon property that only applies on a critical, but you can create an effect on a character that only applies on a crit. Is that correct?

Yes. You can apply an effect of DMG: 1d6, lightning, critical. However if you use multiple weapons then this is superfluous since it would still need to be applied just before damage when using the particular weapon.

There is also this extension which you could use to apply the damaging effect only to that weapon. https://www.fantasygrounds.com/forums/showthread.php?40833-5E-Advanced-Effects-(items-npcs-characters)