PDA

View Full Version : 5E - Theogeek's Natural 20



TheoGeek
September 1st, 2020, 04:13
!!! This has been moved to the forge (https://forge.fantasygrounds.com/shop/items/161/view) !!!

As always, let me know if something's wonky. I try to test most use cases, but invariably miss some.

Current Version: 6.4

-=-=-=-=-=-=-=-
VERSION UPDATE
6.4: Added option to allow Nat20's to ignore crit immunity (per RAW, defaults to "Yes")
6.3.1: Fixed bug in how effects were restored
6.3: Add PFRPG2-Legacy support
6.2: Bugfix for conflict with Clock Adjuster extension.
6.1.6: Fix PFRPG2 output of "[NATURAL 20]"
6.1.5: Cleanup code and fix PF2 bug. It works, but doesn't display [NATURAL 20].
6.1.4: Bugfix to handle ADV/DIS correctly. Thanks for the report MrDDT and nephranka!

-=-=-=-=-=-=-=-
TERMS:

normal critical refers to a critical hit that is not a natural 20.
nat20 refers to a critical hit that is a natural 20.
super critical refers to a critical hit that even affects crit immune targets

-=-=-=-=-=-=-=-
OPTIONS:

Nat20's ignore crit immunity: [Yes* / No]
Shift-click Damage behavior: [Natural 20* / Normal Critical]

-=-=-=-=-=-=-=-

Effects would look like this:


DMG: 4d6 nat20
DMG: 1d8 fire,nat20
DMG: 1d6 normalcrit
DMG: 1d12 supercrit
DMG: 1d12 nat20


etc...

IMPORTANT NOTE: If you are adding these new types as EFFECTS rather than as weapon damage, they can be combined, but take care how you do it. The ruleset effects parser will combine effects based on the first damage type so you may get undesired results. Experiment a bit with how it turns out, but some things aren't possible with this extension - if all of the above effects were added to a character, the last two d12s would be combined as 2d12 supercrit,nat20.

In other words, don't get too fancy with the spices when using effects.


-=-=-=-=-=-=-=-
DETAIL:
I created this extension to give the user the ability to distinguish between a normal critical and a natural 20, mainly to handle the case of weapons that do extra damage when a natural 20 is rolled. Critical hits and natural 20s are like rectangles and squares…all natural 20s are criticals, but not all criticals are natural 20s. So, while a nat20 is a critical hit, it is sometimes handled differently than other critical hits. For example, a sword of sharpness deals extra damage only if a 20 is rolled (14 or 4d6 depending on the rules you are using – I like 4d6.)

Using the standard FantasyGrounds mechanic, you could add an effect like this:

DMG: 4d6 critical

… which would be fine for most cases, except for characters with a wider crit range – some score critical hits on 18, 19, or 20. Swords of sharpness should NOT do extra damage on anything but a natural 20, even though for some characters an 18 or 19 is a critical hit.

This extension adds three damage types, one of which is nat20, such that you can now add this effect:

DMG: 4d6 nat20

… and that damage will only be triggered if the attack roll is a natural 20.

Another type is normalcrit. When the parser encounters this:

DMG: 1d4 normalcrit

… it will apply it on a critical hit that is NOT a natural 20.

The last type is supercrit When the parser encounters this:

DMG: 1d4 supercrit

... it will apply it on any critical hit, even against targets that are crit immune.

These types allow combinations like this to be added (as effects or to weapon damage):

DMG: 2d6 slashing
DMG: 1d4 normalcrit
DMG: 1d8 nat20
DMG: 1d6 supercrit
DMG: 1d10 supercrit,normalcrit
DMG: 1d12 supercrit,nat20

… which would result in the following damage if everything were added at once:
on a non-critical roll: 2d6
on a normal critical roll: 2d6 + 1d4 + 1d6 +1d10 (with the 1d6 damaging even crit immune targets)
on a natural 20: 2d6 + 1d8 + 1d6 + 1d12 (with the 1d6 and 1d12 damaging even crit immune targets)

-=-=-=-=-=-=-=-
USAGE NOTES:
Given the way Fantasy Grounds parses damage clauses, this extension really only works if you DO NOT specify the damage type along with the nat20modifier. FantasyGrounds combines damage of like types and that is not always desired. So, unless you want the nat20 damage to be of a different type than the standard damage of the weapon, do not specify it. For example…

DMG: 4d6 nat20 (this will inherit the weapon damage type)
DMG: 1d8 critical (this will also inherit the weapon damage type)

not

DMG: 4d6 slashing,nat20
DMG: 1d8 slashing,critical

That combination screws up the output because FantasyGrounds combines those damage types and strange things happen in this case. :)

-=-=-=-=-=-=-=-
EXAMPLE:
“Test Dood 1” is a mighty half-orc barbarian with a crit range of 19-20. He is using a longsword (1d8 slashing damage), and has the following effects applied to him because of the sweet demonstration sword he is using:
• Every hit does 1d4 fire damage
• All Critical hits (including natural 20s) do 1d6 lightning damage
• Normal critical hits (not natural 20s) do 1d8 poison damage
• Natural 20’s do 2d12 weapon damage

Here he is (from the combat tracker):

https://www.fantasygrounds.com/forums/attachment.php?attachmentid=38953

On a non-critical hit, the damage is expected to include only the d8 (normal damage from the longsword) and the d4 (fire damage from the effect). The other effects only apply for critical hits or for natural 20s. This is shown here:

https://www.fantasygrounds.com/forums/attachment.php?attachmentid=38954

Next is the normal critical hit. We would expect to see the 2d8 (longsword, one extra critical die), the 2d4 (fire, one extra for the critical), and now the d6 (lightning, no extra because it only rolls on a critical) and the d8 (poison, also no extra for the same reason) applied. This is shown here:

https://www.fantasygrounds.com/forums/attachment.php?attachmentid=38956

And finally, a natural 20. This time, we would expect to see the 2d8 (longsword), the 2d4 (fire), the d6 (lightning), NOT the d8 (poison), and the 2d12 (no extra rolls because they are only rolled on a nat20) damage applied. This is shown here:

https://www.fantasygrounds.com/forums/attachment.php?attachmentid=38955

Some notes.

Don't get too fancy with the spices when creating damages. Some combinations can cause weird behavior.
This extension does not modify any core ruleset code, instead, it hijacks certain functions and modifies the damages before and after the ruleset functions have done their work. This makes it far less likely to break if the ruleset code changes, and would likely only break if the ruleset changed the format of its output.



Enjoy!

TheoGeek
September 2nd, 2020, 04:12
OK, had to release a bug fix already. :) It only affects output, but it would replace [CRITICAL] with [CRITICAL][NAT20] even when the roll was not a nat 20.

EliForge
September 12th, 2020, 21:52
My various groups love this!!!

vaughnlannister
October 23rd, 2020, 09:00
Hi!
Do you think it might be interesting, to apply an effect on a Crit or Natural 20?

For example I have a weapon that at Nat20, asks for a Save for Wisdom DC 14, if failed the target becomes frightened.

I know this would be asking to combine two things a cast + an effect.. but if you could add an effect on a Critical that would be already really cool to have in my opinion :D!!!?

Thanks!

TheoGeek
October 24th, 2020, 20:05
Hi!
Do you think it might be interesting, to apply an effect on a Crit or Natural 20?

For example I have a weapon that at Nat20, asks for a Save for Wisdom DC 14, if failed the target becomes frightened.

I know this would be asking to combine two things a cast + an effect.. but if you could add an effect on a Critical that would be already really cool to have in my opinion :D!!!?

Thanks!

I don't think that would be an easy add. :) I can look into it tho...might be a good exercise.

vaughnlannister
October 24th, 2020, 21:04
Awesome :D !!!!
Would be so cool!!!!

Teraxe
November 2nd, 2020, 05:16
This seems to no longer work when I have the Elven Accuracy Extension installed.

TheoGeek
November 2nd, 2020, 16:11
This seems to no longer work when I have the Elven Accuracy Extension installed.

hmmm..I looked at the code for the Elven Accuracy extension and it does modify onAttack which I use the results of. I'm not familiar with Elven Accuracy, so I don't know of a test case I can set up. What kind of behavior are you seeing in Nat20 with the Elven Accuracy Extension enabled?

Thanks!

Teraxe
November 3rd, 2020, 00:30
hmmm..I looked at the code for the Elven Accuracy extension and it does modify on Attack which I use the results of. I'm not familiar with Elven Accuracy, so I don't know of a test case I can set up. What kind of behavior are you seeing in Nat20 with the Elven Accuracy Extension enabled?

Thanks!

The Elven Accuracy Extension works, it is the Nat20 Extension that doesn't work when the Elven Accuracy is installed.

Elven Accuracy is a Feat that lets you reroll a D20 when you attack with advantage. How the Extension handles it is, if you have Elven Accuracy and roll with advantage it rolls 3d20 and keeps the best the output looks like this

40696

Here is what I see with NAT20 extension enabled with the Elven Accuracy Extension. If I make an attack using these effects.

40697

The output looks like this.

40700

If I turn off the Elven Accuracy extension and use the same effects, it looks like this.

40699

TheoGeek
November 4th, 2020, 02:35
The Elven Accuracy Extension works, it is the Nat20 Extension that doesn't work when the Elven Accuracy is installed.

Elven Accuracy is a Feat that lets you reroll a D20 when you attack with advantage. How the Extension handles it is, if you have Elven Accuracy and roll with advantage it rolls 3d20 and keeps the best the output looks like this

40696

Here is what I see with NAT20 extension enabled with the Elven Accuracy Extension. If I make an attack using these effects.

40697

The output looks like this.

40700

If I turn off the Elven Accuracy extension and use the same effects, it looks like this.

40699

Thanks for the pics!

So, I loaded the Elven Accuracy extension and put a couple effects on my character and it works as I'd expect, but I did not use Elven Accuracy. I did notice that it didn't print "Natural 20" in your Nat 20 hit, that's something I can look into.

TheoGeek
November 4th, 2020, 04:16
Thanks for the pics!

So, I loaded the Elven Accuracy extension and put a couple effects on my character and it works as I'd expect, but I did not use Elven Accuracy. I did notice that it didn't print "Natural 20" in your Nat 20 hit, that's something I can look into.


OK, I just generated a case to test this with...I'll see what I can find out.

TheoGeek
November 4th, 2020, 04:27
Thanks for the pics!

So, I loaded the Elven Accuracy extension and put a couple effects on my character and it works as I'd expect, but I did not use Elven Accuracy. I did notice that it didn't print "Natural 20" in your Nat 20 hit, that's something I can look into.


OK, I just generated a case to test this with...I was able to roll 3 d20s for the attack, and I always ended up with a nat20 in the output and the extra nat20 damage.

Any chance you could PM me your character?

Teraxe
November 4th, 2020, 04:48
OK, I just generated a case to test this with...I was able to roll 3 d20s for the attack, and I always ended up with a nat20 in the output and the extra nat20 damage.

Any chance you could PM me your character?

The character is rather complicated, because it is a level 18 Fighter/Barbarian, but I can easily make a test character if it will help.

Teraxe
November 4th, 2020, 04:51
OK, I just generated a case to test this with...I was able to roll 3 d20s for the attack, and I always ended up with a nat20 in the output and the extra nat20 damage.

Any chance you could PM me your character?

It is actually 2 different characters in the same game, A fighter/rogue that has elven accuracy, and a barbarian/fighter that has a weapon that does bonus damage on a nat 20.

TheoGeek
November 4th, 2020, 23:40
No matter what combination of attacks (ranged, melee, dex bonus for elven accuracy, normal attacks that wouldn't benefit from elven accuracy, advantaged, etc.), I can't get this to fail in the way you are seeing it fail.

This is all with both extensions loaded.

TheoGeek
November 5th, 2020, 03:34
I think I figured it out. Apparently, the reason I couldn't get it to fail is because I always ran it in my environment which includes a TON of other extensions. Something about how all of those extensions interact causes Elven Accuracy and Nat20 to play nicely together.

But when they are the only extensions on the playground, they don't get along.

It looks like a fairly simple update to Elven Accuracy, I'll ping the author to let him know.

Thanks for the feedback!

Teraxe
November 5th, 2020, 06:23
I think I figured it out. Apparently, the reason I couldn't get it to fail is because I always ran it in my environment which includes a TON of other extensions. Something about how all of those extensions interact causes Elven Accuracy and Nat20 to play nicely together.

But when they are the only extensions on the playground, they don't get along.

It looks like a fairly simple update to Elven Accuracy, I'll ping the author to let him know.

Thanks for the feedback!

Thanks for looking into it I was about to post my screenshot. I just created a test campaign where the only thing in it was Elven Accuracy, and NAT20 with the 5E SRD, a level 1 Human Fighter with a greatsword that does an extra 1d8 on a nat 20, and I was gonna give you a screenshot of it not working.

Glad you figured it out. It is interesting that you had at least 1 extension in your environment that caused them to work together. I have about 8 extensions I am using, and suddenly within the last week the NAT20 stopped working, I went through 1 by one to figure out which one was breaking it. I would have never discovered it if I had another extension that let them play nice together.

TheoGeek
November 6th, 2020, 03:58
Thanks for looking into it I was about to post my screenshot. I just created a test campaign where the only thing in it was Elven Accuracy, and NAT20 with the 5E SRD, a level 1 Human Fighter with a greatsword that does an extra 1d8 on a nat 20, and I was gonna give you a screenshot of it not working.

Glad you figured it out. It is interesting that you had at least 1 extension in your environment that caused them to work together. I have about 8 extensions I am using, and suddenly within the last week the NAT20 stopped working, I went through 1 by one to figure out which one was breaking it. I would have never discovered it if I had another extension that let them play nice together.

Thanks for reporting it!

Karnas
January 14th, 2021, 07:31
Hi, I'm getting this sort of error, when rolling damage from the Player side of the app:

42841
42842
That's what the coding on an effect for Mace of Smiting was. And when I initially did this on DM side, it worked just fine. It works on Player end exactly until it actually crits.

Now, I've been trying to use plenty of extensions, and with some trial and error it seems that it has something to do with Advanced Effects extension, when I tried to make some things like automated Mace of Smiting that would automatically put an effect on character that would detect type of target and roll higher critical damage on natural 20.
Since when I turn it off and paste the effect formula as normal effect without Advanced effects, it seems to be working normally.
Other than Nat20, I'm using DruidWildshape, 5e Enhancer, and Constitutional Amendments.

TheoGeek
January 14th, 2021, 14:23
Thanks for the report! I'll look into it as soon as I can. I've been using it without issue for a while, but I don't frequently test it from the player side. I'll do some debugging there and see what I can find.

TheoGeek
January 18th, 2021, 06:26
Hi, I'm getting this sort of error, when rolling damage from the Player side of the app:

42841
42842
That's what the coding on an effect for Mace of Smiting was. And when I initially did this on DM side, it worked just fine. It works on Player end exactly until it actually crits.

Now, I've been trying to use plenty of extensions, and with some trial and error it seems that it has something to do with Advanced Effects extension, when I tried to make some things like automated Mace of Smiting that would automatically put an effect on character that would detect type of target and roll higher critical damage on natural 20.
Since when I turn it off and paste the effect formula as normal effect without Advanced effects, it seems to be working normally.
Other than Nat20, I'm using DruidWildshape, 5e Enhancer, and Constitutional Amendments.

OK, so I found out where the issue of the client not being able to access the database was, and I put in a fix that works, both for me as a GM and for me as a connected client.

New version in the original post.

Let me know if you find any other issues, or if this fails again for you. There are a few things to try if it doesn't.

Karnas
January 19th, 2021, 04:01
OK, so I found out where the issue of the client not being able to access the database was, and I put in a fix that works, both for me as a GM and for me as a connected client.

New version in the original post.

Let me know if you find any other issues, or if this fails again for you. There are a few things to try if it doesn't.

Thanks, I'll check it out soon.

EDIT: I've checked it, it seems to work well with all other extensions. Thank you again. Now I'll go bother Aura Effects thread for basically same reason =)

TheoGeek
January 19th, 2021, 16:01
Great! It made me want to revisit my extensions. I do need to be careful though because we have a saying at our house - "if it ain't broke, it hasn't been fixed enough yet." :)

TheoGeek
January 31st, 2021, 04:50
...and I revisited it. :) Posted a new version in the OP.

In a nutshell:

1) Totally refactored (enables adding these damage types as weapon damage as well as effects)
2) Added new menu options
3) Added "supercrit" that damages even crit immune targets.

Lemme know how it works!

TheoGeek
February 1st, 2021, 18:22
Sorry for all the drama around this update...ugh...when I get it all working properly, I'll post the update. I removed 2.x and uploaded 1.2 again because that at least worked reliably.

TheoGeek
February 6th, 2021, 23:53
Updated to version 3.0!

EliForge
February 18th, 2021, 01:30
Hi! I'm getting an error with v3.0 when I drag damage to a character in the CT. With all extension disabled, works fine.

With Nat20 (v3.0) enabled, when I drag damage to a character, I get this error:

[ERROR] Script execution error: [string "scripts/5E-Theogeek-Nat20.lua"]:110:bad argument #1 to 'ipairs' (table expected, got string)

EDIT: When I target the character first, then double-click my damage die, works fine. Error only seems to happen when I drag the damage die to the target in the CT...

EliForge
February 18th, 2021, 01:49
Thanks TheoGeek! For what it's worth, I was receiving the error DM-side.

TheoGeek
February 18th, 2021, 03:46
Thanks! I heard about this one and am working on a fix...I never drag-n-drop damage so I never saw it. I guess I'll start testing that way too. :)

TheoGeek
February 18th, 2021, 05:45
Hi! I'm getting an error with v3.0 when I drag damage to a character in the CT. With all extension disabled, works fine.

With Nat20 (v3.0) enabled, when I drag damage to a character, I get this error:

[ERROR] Script execution error: [string "scripts/5E-Theogeek-Nat20.lua"]:110:bad argument #1 to 'ipairs' (table expected, got string)

EDIT: When I target the character first, then double-click my damage die, works fine. Error only seems to happen when I drag the damage die to the target in the CT...

I *think* I fixed it...wanna give it a try (download link in first post).

Thanks!

EliForge
February 18th, 2021, 07:11
Hey TheoGeek, new error... 118 vs. 110

[ERROR] Script execution error: [string "scripts/5E-Theogeek-Nat20.lua"]:118:bad argument #1 to 'ipairs' (table expected, got string)

TheoGeek
February 18th, 2021, 14:48
Hey TheoGeek, new error... 118 vs. 110

[ERROR] Script execution error: [string "scripts/5E-Theogeek-Nat20.lua"]:118:bad argument #1 to 'ipairs' (table expected, got string)

OK...I can only reproduce this by dragging damage from a damage clause on a character sheet or the combat tracker without rolling... is that what you are doing? I've never considered that as a way to roll damage. :)

If that's a common use, I'll need to rework the extension to handle that scenario.

For now though, if you roll the dice instead of drag them, it should work.

Thanks!

EliForge
February 19th, 2021, 22:48
Edited to rework this post, as my first attempt was confusing...

I believe my use-case is common, but would love to know if I am the aberration.

As I understand it, there are two ways of rolling TO HIT/DAMAGE:
* Drag/drop onto your target
* Select your target, then double-click the TO-HIT/DAMAGE section

My players and I have always defaulted to the first option.

TheoGeek
February 20th, 2021, 00:32
Edited to rework this post, as my first attempt was confusing...

I believe my use-case is common, but would love to know if I am the aberration.

As I understand it, there are two ways of rolling TO HIT/DAMAGE:
* Drag/drop onto your target
* Select your target, then double-click the TO-HIT/DAMAGE section

My players and I have always defaulted to the first option.

MAN! How sad is it that I've been using FantasyGrounds for YEARS and never knew that was a thing. :) I'll add this to my testing from now on! :)

TheoGeek
February 20th, 2021, 03:04
Making progress towards working for both drag-and-drop damage AND rolling damage...hopefully tonight or tomorrow! I'll test with Advanced Weapon Damage after I've got it working "normally".

TheoGeek
February 20th, 2021, 17:54
Figures! Now I have it working with BOTH drag and drop and rolls. YAY! But when I am using Advanced Weapon Damage, it only works with drag and drop! BOO! Progress I guess...

nephranka
February 22nd, 2021, 18:35
So, I noticed this error: [ERROR] Script execution error: [string "scripts/5E-Theogeek-Nat20.lua"]:332: attempt to index field '?' (a nil value)

Any thoughts? This is a clean 5e build with only a font ext installed. Also, it only happens when I use a number like DMG:1 and not when I use something like DMG:1d4. Thanks!

TheoGeek
February 22nd, 2021, 20:58
Yeah, I didn't code it to handle things I didn't do. :)

Seriously though, I'm working on an update that should fix stuff like that (*hopefully*), but I'm not sure when it'll be ready. *Hopefully* "soon"!

TheoGeek
February 22nd, 2021, 21:00
And bratch9 is being super helpful - and will likely be the reason this ends up working.

nephranka
February 22nd, 2021, 21:16
Thank you both for all the hard work!

Jiminimonka
February 22nd, 2021, 22:10
Here is an error log Theo - had to disable both your extension or the game was unplayable.

44154

TheoGeek
February 22nd, 2021, 22:19
I'll take a look, but version 3.1 (which is the latest on the original post) - line 110 is a comment. Also, what triggered this error?

I'm currently in the process of updating this extension so unless you are doing benign things (like rolling for damage), you might be better off not using the Nat20 extension for now.

Thanks!

SirMotte
February 26th, 2021, 23:03
Can't wait for this to be up to snuff. All my players drag and drop, so this extension can't be used right now ;).

TheoGeek
February 27th, 2021, 00:04
I'll have time this weekend to work on this and hopefully can get something thrown together that will work.

Thanks for the patience!

TheoGeek
February 27th, 2021, 08:31
OK! I think I have something! I've run it through some paces with various damage types, using (and not using) Advanced Weapon Damage (AWD), Improved Critical (IC), various targets (some crit immune), and dragging and dropping attack and damage rolls.

It looked to me like everything was working. I even manually computed the damage that should have been applied and it matched.

That said, I didn't get super fancy with the damages, but I did have weapons with a mix of effect and weapon damage mixing the special damage types from AWD and Nat20, and used different options from IC, so I *think* I got a good sampling. :)

Anyway, bang on this (link in original post) and see what happens.

Thanks again for the patience!

SirMotte
February 27th, 2021, 11:00
Awesome, testing this evening!

TheoGeek
February 27th, 2021, 17:06
So, found a stupid error causing bug (it caused an error in Advanced Weapon Damage because a data structure was malformed) if you have the option to recolor the dice set to "No". Uploading 4.0.1 now.

It's fixed in 4.0.1.

I'm outlining a test procedure of sorts to run through before releasing updates...it'll be more formal than what I'm doing now. :)

SirMotte
February 28th, 2021, 00:47
So, found a stupid error causing bug (it caused an error in Advanced Weapon Damage because a data structure was malformed) if you have the option to recolor the dice set to "No". Uploading 4.0.1 now.

It's fixed in 4.0.1.

I'm outlining a test procedure of sorts to run through before releasing updates...it'll be more formal than what I'm doing now. :)

Looks like it breaks your improved critical extension though (clean campaign). No crits are rolled when combined with Nat 20 [I'm using the updated improved Critical Version 5.1 (extension.xml says 5.2)]. Testing of the Nat 20 extension is still in progress. I will update my finds tomorrow if any.

TheoGeek
February 28th, 2021, 01:26
Hmmm...it's working for me right now. You don't by chance have the Improved Critical option to ignore or exclude critical dice set up do you?

Here's what I'm testing: Attack roll of 20 for a barbarian with a crit range of 19-20 and an extra crit dice. The greatsword weapon has these properties:

2d6+5 slashing
1d8 nat20
1d4+4 normalcrit

and the barbarian has the following effects applied:

1d6+4 normalcrit
AC: 1

I'd expect the damage to be:

2d6(maxxed) + 1d8 + 3d6 critical + 5

Here's a screenshot of the output:

44356

Maybe there is another extension messing things up?

SirMotte
February 28th, 2021, 02:04
Hmmm...it's working for me right now. You don't by chance have the Improved Critical option to ignore or exclude critical dice set up do you?

Here's what I'm testing: Attack roll of 20 for a barbarian with a crit range of 19-20 and an extra crit dice. The greatsword weapon has these properties:

2d6+5 slashing
1d8 nat20
1d4+4 normalcrit

and the barbarian has the following effects applied:

1d6+4 normalcrit
AC: 1

I'd expect the damage to be:

2d6(maxxed) + 1d8 + 3d6 critical + 5

Here's a screenshot of the output:

44356

Maybe there is another extension messing things up?

Like I said, new campaign, just these two extensions. As far as I can tell they work individually, though I havent tested Nat20 much yet. I will try to get to it tomorrow, too tired now.

TheoGeek
February 28th, 2021, 04:48
Thanks for pointing out the inconsistency with the version number in the original post...got that fixed (the post said 5.1, but download is 5.2) :)

I'm super interested in what you find out...the only way I could reproduce this is by attacking one target (or no target) and dragging damage to a different target. But this behavior is consistent with a brand new campaign with no extensions loaded at all.

Let me know what you find out and if it's not that, I'll certainly get on it ASAP.

Thanks!

TheoGeek
March 6th, 2021, 06:43
Fixed a bug where an effect with constant damage (like "DMG: 2") would cause an error when non-critical damage was dragged to a target.

Version 4.0.2 can be downloaded from the original post.

StarDrifter
March 15th, 2021, 07:06
When using this extension, holding Shift to do autocrit damage doesn't work properly. The normal die is maximised but no extra crit die are added to it.

TheoGeek
March 15th, 2021, 07:11
Are you using it with Improved critical? I ask because Nat20 doesn't maximize damage dice.

I'll take a look for both cases

Thanks!

StarDrifter
March 15th, 2021, 07:16
Oh right, yeah i am. But improved critical by itself works fine with Shift click. Just when i have nat20 active does it bug out.

TheoGeek
March 16th, 2021, 00:42
Oh right, yeah i am. But improved critical by itself works fine with Shift click. Just when i have nat20 active does it bug out.

Uploaded version 4.1 to the first post. Fixed this bug and added a menu option to select the behavior of SHIFT-click or CRIT modified damage to be either "Natural 20" or "Normal Critical". I also commented out a function (for now) that changed the chat window [EFFECTS] output when the Special Critical Damage coloring was set to "Purple" as it didn't create the correct output when used with some other extensions. I'll work on fixing that.

Thanks for the report!

StarDrifter
March 16th, 2021, 00:43
You are super quick. :D thanks for the sweet extensions!

TheoGeek
March 16th, 2021, 00:52
Anytime! Glad you are liking them.

TheoGeek
March 16th, 2021, 02:37
Hate to do this, but found a stupid copy/paste error...uploaded 4.1.1.

TheoGeek
March 16th, 2021, 04:15
OK...trying something interesting here...

I added a Nat20 modifier to the Modifier window and it seems to work OK, but I rarely use those. I'm attaching a "beta" version 4.2a to this reply that:

1) adds a Nat20 modifier to the Modifier window
2) makes the "Nat20" and "Critical" modifiers mutually exclusive prioritizing Nat20 (i.e. if they are both selected, only the Nat20 one takes effect)
3) added code to ensure that the booleans tracking Nat20s and NormalCrits can't be set at the same time

This exercise will help with another extension I'm working on so if anyone wants to play around with it and give some feedback, that'd be great.

Thanks!

zelannii
March 25th, 2021, 15:06
Hi there! Cool extension. It's putting me on a path to solving a problem I want to solve.
What I'm looking for: in 5e, I want to change the default crit (on Nat20 only) to make all damage doubled. Not roll double dice, roll the original dice as if a non-grit, adding all modifiers, and then double that damage. Resistances would apply naturally.
Is this something that could be implemented through this nat20 engine, or your Improved Crit engine?

TheoGeek
March 25th, 2021, 16:48
Hey zelannii!

So, I think the best place to make this change would be in the Improved Critical extension (or a new extension). The purpose of the Nat20 extension is to simply add the capability to define new dmaage types ("nat20", "normalcrit", and "supercrit") and include or exclude damage dice for them depending on the clauses added to the damage types on the PC or NPC sheets. Modifying the damage is handled by the Improved Critical extension.

Adding this to the Improved Critical extension shouldn't be hard...I can take a look and see if you want. This would be similar to how 2e handled critical rolls (depending on how the the wording of the DMG was interpreted), right ? We always doubled damage on a critical hit like you are talking about.

zelannii
March 25th, 2021, 18:04
Hey zelannii!

So, I think the best place to make this change would be in the Improved Critical extension (or a new extension). The purpose of the Nat20 extension is to simply add the capability to define new dmaage types ("nat20", "normalcrit", and "supercrit") and include or exclude damage dice for them depending on the clauses added to the damage types on the PC or NPC sheets. Modifying the damage is handled by the Improved Critical extension.

Adding this to the Improved Critical extension shouldn't be hard...I can take a look and see if you want. This would be similar to how 2e handled critical rolls (depending on how the the wording of the DMG was interpreted), right ? We always doubled damage on a critical hit like you are talking about.

Yes, basically same as DnD 2e without the extra roll to see if a crit was a crit to start with... (2e/3e crit rules were weird)
What I'd really like to actually do is have this not only double crit dmg on a 20, but also double fumble damage on crit 1s for saves. (crit fail a save and have the same effect). and then one more step... have it actually be a Nat21, not Nat20. (a custom 20-sided die option that rolls 1-19,21, no 20 that replaces the default D20). I believe I've already figured out how to change the default D20 to report a 21 when rolling a 20.

This effort is for a crew I'm following and occasionally playing with called Nat21Adventures. They play 5e, but the gimmick is the die goes to 21 (they even made custom D20s) and Nat21 or crit fail is flat double.

I'm pretty good editing code, I just don't know anything about FGU's actual back-end to try to code something like this myself. I've extraced your modules and am trying to piece out how they work. But, it's a work day so I've not exactly gotten very far yet.

TheoGeek
March 26th, 2021, 04:10
My Improved Critical extension does a lot of manipulation of the rRoll record AFTER the core ruleset does its thing which helps to mitigate it breaking when new ruleset updates are released. That would be a good one to look at if you are looking at making your own extension (which I would encourage by the way...it's pretty fun, especially if you like coding!)

If you wanna try that, let me know if you have any questions about how I made that one and why I did what I did. I put a ton of comments in there so I wouldn't get lost if I ever had to make updates... :)

TheoGeek
March 27th, 2021, 05:58
So, I added a "beta" version of ImprovedCritical here: https://www.fantasygrounds.com/forums/showthread.php?61376-5E-Theogeek-s-Improved-Critical&p=590023&viewfull=1#post590023

It adds a menu option to double the total damage.

Check it out if you want. :)

Later!

TheoGeek
July 29th, 2021, 19:09
FYI - moved this forge (https://forge.fantasygrounds.com/shop/items/161/view).

TheoGeek
August 4th, 2021, 18:29
Added version 4.3 to the forge. Updated the version number and removed a leftover Debug statement.

TheoGeek
September 4th, 2021, 04:51
Added version 4.3.1 to the forge...support for bmos' Ammunition Manager.

nephranka
September 4th, 2021, 11:34
Added version 4.3.1 to the forge...support for bmos' Ammunition Manager.

Thanks for this!

TheoGeek
September 18th, 2021, 16:39
Updated version 4.3.3 in the forge (https://forge.fantasygrounds.com/shop/items/161/view)!

Fixed a bug that caused problems when multiple effect clauses were contained in the same effect.

TheoGeek
September 24th, 2021, 05:54
Updated to version 4.4 in the forge (https://forge.fantasygrounds.com/shop/items/161/view)for robustness. Given conversations in another thread about saving and restoring values, I changed this to use ruleset functions to parse effect strings and restore them that way rather than storing off the string and replacing later. There could be valid reasons why an effect would change between the time I stored it and restored it.

Let me know if you have any issues!

toastsniffer187
November 11th, 2021, 05:08
This extension not functional with pf2e? It doesnt show up in the list of selectable extensions.

TheoGeek
November 11th, 2021, 05:10
This extension not functional with pf2e? It doesnt show up in the list of selectable extensions.

Right...Natural 20s don't work the same in PF2 as they do in 5E...Is there a use case for something like this in PF2? I don't know the rules well enough.

toastsniffer187
November 11th, 2021, 05:12
When you make an attack and succeed with a natural 20 (the number on the die is 20), or if the result of your attack exceeds the target's AC by 10, you achieve a critical success (also known as a critical hit).

toastsniffer187
November 11th, 2021, 05:13
thats how crits work in pf2e a 20 is an auto crit if a 20 would hit, so is getting a hit 10+ over ac. But if you coded it to work off of [critical]. The coding you have wont work. If its coded off the number on the die, it will. I was just curious it was supposed to work for pf2e or not. Not that fact that we need or want it.

TheoGeek
November 11th, 2021, 05:17
Ok... So maybe it would work, if you want 20s distinct from other kind of crits. The reason I wrote it was so you could apply damage like the sword of sharpness that does extra damage only on a nat 20, not just a crit.

Is that how you'd use it in PF2?

toastsniffer187
November 11th, 2021, 05:18
yeah on a nat 20. to make a nat 20 special compared to other crits. I was thinking like use improved critical for everything else and on an actual nat 20 add an extra rollable dmg die. or dropping improved crit and going to somthing extra good on a nat 20 crit since its completely customizable. ill let my players vote.

TheoGeek
November 11th, 2021, 05:39
Sounds good... I'll see what I can do... Might not be this weekend as we're hosting a bunch of kids for youth group, but shouldn't be too long.

TheoGeek
November 16th, 2021, 03:34
Added version 5.0 to the forge (https://forge.fantasygrounds.com/shop/items/161/view).

Added PF2 support.

nephranka
November 17th, 2021, 12:17
Have you been in test yet to see how this plays with the up coming changes? Thanks!

TheoGeek
November 17th, 2021, 14:25
Have you been in test yet to see how this plays with the up coming changes? Thanks!

Yeah, just started testing last night. Everything *seems* to be working except for the button I added to the Modifier Window. That whole thing got reworked, so I think the worst case would be that the Modifier Window functionality would be disabled for a time until I figure it out.

nephranka
November 17th, 2021, 15:16
Yeah, just started testing last night. Everything *seems* to be working except for the button I added to the Modifier Window. That whole thing got reworked, so I think the worst case would be that the Modifier Window functionality would be disabled for a time until I figure it out.

Very cool. Thanks for the update. I too saw the window issue. If you need any testing let me know, more than happy to help.

TheoGeek
November 18th, 2021, 04:43
I don't know PF2 well - is a nat20 attack roll always a critical hit? If so, no worries. If not, then the assumptions this extension makes will cause nat20 DMG clauses to not apply. It would need to be rearchitected which will take a bit. :)

TheoGeek
November 18th, 2021, 19:15
Updated a version for the TEST channel to work with the new ruleset...everything *seems* to work but the only difference is cosmetic - when you use the modifier window to force a Nat20 critical, the "Critical" button no longer automatically presses, but it is still treated like a critical though so functionally it behaves the same.

Let me know if you see any strange behavior.

nephranka
November 19th, 2021, 00:59
Updated a version for the TEST channel to work with the new ruleset...everything *seems* to work but the only difference is cosmetic - when you use the modifier window to force a Nat20 critical, the "Critical" button no longer automatically presses, but it is still treated like a critical though so functionally it behaves the same.

Let me know if you see any strange behavior.

Looks better but still broke. I know I have a lot of ext loaded here but these errors seem to belong to nat20?

TheoGeek
November 19th, 2021, 01:03
That looks like you are using the LIVE version. The TEST version doesn't have that code in it anymore.

nephranka
November 19th, 2021, 01:24
That looks like you are using the LIVE version. The TEST version doesn't have that code in it anymore.

Checking now.

Edit: You were correct. After I cleaned it up, all is functioning.

Thanks!

TheoGeek
November 19th, 2021, 03:39
Sweet! Glad it's working!

TheoGeek
December 10th, 2021, 03:38
Added version 6.0 to the forge (https://forge.fantasygrounds.com/shop/items/161/view) TEST channel only. This is a ruleset compatibility update only.

TheoGeek
December 14th, 2021, 04:47
*EDIT* - LIVE channel now has the most recent version.

updated to 6.0.1

SAME bugfix in both - correctly handle critical ongoing damage (DMGO: 1d4 critical), (DMG: 4 critical)

TheoGeek
January 10th, 2022, 21:58
Have any of you PF2 users tried this out with PF2? I don't have it tagged as PF2 in the forge, but the code is in there for PF2 capability. If you'd like to, you can get it on 5E and then run a PF2 campaign and it should show up in the list. Consider it a debug exercise. :)

jaharmi
January 15th, 2022, 21:12
I got the following error in a session last night.



Handler error: [string "scripts/Theogeek-Nat20.lua""]:602: attempt to index field '?' (a nil value)


This was using:



FGU: v4.1.13 ULTIMATE (2022-01-05)
OS: Mac OS X 11.6.2
D&D 5E ruleset
Theogeek's Nat 20 for 5E/PF2 ruleset version 6.0.1.


A monk character was attacking a zombie and did not even roll a critical.

TheoGeek
January 15th, 2022, 22:58
<deleted>

TheoGeek
January 15th, 2022, 23:26
I got the following error in a session last night.

Hmmm... Haven't seen that before, but it's caused by dragging an attack roll from the chat window to a target (is that what you did?) I never do that so I'd never see this. :) Thanks for pointing it out and I'll get it updated pronto!

TheoGeek
January 16th, 2022, 00:48
Updated forge to 6.0.2 to address the bug in dragging an attack roll from the chat window. Thanks jaharmi!

jaharmi
January 16th, 2022, 21:48
No problem, I didn't know if it was a problem with other extensions or not.

metaknight22
April 24th, 2022, 18:12
This module is having difficulty with the new layout of FGU. I'm getting script execution errors when critical hits are made "Script execution error: [string "DMG_CRIT"]:3 attempt to call field 'onValueChanged' (a nil value)". Also I get an error when I open the modifiers window, the Nat20 tab is now floating off the modifier window and another error pops up. It is selectable, and the mod may actually still work, but the constant error messages that pop up are maddening.

TheoGeek
April 24th, 2022, 20:02
This module is having difficulty with the new layout of FGU. I'm getting script execution errors when critical hits are made "Script execution error: [string "DMG_CRIT"]:3 attempt to call field 'onValueChanged' (a nil value)". Also I get an error when I open the modifiers window, the Nat20 tab is now floating off the modifier window and another error pops up. It is selectable, and the mod may actually still work, but the constant error messages that pop up are maddening.

Hmmm...I hate to say this but everything is working fine for me. I updated this a long time ago to handle the new FGU layout (specifically modifiers), and there's not really anything "new" about FGU since then that would cause what you're seeing that I know of. I've tried it with all of the extensions I normally run with and with no other extensions loaded, both for the DM and the player and everything is working fine.

What version is shown in the chat window when the extension loads (the forge version is 6.0.2)?

If that's the version you are using, it may be another extension that is causing weird things. Let me know, and if it's still throwing errors, could you send me your log file or the complete error message with the script that is crashing, the error message you are seeing is referencing code that is not in the Nat20 script so I'm not sure where it is coming from.

Thanks!

TheoGeek
April 29th, 2022, 20:39
Updated to 6.1 (not because of the behavior listed above which I can't reproduce).

Changes:
- remove ability to recolor the special critical dice. This had the potential to cause issues down the line due to code checking the dice color to determine what it is (critical or effect)
- move the [NATURAL 20] indication to the attack line so it now looks like: "Attack [27] -> [at Hobgoblin] [NATURAL 20] [CRITICAL HIT]

nephranka
July 20th, 2022, 01:11
Looks like tonight's update broke this ext. It is throwing an error after the damage roll.

TheoGeek
July 20th, 2022, 01:30
Do you use Better Combat Extensions or Blissful Ignorance? I needed to unload those because my extension doesn't use the applyDamage function that is throwing the error..

I can use both Nat20 and Improved Critical fine without those extensions loaded.

BCE also errors when it's the only extension loaded but I'm not sure what's causing it.

nephranka
July 20th, 2022, 02:03
Do you use Better Combat Extensions or Blissful Ignorance? I needed to unload those because my extension doesn't use the applyDamage function that is throwing the error..

I can use both Nat20 and Improved Critical fine without those extensions loaded.

BCE also errors when it's the only extension loaded but I'm not sure what's causing it.

I do use them...So it is a conflict. Sorry for the false flag.

nephranka
July 20th, 2022, 02:27
I did try this by itself and on a 20 it throws an error?

TheoGeek
July 20th, 2022, 03:20
Thanks for the report! I'll check it out!

TheoGeek
July 20th, 2022, 05:11
Uploaded 6.1.2 to the forge to fix ActionAttack.applyAttack header change that resulted in the above error.

Thanks nephranka!

nephranka
July 20th, 2022, 10:45
No problem! I am glad it was an easy fix.

mattekure
August 20th, 2022, 15:07
Found an error with v6.1.2. 5e campaign, Only this extension loaded for testing.

When applying a negative damage, it is not healing as expected. The default behavior is that when a negative damage is applied, it is turned into a heal. With this extension loaded, applying negative damage is applied just as damage.

This method is very useful to undo accidental damage rolls by players/DMs, so the default behavior is preferred.

steps to recreate
damage creature in CT
In chat, right click the damage amount and select Negate Value, turning it from a positive to a negative.
drag the negative damage from the chat to the CT entry
It should heal for the negative amount, instead it damages.

TheoGeek
August 20th, 2022, 16:11
Found an error with v6.1.2. 5e campaign, Only this extension loaded for testing.

When applying a negative damage, it is not healing as expected. The default behavior is that when a negative damage is applied, it is turned into a heal. With this extension loaded, applying negative damage is applied just as damage.

This method is very useful to undo accidental damage rolls by players/DMs, so the default behavior is preferred.

steps to recreate
damage creature in CT
In chat, right click the damage amount and select Negate Value, turning it from a positive to a negative.
drag the negative damage from the chat to the CT entry
It should heal for the negative amount, instead it damages.

Thanks for the report and the way to recreate it!

Pretty sure I found the bug so I'll be updating the forge soon.

One thing though, I tried this with no extensions loaded in a new campaign and the ruleset as coded does not handle damage resistances or immunities with negative damage well. For example, if a creature with fire immunity takes fire damage from a weapon, that damage is eliminated and proper damage is dealt. But, if I then make that damage negative and drag it to the target, the total damage is negated and the target is healed for even the fire damage.

My extension does not address that, so it will have the same behavior.

Thanks again!

TheoGeek
August 20th, 2022, 16:30
Forge updated to 6.1.3 to handle that bug.

mattekure
August 20th, 2022, 17:06
Forge updated to 6.1.3 to handle that bug.

Awesome, thanks.

MrDDT
January 18th, 2023, 21:05
Having an issue with this reporting as a NAT 20 even though its not using DIS adv on attacks rolls.55874

TheoGeek
January 18th, 2023, 21:22
Having an issue with this reporting as a NAT 20 even though its not using DIS adv on attacks rolls.55874

Hmmm... I can't get this to happen, it drops the d20 and registers a miss.

How is your "nat20" set up on the weapon? How are you attacking?

I've added this effect: "DMG: 1d10 nat20" to a PC and an NPC with only the Nat20 extension loaded and have both rolled attack dice for a target and dragged attack dice onto a target (including a self target), with disadvantage and not, and can't get it to behave how you are seeing.

Any more info would be helpful!

Thanks!

nephranka
January 18th, 2023, 21:52
I have the same issue. Initially I thought it was MrDDT's ext then I thought it was a conflict between yours and his but now I see it is just odd behavior from Nat20.
I don't have anything special set and no other exts. I set DIS and manual rolls so I can enter a 20 and a 2 . It does drop the 20 but lets the [NATURAL 20] come through chat. It does not add dice so this looks like strictly a chat message.

Here is the campaign if that helps.

TheoGeek
January 18th, 2023, 21:59
Sweet... I got it to happen - you're right, it's just a chat window thing if the 20 is the first dice. I'll upload a fix, hopefully today yet.

Thanks guys!

MrDDT
January 18th, 2023, 23:20
Thanks Theo for all your hard work, love this thing.

TheoGeek
January 18th, 2023, 23:25
Thanks!

I got a fix figured out...testing it now. Turns out it can actually affect damage in certain cases - I relied on the attack roll array being sorted by the time it got to my extension, which used to happen, but now apparently doesn't. Anywho, a fix should be up shortly.

MrDDT
January 18th, 2023, 23:47
Heck yeah!

nephranka
January 19th, 2023, 00:53
Cool!

TheoGeek
January 19th, 2023, 04:30
Uploaded 6.1.4! Pretty sure I got all the permutations covered. :)

Let me know if you see any strangeness.

Thanks again!
Jeff.

MrDDT
January 19th, 2023, 04:32
Thanks for the quick update, I will check it out.

nephranka
January 19th, 2023, 11:38
My error seems to be resolved. Thanks!

TheoGeek
January 19th, 2023, 15:54
Awesome! Thanks for the input!

TheoGeek
January 20th, 2023, 02:33
Uploaded version 6.1.5

So, due to neglect and the fact that I never play PF2, the PFRPG2 part of this has been broken for some time. I fixed that (I think). It doesn't display "[NATURAL 20]", but it registers as a nat20 for damage purposes (i.e. if a "nat20" damage type effect exists, it will be included).

TheoGeek
January 20th, 2023, 06:25
Uploaded 6.1.6 to fix the "[NATURAL 20]" not outputting in PFRPG2.

BushViper
February 8th, 2023, 11:57
@TheoGeek

Hey there, love your extensions. I use several. However, yesterday I discovered a conflict between your Nat20 and pr6i6e6st's (Troy Monteith of the Rob2E team) Clock Adjuster extension.

Nat20 prevents the duration field on the Combat Tracker from populating when effects that have durations that use hours (Mage Armor, Death Ward, etc.). When those effects are put into the tracker, the duration of the effect stays at 0.

It took me some time to narrow the conflict down given that the two extensions don't seem (from outward appearances) to have anything to do with each other.

At any rate, I made Troy aware of the conflict but I thought I'd make you aware of it as well.

Thanks a bunch for the work you do.

TheoGeek
February 8th, 2023, 13:49
Thanks for the report! I don't know why that would happen as my extension does nothing with any of that. I don't know how the clock adjuster function works either, but if it modifies effects in the combat tracker, that might be it. Nat20 has to do some search and replace work with effects to make sure the right ones get applied, so maybe these are stepping on each other that way...

TheoGeek
February 11th, 2023, 05:47
Found it...now to fix it! Hopefully it'll be ready tomorrow (Sat, Feb 11). In the meantime, if you want to have a workaround, make sure that the Clock Adjuster extension loads after the Nat20 extension. It's a temporary workaround because I think there is a legit issue with the Nat20 extension where it is not overriding the EffectManager properly and it's causing the Clock Adjuster to not execute a function. Set the loadorder in the Clock Adjuster main XML file to something greater than 51. When I get my Nat20 extension fixed, you won't need that anymore so you can remove it.

TheoGeek
February 11th, 2023, 19:09
Released 6.2 to the forge to fix this conflict! Enjoy.

TheoGeek
November 17th, 2023, 20:18
Released 6.3 to the forge to add PFRPG2-Legacy support.

estrolof
November 21st, 2023, 23:13
Hi TheoGeek,

When using D&D 5E, with the following extensions loaded: ADVANCED EFFECTS (effect on weapon Action); EXPANDED NPC (Action tab to leverage weapon); and NATURAL 20...
Then, repeated with just NATURAL 20 and a stock NPC's item (applying the effect to the NPC instead)...

I'm getting an odd result, maybe you've heard or seen it (and I'm missing a post)?

I've added the following effect to the weapon (Action only): DMG: 1d8 poison, normalcrit; DMG: 2d8 poison, nat20

* When a normal attack hits, the weapon damage is normal (as expected); however, when damage is applied both of the commas are removed. With the comma removed, the poison damage is no longer applied when a crit eventually occurs
* When a critical attack occurs (non-Nat20) the first time, the damage works as expected, adding 1d8 poison to the roll. However, the effect is overwritten in the process: both of the commas are removed. With the comma removed, the poison damage is no longer applied
* When a nat20 is rolled the first time, the damage works as expected, adding 2d8 poison to the roll. However, the effect is overwritten in the process: both of the commas are removed. With the comma removed, the poison damage is no longer applied

Is this a bug in the extension, or am I formatting it incorrectly and it's trying to correct me (causing the effect to fail)?

TheoGeek
November 21st, 2023, 23:25
Hmmm...I haven't seen that before. The NAT20 extension does need to recreate the effects string so maybe there's some interaction between those extensions that wasn't there before. Thanks for the report!

I'll check it out and get back to you!

estrolof
November 21st, 2023, 23:57
Sorry if I was muddied in my explanation; it did it both with those extensions and then again on its own without them.

TheoGeek
November 22nd, 2023, 03:44
Not muddied at all...it was a bug!

Found it and uploaded 6.3.1 to the forge. :)

Thanks for the detailed report!

TheoGeek
December 30th, 2023, 18:52
I noticed something I hadn't noticed before but thought I tested it. :)

RAW would say that damage that triggers on a Natural 20 still affects crit immune targets because it's not the critical part that does the damage, rather, it's the "I rolled a 20" part. So, say a target is crit immune but the character rolls a 20 with a sword of sharpness. The sharpness damage would still be rolled, but the extra critical damage would not be.

Currently, to get that behavior, you need to set the effect to something like "DMG: 1d8 supercrit,nat20". I sort of like this because it allows you more flexibility in those Nat20 types...maybe you don't always want Nat20 effects to be applied on crit immune targets. I can work on an option to treat Nat20s like supercrits so you don't need to add the "supercrit" tag to the damage clause....

What say you?

MrDDT
December 30th, 2023, 19:13
Yes fully agree. Nat20 coding should be included on on items coding that has special features that trigger on a 20. Critical doesn’t even need to be put into the coding unless it has other crit stuff happening.

TheoGeek
December 31st, 2023, 00:10
UPDATE:
Forge updated with version 6.4 to address this. Simply set "Nat20's ignore crit immunity" to "Yes" and use "nat20" instead of "supercrit,nat20" to get the RAW behavior.

--------------

Cool...I've got a version that adds a new menu option for Nat20s ignore critical immunity that defaults to "Yes". In other words, the default behavior will treat "DMG: 1d8 lightning,nat20" as a 1d8 lightning damage effect that only triggers on a Nat 20 and rolls damage regardless of the target's critical immunity...no need for adding the "supercrit" tag.


That way, if you want, you can set it to "no" and specify both "supercrit" and "nat20" to have that same behavior OR just "nat20" so "nat20" effects follow crit immunity rules. I'd probably never use that method, but it would allow for certain customized nat 20 effects that would be bypassed if the target had crit immunity.

I should be uploading it tonight!

MrDDT
December 31st, 2023, 03:43
Awesome, I didn't know it wasn't already this way, but that's likely because crit immune is not very common coupled with someone hitting them with a special feature item.