PDA

View Full Version : 5E - Theogeek's Improved Critical



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

See https://www.fantasygrounds.com/forums/showthread.php?34431-New-Extension-TheoGeek-s-Improved-Critical for history.

8.6 - Moved the "Max first die only" option to both PC and NPC sections to make them distinct and renamed it to "Modify first die only"

Current Version: 8.6

I am releasing this here because I significantly changed the internal workings to make it compatible with my just released Nat 20 (https://www.fantasygrounds.com/forums/showthread.php?61375-5E-Theogeek-s-Natural-20) extension (if you use that extension, you must use this version of Improved Critical). I renamed it as well to make it more standard, and am only developing in Unity (though testing has been done with FGC as well) so I thought I'd keep them separate just in case. In any case, this version *should* be functionally equivalent to version 3.x and more compatible with other extensions.

I did remove the "fix damage calculation" option because it seems to be fixed (at least in FGU). If you encounter any issues with this, let me know and I'll add it back.

====

DESCRIPTION
Have you ever scored a critical hit only to roll 2 damage? Me too. So I made this extension because I have been disappointed as a player and have had players disappointed in critical hits that do less damage than a standard hit. This extension allows the DM to change the way critical damage is computed. More detail is found in the description of the options below, but quickly, suppose you had a half-orc with 18 strength (and no other bonuses) wielding a greatsword.

If he scores a critical hit, he would do 2d6 + 3d6 + 5 damage.

This would normally be pretty sweet, but with some crappy rolls, it could end up with this lameness: you rolling 5 1's and doing 10 damage and your measly human buddy, with no strength bonus, who barely hit, rolling 2 6s for 12 total damage. Lame, right?

This extension allows you to configure critical hits so that they are actually critical....well...mostly anyway. You can modify the calculation such that, when computing critical damage:


applied or not to crit immune targets
weapon damage dice are maximized or set to a minimum or maximum of 1/2 the number of die sides
critical damage dice are maximized or set to a minimum or maximum of 1/2 the number of die sides or set to a scaled range (soft, med, hard)
effect damage dice are maximized or set to a minimum or maximum of 1/2 the number of die sides
special criticals (from the NAt20 extension) are maximized or set to a minimum or maximum of 1/2 the number of die sides
Apply to only the first damage dice overall or the first damage dice of each group of damage dice rolled
total damage is doubled
any combination of the above

Note the output:

"IMPROVED CRITICAL MAXXED" means that the option was chosen to MAX certain dice
"IMPROVED CRITICAL RAISED" means that the floor of the damage was raised to 1/2 the number of sides of the die rolled
"IMPROVED CRITICAL LOWERED" means that the ceiling of the damage was lowered to 1/2 the number of sides of the die rolled
"IMPROVED CRITICAL SOFTCRIT" means that the option to use soft criticals was in effect
"IMPROVED CRITICAL MEDCRIT" means that the option to use medium criticals was in effect
"IMPROVED CRITICAL HARDCRIT" means that the option to use hard criticals was in effect
"IMPROVED CRITICAL DOUBLED" means that the option was chosen to DOUBLE damage dice
"IMPROVED CRITICAL CRITZEROED" means that the option was chosen to set all extra critical dice to 0
"IMPROVED CRITICAL CRITREMOVED" means that the option was chosen to REMOVE all extra critical dice

Note that no matter what option you choose for effect or critical damage dice, they will always be purple or green respectively.

I am messing with the output to see what makes the most sense from a readability perspective and to save the information I need to properly compute untargeted damage rolls that are dragged to crit immune targets. In the description in the chat window, you'll see something like this this (currently) if modifications are made to the roll by the Improved Critical settings.

For a critical hit with a dagger that does 1d4 piercing and 1d6 fire, you might see this in the chat window:

"[DAMAGE (M)] Dagger [EFFECTS 1d6] [CRITICAL] [IMPROVED CRITICAL MAXXED] [IC1: D1=4(2),M=5(5),T=9(7)] [IC2: D2=6(2),T=6(2)] [TYPE: piercing (1d4+5=9)] [TYPE: fire (1d6=6)] [TYPE: piercing,critical (2d4=5)] [TYPE: fire,critical (1d6=2)]"

The improved Critical extension inserted the following into the description:

"[IMPROVED CRITICAL MAXXED] [IC1: D1=4(2),M=5(5),T=9(7)] [IC2: D2=6(2),T=6(2)]"

The "IMPROVED CRITICAL MAXXED" tag indicates that this extension modified the damage by maxxing dice. The next entries tell how.

The "[IC1: D1=4(2),M=5(5),T=9(7)]" tag is parsed as follows:

"ICx" - indicates that the first damage clause in the description, the "[TYPE: piercing (1d4+5=9)]" was modified
"D1=4(2)" - indicates that the first dice in the roll graphic was part of this clause and it was changed from an original roll of 2 to a 4
"M=5(5)" - indicates that the modifier was not changed and remained a 5 (if the Double damage option is selected, this would have looked like M=10(5) for example)
"T=9(7)" - indicates that the total damage for that clause was increased from an original value of 7 to a new value of 9 because of the max damage option.

The second modified clause, "[IC2]", is similar but applies to the second damage clause ([TYPE: fire (1d6=6)]).

Since there is no IC3 or IC4, it means that the third and fourth damage clauses, "[TYPE: piercing,critical (2d4=5)]" and "[TYPE: fire,critical (1d6=2)]", were unmodified.

More complex damage rolls are handled the same way. Maybe a greatsword with many damage types or damage effects might have an improved critical clause like this: "[IC1: D1=6(2),D2=6(3),D7=6(1),M=5(5),T=23(11)]". Note the jump in the Dice...D1, D2, D7. This means that in the dice that were displayed in the roll, the first, second, and seventh were part of this clause. This might happen, for example, if the greatsword which does 2d6 slashing damage) had a bunch of damage effects, and the one in order that rolled the seventh damage dice was "DMG: 1d6 slashing". FGU combines like damage types into one damage clause so this would produce a damage clause like "[TYPE: slashing 3d6+5]" as the first damage clause, even though that clause was comprised of die 1,2, and 7.

Methods of computing damage ("Damage Range Method"):

Clip: setting min/max values with a method of "Clip" will cause any rolled value below the minimum to be set to the minimum and any damage roll above the maximum to be set to the maximum ("clipped" as iot were). For example, if the percentage range selected for Medium Criticals turned out to result in a damage range of 3-6 for a d8, the possible damage values would be: 3,3,3,4,5,6,6,6 (1's and 2's get "clipped" to 3, 7's and 8's get "clipped" to 6)

Scale: setting min/max values with a method of "Scale" will cause any rolled value to be mapped to an even (well, as even as possible given rounding small values like dice rolls) distribution. If, for example, the percentage range for Medium Criticals turned out to result in a damage range of 3-6 for a d8, the range of possible damage values would be: 3,3,4,4,5,5,6,6 (1's and 2's get "scaled" to 3, 3's and 4's get "scaled" to 4, 5's and 6's get "scaled" to 5, and 7's and 8's get "scaled" to 6).

Extension Options:

Damage modifications behave the same for any damage dice type (critical dice, effect dice, weapon damage dice, and Nat20 special critical dice). The options for modifying the rolled damage for each dice of a given type on a critical hit are:

[Standard] - Roll damage dice per the rules as written
[Maximize] - Maximize the damage dice
[Raise Floor] - use "Damage Range 1 (Floor)" to determine minimum possible damage (clips, doesn't scale)
[Lower Ceiling] - use "Damage Range 2 (Ceiling)" to determine maximum possible damage (clips, doesn't scale)
[Soft Criticals] - use "Damage Range 3 (Soft Critical Max)" and "Damage Range Method" to determine maximum possible damage
[Medium Criticals] - use "Damage Range 4 and 5 (Medium Critical Min/Max)" and "Damage Range Method" to determine minimum and maximum possible damage
[Hard Criticals] - use "Damage Range 6 (Hard Critical Min)" and "Damage Range Method" to determine minimum possible damage

Hopefully the options are self explanatory! If not, I'll update the forge page.

Have fun with it and let me know if you have any additional ideas!

donpaulo
September 3rd, 2020, 07:56
Our campaign loves this extension

LordEntrails
September 3rd, 2020, 17:28
Our campaign loves this extension
My rogue loves it, everyone else hates it when the monsters Crit them (and I cackle in laughter)!

TheoGeek
September 9th, 2020, 06:55
hehe...At one time, I was thinking about adding an option to make it only apply for PCs, but then quickly changed my mind. What's good for the goose and all... :)

arcanjl
September 10th, 2020, 01:54
What am I missing, do I need the original ext on too? I am using only yours and none of the crits are working anymore. I am in the settings and can't find it anywhere. I feel stupid lol

TheoGeek
September 10th, 2020, 03:49
Hey arcanjl! First, thanks for checking out the extension!

Second, yeah, you only need v4, you don't need the old one.

I just tried it with an empty campaign with only v4 of my extension and it was working fine, the options are there and everything. Are you using Unity or Classic? I tried both and both are working.

You can tell that the extension loaded by seeing this in the chat window when FG starts:

39226

if that's not there, then the extension isn't loaded.

You aren't forgetting to select it when you start your campaign are you? :) That's neeeeever happened to me. hehe

LordEntrails
September 10th, 2020, 05:57
FYI, I'm using in FGU with no issues. Used to use in FGC with no issues.

arcanjl
September 10th, 2020, 13:50
I don't know why, but it is making me click it every load. it usually remembers so I jumped the gun on that - sorry guys

TheoGeek
September 10th, 2020, 15:23
No worries...glad it's working!

EliForge
September 12th, 2020, 22:07
Thank you for sharing this!!

Roach
October 5th, 2020, 09:40
Hi. I love this Extension, but...

Would it be possible to - in the next version - adjust the internal version number it reports to FG to the correct one (on my PC it currently reports 2.4)? Mad Nomad's 3rd Party Updater keeps nagging me to update this extension to v4...

TheoGeek
October 5th, 2020, 14:17
Hi. I love this Extension, but...

Would it be possible to - in the next version - adjust the internal version number it reports to FG to the correct one (on my PC it currently reports 2.4)? Mad Nomad's 3rd Party Updater keeps nagging me to update this extension to v4...

Version 4 is the current version so if it's reporting 2.4 then you likely have an older version of the extension. The download on the first post of this thread is version 4. You should see "5E - Theogeek's Improved Critical (v4.0)" in the extension selection window. If you don't see that, then you have an older version.

To make sure there wasn't something I missed, I downloaded the extension from the first post of this current thread (https://www.fantasygrounds.com/forums/showthread.php?61376-5E-Theogeek-s-Improved-Critical), checked the source, and every place where the version number is is set to 4.0.

Lemme know what you see. I just loaded a campaign with v4.0 from the extension selection window, and version 4.0 was loaded.

mattekure
October 5th, 2020, 18:05
Hi. I love this Extension, but...

Would it be possible to - in the next version - adjust the internal version number it reports to FG to the correct one (on my PC it currently reports 2.4)? Mad Nomad's 3rd Party Updater keeps nagging me to update this extension to v4...

My copy says version 4.0. I would double check your extensions folder and make sure you dont have a duplicate older copy installed. Its happened to me more than once. I think there may also be some confusion with MadNomads updater as there are 2 versions of this extension. The older one for Classic, and then this new one starting at version 4 for Unity. Both using the same name.

TheoGeek
October 5th, 2020, 18:15
My copy says version 4.0. I would double check your extensions folder and make sure you dont have a duplicate older copy installed. Its happened to me more than once. I think there may also be some confusion with MadNomads updater as there are 2 versions of this extension. The older one for Classic, and then this new one starting at version 4 for Unity. Both using the same name.

All versions *should* work with FGC and FGU, I'm just not developing in FGC anymore. At some point, the FGU and FGC code bases may diverge enough that separate versions are required, but I don't think it's there yet.

Korav
November 14th, 2020, 15:25
Hi, thanks for the great extension. I ran into a problem on FGU while running version 4.0 of the extension. I rolled damage as normal and I thought in FGC that you could use a modifier key to apply critical damage instead and another key to heal for that damage (though I need to go back and test, because I'm thinking now that functionality was added through an extension).

Anyway, if I take the roll result, use the SHIFT key and drag it onto a token in the combat tracker, the following error appears:
[11/14/2020 10:18:13 AM] Handler error: [string "scripts/5E-Theogeek-ImprovedCritical.lua"]:213: attempt to index local 'tempDie' (a nil value)
[11/14/2020 10:18:24 AM] [ERROR] Script execution error: [string "scripts/5E-Theogeek-ImprovedCritical.lua"]:213: attempt to index local 'tempDie' (a nil value)

It's obviously not critical and will stop doing it, but figured I should report it.

TheoGeek
November 14th, 2020, 19:55
Hi, thanks for the great extension. I ran into a problem on FGU while running version 4.0 of the extension. I rolled damage as normal and I thought in FGC that you could use a modifier key to apply critical damage instead and another key to heal for that damage (though I need to go back and test, because I'm thinking now that functionality was added through an extension).

Anyway, if I take the roll result, use the SHIFT key and drag it onto a token in the combat tracker, the following error appears:
[11/14/2020 10:18:13 AM] Handler error: [string "scripts/5E-Theogeek-ImprovedCritical.lua"]:213: attempt to index local 'tempDie' (a nil value)
[11/14/2020 10:18:24 AM] [ERROR] Script execution error: [string "scripts/5E-Theogeek-ImprovedCritical.lua"]:213: attempt to index local 'tempDie' (a nil value)

It's obviously not critical and will stop doing it, but figured I should report it.

ooh...good catch.

It looks like dragging a critical roll even without holding the SHIFT key while doing it causes this error. I'll look into it, but it looks like the way I compute critical damage relies on a structure that doesn't exist when damage is applied in this manner.

Korav
November 14th, 2020, 20:58
Thank you TheoGeek for looking into it!

TheoGeek
November 16th, 2020, 00:00
OK...I might have something, but I'm not sure what you are looking for and I don't want to fix it wrongly.

i.e. what's your use case?

Currently, holding SHIFT and dragging from the damage box on the character sheet to an entry on the combat tracker rolls critical damage as expected and I don't get the error you see. I do get the error when trying to drag any kind of critical damage from the chat window to a CT entry. The "fix" I made was to bypass computing critical damage in the case where there were no dice to decode, so when you drag an already rolled result from the chat window, it will apply that same damage and not attempt to recode any different damage. Likewise, you can't make an already rolled damage result "critical" by simply holding shift and dragging it to a CT entry (which is consistent with the behavior without my extension loaded).

Thanks!

Korav
November 16th, 2020, 13:16
Thank you for looking at this. I don't have a specific use case for this, just noticed the unhandled exception. In my case in FGC there was an addon (might have been combat enhancer, but don't remember which addon it was) that allowed you to drag results from the chat to the CT with modifier keys. Depending on the modifier key (SHFT, ALT, CTRL) it would reverse damage (heal), give half damage, or give twice the damage. So I simply stumbled across it when I performed these actions. I assumed (incorrectly) that this happened only when SHIFT dragging, but it sounds like it handled all the time.

eriktedesco
November 16th, 2020, 13:21
Has the new extension update been posted?

Hylomorph
November 16th, 2020, 16:55
Same issue, and it sounds like the fix is incoming. If you want another use case:

For our campaigns, instead of automatically applying damage to PCs,

1. The DM rolls damage in the chat window
2. players drag damage from the chat window to themselves in the CT.

It's just something we decided we liked a long time ago. So, we run into the issue as described.

Thanks for the extension, Theo!

TheoGeek
November 16th, 2020, 16:58
Thanks for the input! I'll try to get something together and posted today or tomorrow.

I'll try to test it with the 5E Enhancer and all by itself as well. :)

Also, I'll try to remember to use a player instance as well. I am never a player so I never use it as a player. hehe

TheoGeek
November 17th, 2020, 01:14
OK, I uploaded a version 4.1 (linked from the OP)..try it out and let me know how it works.

Also, I couldn't get any SHIFT/CTRL/ALT click dragging to do anything other than apply damage as rolled. It behaved that way even when the 5E Enhancer was the only extension I had loaded (even without my Improved Critical extension).

However, in the latest version of FGU, right clicking on the damage roll in the chat window brings up a context menu where you can negate the damage, halve it, double it, or display it as rolled. Dragging that modified damage works as it should.

Thanks again!
Jeff.

mattekure
November 17th, 2020, 01:23
OK, I uploaded a version 4.1 (linked from the OP)..try it out and let me know how it works.

Also, I couldn't get any SHIFT/CTRL/ALT click dragging to do anything other than apply damage as rolled. It behaved that way even when the 5E Enhancer was the only extension I had loaded (even without my Improved Critical extension).

However, in the latest version of FGU, right clicking on the damage roll in the chat window brings up a context menu where you can negate the damage, halve it, double it, or display it as rolled. Dragging that modified damage works as it should.

Thanks again!
Jeff.

In Classic, you could use Ctrl Drag from the chat to invert the value, so 5 damage would become 5 heal, but that was removed in Unity I believe. for now you just right click on the number in chat and select the invert option

TheoGeek
November 17th, 2020, 01:25
In Classic, you could use Ctrl Drag from the chat to invert the value, so 5 damage would become 5 heal, but that was removed in Unity I believe. for now you just right click on the number in chat and select the invert option

Ah...that makes sense then. One word - I did not test this in FGC because I don't use that platform anymore.

Korav
November 17th, 2020, 01:35
Tested 4.1 and it does address the console error generated when dragging a result from the chat to the CT.

Thank you very much!

Hylomorph
November 25th, 2020, 15:42
Our campaign ran into a bug last night. Steps to reproduce:


Create a character with a weapon.
Add the effect "DMG: 2" to the character.
Double-click the damage field of the weapon in the character sheet. The damage is rolled in the chat window with the additional +2 from the effect; everything works.
Hold shift and double-click to roll crit damage; error in console.



[ERROR] Script execution error: [string "scripts/5E-Theogeek-ImprovedCritical.lua"]:220: attempt to index local 'tempDie' (a nil value)

This was in FGU v4.0.1. This bug occurs in both v4.0 and v4.1 of the extension. Extension Options:


Disable critical damage dice - Remove crit die
Max Dice: Critical - No
Max Dice: Damage - Yes
Max Dice: Effect - Yes

mattekure
November 25th, 2020, 15:45
Our campaign ran into a bug last night. Steps to reproduce:


Create a character with a weapon.
Add the effect "DMG: 2" to the character.
Double-click the damage field of the weapon in the character sheet. The damage is rolled in the chat window with the additional +2 from the effect; everything works.
Hold shift and double-click to roll crit damage; error in console.



[ERROR] Script execution error: [string "scripts/5E-Theogeek-ImprovedCritical.lua"]:220: attempt to index local 'tempDie' (a nil value)

This was in FGU v4.0.1. This bug occurs in both v4.0 and v4.1 of the extension. Extension Options:


Disable critical damage dice - Remove crit die
Max Dice: Critical - No
Max Dice: Damage - Yes
Max Dice: Effect - Yes


I'm not getting this at all. perhaps there is some interaction between another extension?

Hylomorph
November 25th, 2020, 16:07
I thought the same thing! But this is a new campaign with only the improved crit extension loaded. There's some other variable here, but I don't know what. I attached the log dump; maybe there's something in them.

I've reproduced it with two different computers hosting, as well.

Hylomorph
November 25th, 2020, 16:52
Additional note: Changing the Disable Critical Damage Dice from Remove crit die to Force crits to 0 avoids the error.

TheoGeek
November 25th, 2020, 17:12
Additional note: Changing the Disable Critical Damage Dice from Remove crit die to Force crits to 0 avoids the error.

Thanks for reporting...I'll get on it!

Given your use case (setting the "Remove crit dice" option), are you wanting to only max normal damage and bypass the 5e crit mechanic of extra dice? Until I get this sorted out, I'd suggest setting them to 0 instead of removing them...that will give you the same end result, but you'll just see the critical dice with "0" values instead of not seeing them. The "remove" vs "set to zero" was supposed to be a strictly cosmetic change...this is the first report of it causing an error.

Thanks again!

Hylomorph
November 25th, 2020, 17:43
Thank you for providing such a useful extension!

You are correct, we want to replace the 5e critical hit damage mechanic (double all dice) with the old 4e critical hit damage mechanic (max all dice). The "set to zero" option works perfectly for us.

Note that it only causes trouble when the character rolling crit damage has a "DMG: N" effect.

TheoGeek
November 26th, 2020, 00:32
I added a new version of the extension (4.2) to the first post.

As always, let me know of any issues!

Thanks!
Jeff.

Hylomorph
November 26th, 2020, 02:13
This works flawlessly in my test setup. Thanks much!

TheoGeek
November 26th, 2020, 02:57
This works flawlessly in my test setup. Thanks much!

Glad to hear...I think I also shored up another place where an issue could crop up, so hopefully there won't be any more updates needed unless I get a hair and try to add more functionality...hehe

tmandeville
December 11th, 2020, 19:00
Hey great extension btw. But we ran into a few snags with the latest updates. When the crit rolls It does maximize the weapon die and it adds in the 2nd weapon die but it does not seem to add in the stat modifier at all. So for example Longsword normal 1d8 + 5 for str. When crit it does 8 + Die roll of 4 +5 for stat but total only shows 12 instead of 17. not to sure if it broke with the latest version of FGU

TheoGeek
December 11th, 2020, 19:23
Hey great extension btw. But we ran into a few snags with the latest updates. When the crit rolls It does maximize the weapon die and it adds in the 2nd weapon die but it does not seem to add in the stat modifier at all. So for example Longsword normal 1d8 + 5 for str. When crit it does 8 + Die roll of 4 +5 for stat but total only shows 12 instead of 17. not to sure if it broke with the latest version of FGU

Thanks for the report!

Do you have any other extensions loaded? (I run with a bunch)

I just tried with a club (1d4 + 5) and it did what I would expect...maxxed damage dice, rolled extra dice, and added strength bonus.

I loaded a new campaign with only the Improved Critical extension loaded and it worked as well.

Can you try that?

Thanks!

tmandeville
December 11th, 2020, 19:44
Thanks for the quick response. I will have to try it when i get home and will do some testing and let you know.

tmandeville
December 11th, 2020, 22:07
Hey did some quick testing and only the Crit extension turned on and still not working. In this example rolled normally for a hand cross bow he was D6+3 and rolled correctly but when crit it only seems to be adding +1 and not his full stat even though everything is programed correctly. I tested it with another character and it seems to be subracting 2 of the stat modifier. so with the new character he was doing D6 + 4 with str and when rolling crit it did only +2 for stat. Here are some crit examples and doesnt seem to make sense.

41914
41915

TheoGeek
December 11th, 2020, 22:56
Hey did some quick testing and only the Crit extension turned on and still not working. In this example rolled normally for a hand cross bow he was D6+3 and rolled correctly but when crit it only seems to be adding +1 and not his full stat even though everything is programed correctly. I tested it with another character and it seems to be subracting 2 of the stat modifier. so with the new character he was doing D6 + 4 with str and when rolling crit it did only +2 for stat. Here are some crit examples and doesnt seem to make sense.

41914
41915

It really looks like there is some penalty being applied, not sure why tho. The tell is in the description in the chat box (1d8-2=6). My extension doesn't mess with that stuff, it only changes the total of the roll if it needs to. Can you try NOT loading the extension at all and see what a critical hit does? It's weird for sure. If that doesn't pan out, PM me and you can zip up your campaign and send it to me and I can see if there's something funny going on. I can't get it to do that on my end.

TheoGeek
February 6th, 2021, 23:52
Updated to version 5.0 to include support for new types added to the Nat20 extension.

LaiJien
February 7th, 2021, 15:33
Updated to version 5.0 to include support for new types added to the Nat20 extension.

Good day, TheoGeek! If I am not using your Nat20 extension, should I still download and use this version or stick to what I am already using: ImprovedCritical_3.1.ext (rev 3.1)? Thanks - enjoying 3.1 very much.

TheoGeek
February 7th, 2021, 15:42
Thanks! You should be fine with not upgrading if you don't use Nat20.

Glad you are enjoying it!

TheoGeek
February 17th, 2021, 03:35
Updated for compatibility with Advanced Weapon Damage. brach9 will be updating a compatible version of Advanced Weapon Damage soon.

Jiminimonka
February 18th, 2021, 01:23
Had to disable this today, it was not causing script errors for damage rolls.

TheoGeek
February 18th, 2021, 03:50
Had to disable this today, it was not causing script errors for damage rolls.

*not* causing script errors - assuming you meant *was causing*?

If so, what was the script error? I am running this now and not seeing any ... are you using it with Advanced Weapon Damage? I may have to buy that. :)

If not, why did you have to disable it? :)

arcanjl
February 18th, 2021, 10:45
*not* causing script errors - assuming you meant *was causing*?

If so, what was the script error? I am running this now and not seeing any ... are you using it with Advanced Weapon Damage? I may have to buy that. :)

If not, why did you have to disable it? :)

Can I purchase it for you? As a ty.

TheoGeek
February 19th, 2021, 01:51
Can I purchase it for you? As a ty.

Man...what a nice gesture. I'd actually like that a lot.

MrDDT
February 21st, 2021, 01:54
Wrong post.

TheoGeek
February 27th, 2021, 08:32
Uploaded a very minor update (link on the original post) to get rid fo some global data. Should be functionally equivalent to 5.2 so updating shouldn't be necessary.

ZergorX
March 6th, 2021, 05:12
[Edit] :This issue is resolved in 4.0.2. Thanks for the quick turn around!

Heya, we use both of the critical extensions in FGC, with the latest version from here, our barbarian can't land melee damage. We get
[3/5/2021 10:06:26 PM] [ERROR] Handler error: [string "scripts/5E-Theogeek-Nat20.lua"]:300: attempt to index field '?' (a nil value)
when we try to roll damage. Non-critical, she is raging, great weapon master, reckless attack.
Turned off all her effects and it works.
With Rage on it does not work.
With Great weapon master on it does not work.

Basically, can't roll damage when either Rage and/or great weapon master is on.

TheoGeek
March 6th, 2021, 06:31
Fixed! It was the Nat20 extension. Version 4.0.2 can be downloaded from the NAT20 OP here: https://www.fantasygrounds.com/forums/showthread.php?61375-5E-Theogeek-s-Natural-20

It had to do with the constant damage. I still need to fix the output in the case of there only being constant damage in effects, i.e. DMG: 2. It computes damage correctly, but doesn't print that in the chat window. For example, it should say "[EFFECTS: +2]" but it doesn't.

Thanks for reporting this!

TheoGeek
March 27th, 2021, 05:57
Over in the Nat20 thread, Zelannii had asked about making critical damage more akin to 2e where it just doubled the damage. I added it. :)

Here is a beta version if you want to try it out...

Note that the extension Options matter as you can enable double damage max damage and retain extra critical dice and get a CRAP ton of damage. If you just want double damage, you should set the options for double damage option, removing critical dice, and not maxxing anything.

Also note that doubling the damage is simply that - the result of each included damage dice is doubled and that sum is added to the doubled modifier total. It outputs to the chat window oddly in that a 6 sided die might say "10" if a 5 was rolled, but the output will also indicate "[IMPROVED CRITICAL DOUBLED " so you know what's going on.

This may become standard soon, so please let me know if you see any issues.

Thanks!

jakobmalkav
April 20th, 2021, 23:44
Ignore this post, found the source of the error was on my end... a lovely id10t error :)

TheoGeek
April 21st, 2021, 00:13
Good to hear! I hate those id10t errors - I fall prey to them all the time. hehe

Conradhowlf
May 16th, 2021, 07:07
Hey Theo, is there a way to make only the first d6 of a sneak attack and hunter's mark to be maxed?
Thanks for the mod

TheoGeek
May 19th, 2021, 16:31
Hey Theo, is there a way to make only the first d6 of a sneak attack and hunter's mark to be maxed?
Thanks for the mod

I'll check it out, but it'll probably require special case code since, for example, the RAW for sneak attack rolls all those dice twice so my critical code maxxes those rolls. I might look into creating a special option or something...

Conradhowlf
May 22nd, 2021, 18:33
Yea, I was thinking of just fracturing the sneak attack effects, but I did not manage to make just 1d6 crit, and the other 2d6 from the other effect not crit, so for now I'm just adding a 1d4 to the crit, so it does 2d6+1d4+crit of base damage...
I'll just leave as that for now
Thanks for the reply Theo!

TheoGeek
June 7th, 2021, 02:24
OK, so I updated this to add support for PFRPG2. I probably should rename it now, huh? Not sure if I'll add other rulesets, but the PFRPG2 one is not used by me (I don't play Pathfinder), but adding support turned out to not be super hard. I can't debug it as well, nor will I be putting much time into testing, so just reply with any issues and I may ask for debugging help.

That said, does this extension need a new thread or can a mod rename this one to just "Theogeek's Improved Critical"? :)

I'll post it soon.

mattekure
June 7th, 2021, 04:29
Just rename the thread and note in the first post that it supports both rulesets. or you can rename it and add the supported rulesets at the end. ie "Theogeek's Improved Critical (5E, PFRPG2)"

TheoGeek
June 18th, 2021, 02:57
Updated the first post with the new extension, but I could only rename the title in the thread...it still shows up in the main list as "5E - Theogeek's Improved Critical"

spoonhead
June 18th, 2021, 07:51
Brilliant to see more PF2 support.

spoonhead
June 18th, 2021, 09:52
Just added your extension to a new PF2 campaign, but I don't see where the options for it are?

https://www.fantasygrounds.com/forums/attachment.php?attachmentid=47687&stc=1&d=1624006162

spoonhead
June 18th, 2021, 10:03
Just loaded up my 5e campaign where I use your extension, and the options have disappeared from there as well.

TheoGeek
June 18th, 2021, 19:45
Gah! I'll check it out!

TheoGeek
June 18th, 2021, 19:58
well, if it's in a folder, it works, but when I create the ZIP and rename it to EXT it no longer works. Looking into it, but if you unzip it in your extension folder, it should work for now till I can figure it out...weird.

TheoGeek
June 18th, 2021, 20:13
Got it. Apparently, in the extension.xml file, if the extension is unzipped in a folder, this works:

<script name="ImprovedCritical" file="/scripts/ImprovedCritical.lua" />

but when it is zipped into an EXT file, it doesn't. Note the leading "/" that is wrongly added. :)

Removed that slash and it works now.

Get Version 6.0 from the main page again.

TheoGeek
June 18th, 2021, 20:28
Also, I don't play PF2 so I can't really debug it well. If you find anything, let me know and I'll see what I can do with my limited understanding of that ruleset.

spoonhead
June 18th, 2021, 20:35
The options now turn up, but I don't know if I have the correct options set for PF2.

These are the settings:

https://www.fantasygrounds.com/forums/attachment.php?attachmentid=47690&stc=1&d=1624044584

On a normal hit, the damage is OK, but on a crit the bonus damage appears to be quadrupled rather than doubled. I would have expected the crit damage to have been First die d6=1 (doubled to 2) + deadly die d8=2 + DEX bonus 2 (doubled to 4) for a total of 8, not 12.

https://www.fantasygrounds.com/forums/attachment.php?attachmentid=47691&stc=1&d=1624044647

spoonhead
June 18th, 2021, 20:39
Normally in PF2 a critical hit would just double the normal damage + any critical traits, in the case above, the rapier has the deadly trait for an extra d8 of damage (but this shouldn't be doubled, and there should be no DEX bonus added)

TheoGeek
June 18th, 2021, 20:51
Is it related to this? I had another person asking about PF2 and this is what I found out (which I didn't expect):

"So, with no extensions loaded and "stock" PF2 rules, a critical hit with a bastard sword results in this damage...

Rolled 2d8 damage, the normal damage dice rolled a 3, and the critical damage dice rolled a 4). The damage output is:

Damage (M) Bastard Sword [CRITICAL] [TYPE: slashing (1d8+4=7)] [TYPE: slashing,critical (I1d8+4=8)] for a total damage of 15 (3+4 + 4+4)

Looks like the PF2 rules add the modifier to the critical damage as well, which is going to be a lot harder to remove since the ruleset adds it. My extension works with the roll the the ruleset gives it and just bumps the damage
so I'm not sure what it would take to recreate the entire roll to remove the modifier. It might not take much, but it would diverge from the ruleset more."

I'm using the PF2 SRD so that may be why? I don't own any PF2 rulesets.

spoonhead
June 18th, 2021, 21:00
The modifier should be added to the crit die, it's just that in my example the modifier became 8 not 4 as expected.

In the example below: 1st roll, normal damage correct, 3rd roll, (all options off), crit roll correct, except damage isn't really doubled. 2nd roll, with crit die off, and double dice, the dice rolls themselves are correct, but the modifier damage should be 8 not 16.

https://www.fantasygrounds.com/forums/attachment.php?attachmentid=47694&stc=1&d=1624046381

TheoGeek
June 18th, 2021, 21:06
Ah...I can look into that. It's just doubling everything like the old 2E house rule. So if the total damage was 11 after bonuses (1+2+8=11), the doubled damage would be 22.

If I can make it work, I'd likely change the Double Damage options to be: "rolled dice | all damage | no damage" or something like that.

spoonhead
June 18th, 2021, 21:08
That should be the case. Just be careful that any extra damage on a critical due to a weapon trait isn't doubled, as in the deadly trait above.

TheoGeek
June 18th, 2021, 21:11
OK. It may take a bit...parsing the damage string can get funny. :)

spoonhead
June 18th, 2021, 21:13
Here are the RAW from the Core rulebook.

Sometimes you’ll need to halve or double an amount of damage, such as when the outcome of your Strike is a critical hit, or when you succeed at a basic Reflex save against a spell. When this happens, you roll the damage normally, adding all the normal modifiers, bonuses, and penalties. Then you double or halve the amount as appropriate (rounding down if you halved it). The GM might allow you to roll the dice twice and double the modifiers, bonuses, and penalties instead of doubling the entire result, but this usually works best for single target attacks or spells at low levels when you have a small number of damage dice to roll. Benefits you gain specifically from a critical hit, like the flaming weapon rune’s persistent fire damage or the extra damage die from the fatal weapon trait, aren’t doubled.

My highlighting in bold

TheoGeek
June 18th, 2021, 21:25
OK, so the options are kind of meant to override the RAW behavior. If you select "double damage" then I'd expect everything to be doubled. If you don't select "double damage", then it should behave as above unless the FGU PF2 ruleset doesn't do that. How are crits handled in the PF2 ruleset with no extensions loaded?

spoonhead
June 18th, 2021, 21:27
OK, so the options are kind of meant to override the RAW behavior. If you select "double damage" then I'd expect everything to be doubled. If you don't select "double damage", then it should behave as above unless the FGU PF2 ruleset doesn't do that. How are crits handled in the PF2 ruleset with no extensions loaded?

As per the 3rd roll in post #72 above.

TheoGeek
June 18th, 2021, 21:30
Ah, I misread your comment. The bolded text is related to "IF your GM allows you to double rolls THEN benefits you gain from crits aren't doubled."

So the expectation would be that if someone familiar with PF would see "Double Damage" as an option, they would expect it to follow that rule.

If you're willing, I'd like to use you as a tester. :)

spoonhead
June 18th, 2021, 21:33
Actually it's the other way round. Normal rule is double damage, but at the moment FGU just doubles the number of dice and doubles the bonus (which is the option part of the rules).

Additional benefits from crits aren't doubled in either option.

TheoGeek
June 18th, 2021, 21:42
Ah...so FGU doesn't play by the rules then? This may get messy before it gets better. :)

TheKoyoteKid
June 19th, 2021, 01:05
I'm glad to see official support for PF2. Thanks for adding this!

TheoGeek
June 19th, 2021, 01:09
I'll say "official" in quotes because its still a work in progress...I think it just makes PF2 crits behave like 5e crits with the extension. There's work to do to get the PF behavior consistent with PF2 player expectations. So, I'm recruiting playtesters because I don't run PF2. :)

TheKoyoteKid
June 19th, 2021, 02:24
I'll say "official" in quotes because its still a work in progress...I think it just makes PF2 crits behave like 5e crits with the extension. There's work to do to get the PF behavior consistent with PF2 player expectations. So, I'm recruiting playtesters because I don't run PF2. :)

I volunteer as tribute, err I mean as a playtester ;)

TheoGeek
June 19th, 2021, 02:36
Sweet!

TheKoyoteKid
June 19th, 2021, 03:06
To establish a baseline of expectations, there are two options for doubling damage in Pathfinder 2e, as listed on page 451 of the Core Rulebook:

"...When this happens, you roll the damage normally, adding all the normal modifiers, bonuses, and penalties. Then you double or halve the amount as appropriate (rounding down if you halved it). The GM might allow you to roll the dice twice and double the modifiers, bonuses, and penalties instead of doubling the entire result, but this usually works best for single-target attacks or spells at low levels when you have a small number of damage dice to roll. Benefits you gain specifically from a critical hit, like the flaming weapon rune’s persistent fire damage or the extra damage die from the fatal weapon trait, aren’t doubled."

Fantasy Grounds appears to use the optional rule, perhaps because its cool to see the extra dice rolling :D So what we should see in play is that the number of dice and modifiers are doubled and then rolled, rather than rolled and then doubled.

For testing, I have a Human Rogue with STR 14, and DEX 14. I chose the Rogue so that I can also test the impact of Sneak Attack. They are equipped with a mace, a rapier, and a pick. These weapons were chosen because they all have a d6 base damage, the rapier has deadly d8, and the pick has fatal d10

Standard damage:
Mace - 1d6+2
Rapier - 1d6+2
Pick - 1d6+2

Critical damage (without extension)
Mace - 2d6+4
Rapier - 2d6+1d8+4
Pick - 3d10+4

Critical damage (with extension, max dice: damage = yes)
Mace - 6+1d6+4
Rapier - 6+1d6+1d8+4
Pick - 10+2d10+4

Standard damage with Sneak Attack:
Mace - 1d6+2
Rapier - 1d6+1d6+2
Pick - 1d6+2

Critical damage with Sneak Attack (without extension)
Mace - 2d6+4
Rapier - 2d6+1d8+2d6+4
Pick - 3d10+4

Critical damage with Sneak Attack (with extension, max dice: damage = yes)
Mace - 6+1d6+4
Rapier - 6+1d6+1d8+2d6+4
Pick - 10+2d10+4

This is what I have tested with the current 6.0 extension and it is what I expected to see happen. I haven't tested with Striking runes, but I'll have a look at that later this weekend.

spoonhead
June 19th, 2021, 09:06
To establish a baseline of expectations, there are two options for doubling damage in Pathfinder 2e, as listed on page 451 of the Core Rulebook:

"...When this happens, you roll the damage normally, adding all the normal modifiers, bonuses, and penalties. Then you double or halve the amount as appropriate (rounding down if you halved it). The GM might allow you to roll the dice twice and double the modifiers, bonuses, and penalties instead of doubling the entire result, but this usually works best for single-target attacks or spells at low levels when you have a small number of damage dice to roll. Benefits you gain specifically from a critical hit, like the flaming weapon rune’s persistent fire damage or the extra damage die from the fatal weapon trait, aren’t doubled."

Fantasy Grounds appears to use the optional rule, perhaps because its cool to see the extra dice rolling :D So what we should see in play is that the number of dice and modifiers are doubled and then rolled, rather than rolled and then doubled.

For testing, I have a Human Rogue with STR 14, and DEX 14. I chose the Rogue so that I can also test the impact of Sneak Attack. They are equipped with a mace, a rapier, and a pick. These weapons were chosen because they all have a d6 base damage, the rapier has deadly d8, and the pick has fatal d10

-SNIP-

This is what I have tested with the current 6.0 extension and it is what I expected to see happen. I haven't tested with Striking runes, but I'll have a look at that later this weekend.

But none of those options double the damage as per the rules. If you choose the option of double dice, then the at the moment damage bonus is quadrupled not doubled.

As per my post #72 above and the rules discussed in post #76.

TheKoyoteKid
June 19th, 2021, 10:43
So in your example from #72, the *weapon* dice are doubling properly? In that the FGU is rolling two dice, then the extension drops the second die, and doubles the first. I think that is what it is doing. But is then improperly doubling the bonus from Strength a second time?

Edit: TheoGeek, rather than letting the ruleset roll 2 dice, then have the extension drop the second and double the first to more accurately emulate the primary method in the core rulebook... why not set the second damage die equal to the first, similarly to how you maximise the 1st of the two dice with the (damage dice = max) function?

spoonhead
June 19th, 2021, 11:34
The dice are working as intended. Just the bonus is wrong. Your suggestion could work.

TheoGeek
June 19th, 2021, 18:35
Ok... so maybe start out by fixing the bonus and then we'll go from there?

similarly
June 20th, 2021, 11:36
Question: Is ver 6.0 for pathfinder only, or is it also for 5e?

TheoGeek
June 20th, 2021, 13:53
6.0 supports both. The main change was adding PF2 support, but I also added a double damage option for 5E and PF2.

Note that while PF2 is supported, is still being tested and will need some updates to make it what players would expect.

TheoGeek
July 28th, 2021, 04:19
Added to the forge (https://forge.fantasygrounds.com/shop/items/115/view)....further updates will be done there.

Also, sorry for the lack of effort on the PF2 functionality. I'll have more time soon!

mattekure
July 28th, 2021, 14:34
Added to the forge (https://forge.fantasygrounds.com/shop/items/115/view)....further updates will be done there.

Also, sorry for the lack of effort on the PF2 functionality. I'll have more time soon!

Forge link doesnt work. make sure after your build has been accepted, that you move it into the Live channel. Otherwise it wont show up in the listing. Also, I'd recommend making sure its set to the Data directory instead of Vault. You will need to manually do this after every build you push.

TheoGeek
July 28th, 2021, 14:37
yeah, all that is set properly, but I updated the description and now it says "Status: Your item is pending approval."

TheoGeek
July 28th, 2021, 15:06
So, the forge is a bit interesting...it looks like any change to an entry, even toggling the main image to another one that has been approved causes the entry to go through approval again. I need to get the description in the Forge to a spot where it won't change. :)

mattekure
July 28th, 2021, 15:26
So, the forge is a bit interesting...it looks like any change to an entry, even toggling the main image to another one that has been approved causes the entry to go through approval again. I need to get the description in the Forge to a spot where it won't change. :)
Yeah I ended up putting a basic description and then linking to my support thread

TheoGeek
July 28th, 2021, 16:52
There...everything should be stable in the forge now. :)

Macklyn
October 10th, 2021, 07:05
I have both the Natural 20 and the Improved critical extensions. The Natural 20 extension is loading, but the Improved Critical is not loading. I have updated my FGU and the Improved Critical extension is not showing in my campaign options list before loading. When I load the game, the logo for the Natural 20 appears in the chat box, but the Improved Critical is not in the chat box. Please help.

TheoGeek
October 14th, 2021, 04:16
Uploaded version 6.1 to the forge (https://forge.fantasygrounds.com/shop/items/115/view). Changes:

1) Robustness - removed possibility of this extension clobbering another extension's modification of the damage roll
2) New option: "Max Dice: Special Critical" - in conjunction with the Nat20 extension, will max "nat20", "normalcrit", and "supercrit" damage dice
3) New option: "Max Dice: First die only" - depending on choice, will max either all dice as selected in other options, the first die of each die string, or the only the first die

That last option, for example, if the damage dice were:

2d6, 2d8

and the die rolled as 2,3,6,7

would either:
- "None" => ignore this option
- "Overall" => override other settings and only max the first die: 6,3,6,7
- "Of each group" => override other settings and only max the first die of each normal damage group: 6,3,8,7

Critical damage groups are not included with this option.

As always, if you encounter any issues, let me know!

TheoGeek
October 21st, 2021, 21:21
Uploaded 6.1.1 to the forge (https://forge.fantasygrounds.com/shop/items/115/view). Fixes a bug when used with PF2. Thanks to toastsniffer187 for reporting it!

ShadowedHand
November 14th, 2021, 19:57
Amazing, so glad I found this. Your default setup has been my house rule for decades! So glad to have this automated now.

Expect a tip in the future!

TheoGeek
November 14th, 2021, 20:23
Amazing, so glad I found this. Your default setup has been my house rule for decades! So glad to have this automated now.

Thanks! Glad you like it!

TheoGeek
November 16th, 2021, 03:31
Uploaded 6.1.2 to the forge (https://forge.fantasygrounds.com/shop/items/115/view). Removed the "5E/PF2" text in the extension list.

TheoGeek
November 21st, 2021, 00:18
Something to watch for if and only if you drag a critical damage roll result from the chat window to a crit immune target. It will apply the "maxxed" non-critical dice rolled, regardless of the option to "Apply to crit immune targets" because when damage is dragged, the ruleset does not remember anything about the roll except what is in the description.

So, for example, if you roll an untargetted critical damage roll with a greatsword and the "normal damage" would have been 4(normal) + 5(crit) = 9, but because of this extension it was 12 (6+6) + 5(crit) = 17, if you drag that damage from the chat window to a crit immune target, it will behave as if you have the option "Apply to crit immune targets" checked and it will do 12 damage, when you'd expect it to do 4.

I'm working on a way to handle this by incrementing a "damage difference" number and subtracting it from the dragged total if it needs to be, but it's not trivial because of the options and may take a while. In the meantime, you should check the "rolled: xx" text in the roll description to see what the appropriate damage difference should be and add it back to the target's HP.

Again, this is only a problem if you drag a critical damage roll from the chat window to a crit immune target.

TheoGeek
November 25th, 2021, 06:07
Uploaded 7.0 to the forge (https://forge.fantasygrounds.com/shop/items/115/view).

- Correctly handle dragging untargeted critical rolls to crit immune targets.
- reformat output to aid in that

spoonhead
December 7th, 2021, 09:23
Does the extension in PF2 double dice and modifiers when a critical hit is made? Or just the dice?

TheoGeek
December 7th, 2021, 14:19
I'm pretty sure it doubles the modifiers too, but I'd need to check - that's what the intent was for doubling - it basically doubles the damage total. But, I think maybe a better option is to just double all rolled damage and leave modifiers alone. I think a few of us have had that conversation before because I'm not at all familiar with what people's expectations are for PF2E since I never play it.

I'll probably be able to spend a bit of time over the Christmas holiday working on it so if we can revisit the discussion from like post #86 in this thread (https://www.fantasygrounds.com/forums/showthread.php?61376-5E-Theogeek-s-Improved-Critical&p=607755&viewfull=1#post607755) and come up with a good base, it would be helpful.

Thanks!

spoonhead
December 7th, 2021, 14:56
I'm pretty sure it doubles the modifiers too, but I'd need to check - that's what the intent was for doubling - it basically doubles the damage total. But, I think maybe a better option is to just double all rolled damage and leave modifiers alone. I think a few of us have had that conversation before because I'm not at all familiar with what people's expectations are for PF2E since I never play it.

I'll probably be able to spend a bit of time over the Christmas holiday working on it so if we can revisit the discussion from like post #86 in this thread (https://www.fantasygrounds.com/forums/showthread.php?61376-5E-Theogeek-s-Improved-Critical&p=607755&viewfull=1#post607755) and come up with a good base, it would be helpful.

Thanks!

RAW page 451 “Sometimes you’ll need to halve or double an amount of damage, such as when the outcome of your Strike is a critical hit, or when you succeed at a basic Reflex save against a spell. When this happens, you roll the damage normally, adding all the normal modifiers, bonuses, and penalties. Then you double or halve the amount as appropriate”

spoonhead
December 7th, 2021, 15:10
As far as I can see, it appears to double the dice correctly if Disable critical Damage Dice is set to Remove crit die or Force crits to 0 and Doube Dice set to Yes, in the options (all others set to No), but it appears to quadruple the modifier

https://www.fantasygrounds.com/forums/attachment.php?attachmentid=50226&stc=1&d=1638889741

TheoGeek
December 9th, 2021, 15:44
Working on this now. In other news, this uncovered an issue with the extension that I didn't know was there because I never use the functionality...it has to do with dragging untargeted damage rolls from the chat window to a target. I'm making it so that if you roll an untargeted critical damage roll and drag it to a crit immune target, it will cause the same damage as if that damage roll was targeted against a crit immune target.

I got all of that working and will be updating the forge soon.

The only remaining issue with this is in regards to dragging damage if "Remove Crit Dice" is set. When crit dice are set to 0 everything works, but when crit dice are removed, it's not working quite right. So, if you are using the option to remove crit dice, it would be wise to choose the option to set them to 0 until I get this figured out.

TheoGeek
December 10th, 2021, 03:31
Uploaded 7.1 to the forge (https://forge.fantasygrounds.com/shop/items/115/view). Fixes a bug with crit removal and a bug for double damage. Thanks spoonhead for reporting it!

Let me know if you see anything odd with 7.1 from the forge.

TheoGeek
December 10th, 2021, 19:17
Uploaded 7.1.1 to the forge (https://forge.fantasygrounds.com/shop/items/115/view). Fixes a bug with displaying "MAXXED" and "DOUBLED" in the description in the chat window.

TheoGeek
December 10th, 2021, 22:29
One thing to remember when "Remove crit die" is set...it only removes the extra critical damage that is added by the ruleset, it will NOT remove damage types that you have set up to be applied on a critical hit.

For example, if you score a critical hit with a greatsword, the ruleset will add extra critical damage dice so that the 2d6 will become something like 2d6 + 1d6 (extra critical). This option will remove the 1d6 in that case.

However, if you also have added a damage clause (to the weapon or as an effect) like "DMG: 1d6 critical", on a critical hit, the damage would be 2d6 + 1d6 (critical) + 1d6 (extra critical) and this option will only remove the 1d6 (extra critical). This is by design since certain weapons have effects that only trigger on critical hits and are not considered "critical" damage.

EisenF
December 13th, 2021, 20:42
I found the weirdest bug. Somehow the combination of this extension and this one https://www.dmsguild.com/product/314600/Fantasy-Grounds-Automatic-Critical-Damage makes it so the DMGO: effect from base FG not work fully.

It still works for dice values like DMGO: 1d4 radiant
But it deals 0 damage when using a numerical value like DMGO: 10 radiant

If I just disable this extension it works properly, but it appears that the conflict is only because of the one I linked above.

TheoGeek
December 14th, 2021, 01:50
Thanks for the report! I don't use that other extension, but it's a PWYW so I'll get it and see what happens. I'll also try to use the DMGO effect and see what happens with my extension.

TheoGeek
December 14th, 2021, 03:46
Uploaded 7.1.2 to the forge (https://forge.fantasygrounds.com/shop/items/115/view). Fixes a bug with constant ongoing damage (DMGO: 4).

TheoGeek
December 16th, 2021, 01:18
Uploaded 7.1.4 to the forge (https://forge.fantasygrounds.com/shop/items/115/view). Fixes a bug with double damage against crit immune targets.

TheoGeek
December 16th, 2021, 04:01
Uploaded 7.1.5 to the forge (https://forge.fantasygrounds.com/shop/items/115/view). Fixes a bug with the option to apply Improved Critical damage to crit immune targets.

EisenF
January 5th, 2022, 05:58
Thanks for the quick fix on the DMGO: issue!

I believe I found another small bug: when I set the effect [IMMUNE: critical] to expire on the next action/roll, the immunity is not actually applied, even though the effect goes away.
All screenshot were made on a fresh campaign with just this extension loaded.

ShadowedHand
January 5th, 2022, 06:53
Thanks for the quick fix on the DMGO: issue!

I believe I found another small bug: when I set the effect [IMMUNE: critical] to expire on the next action/roll, the immunity is not actually applied, even though the effect goes away.
All screenshot were made on a fresh campaign with just this extension loaded.

Confirmed...

It actually does this on every "Expend" option except Never.

The extra Crit die is rolled, but the first die is not maximized after the effect drops. This only appears to happen on the first crit OR damage following the (IMMUNE: critical) expiring.

Every crit after taking any kind of damage (critical or not) seems to work normally.

My settings are
50750

TheoGeek
January 5th, 2022, 14:08
Confirmed...

It actually does this on every "Expend" option except Never.

The extra Crit die is rolled, but the first die is not maximized after the effect drops. This only appears to happen on the first crit OR damage following the (IMMUNE: critical) expiring.

Every crit after taking any kind of damage (critical or not) seems to work normally.

My settings are
50750

Call me ignorant, but how do you set up that effect to expire on the target when it is hit? Is there another extension that does this? Thanks!

TheoGeek
January 5th, 2022, 14:28
One question before I start - if the immunity is set to expire on the next action, it will expire before damage is applied, right? Given the output, it looks like the effect expires before damage is computed. If that is the case, it is behaving as expected, right?

i.e.:

1) Target is crit immune set to expire on the next action.
2) Action is applied to target so effect expires.
3) Target is no longer crit immune
4) Crit damage applies as it would against a normal target.

It all depends on when the effect expires. The only thing my extension does is see if the target is crit immune before it computes damage. If the damage processing occurs after the effect expires, it won't know that the target used to be crit immune.

How does this work without my extension loaded, I'm curious. The core ruleset code checks for crit immunity in the damage processing so it looks like even without my extension loaded, it would behave like this.

Another thing to try would be to ignore the critical hit altogether and have an effect on the target like "IMMUNE:fire" that expires in the same way. Then have the target get attacked by a weapon that does fire damage and see if the fire damage is applied. This will bypass my extension altogether.

EisenF
January 5th, 2022, 15:40
Call me ignorant, but how do you set up that effect to expire on the target when it is hit? Is there another extension that does this? Thanks!

On base FG this behavior works as expected, effects don't just expire on attack rolls, they can expire on multiple types of rolls.
The way this one specifically works is because FG keeps track that the attack was a critical roll, so it's setting the next damage roll to be a crit (and roll double the amount of dice)


One question before I start - if the immunity is set to expire on the next action, it will expire before damage is applied, right? Given the output, it looks like the effect expires before damage is computed. If that is the case, it is behaving as expected, right?

i.e.:

1) Target is crit immune set to expire on the next action.
2) Action is applied to target so effect expires.
3) Target is no longer crit immune
4) Crit damage applies as it would against a normal target.

It all depends on when the effect expires. The only thing my extension does is see if the target is crit immune before it computes damage. If the damage processing occurs after the effect expires, it won't know that the target used to be crit immune.

How does this work without my extension loaded, I'm curious. The core ruleset code checks for crit immunity in the damage processing so it looks like even without my extension loaded, it would behave like this.

Another thing to try would be to ignore the critical hit altogether and have an effect on the target like "IMMUNE:fire" that expires in the same way. Then have the target get attacked by a weapon that does fire damage and see if the fire damage is applied. This will bypass my extension altogether.

The bit about expiring before the roll is just how FG's chat shows the outcome, that's how it's supposed to work, it expires the effect as it 'computes' them, so it shows up as going away at the same time the damage roll is being applied. I've seen this appear before or after, unsure of what exactly decides that (be it lag, or whatever else)

FG is pretty smart about when to expire things based on Action, so if it's looking at a DMG: or RESIST: effect it will only expire them when the corresponding action is taken. So a DMG: effect will not go away by rolling an attack roll or a skill check.

I've added a screenshot of a campaign with no extensions, same scenario as before.

TheoGeek
January 5th, 2022, 16:35
Thanks for that description! I'll look into it.

One thing I'm having trouble with though (definitely user error) is making the effect "IMMUNE:critical" so it expires. How are you doing it? (asking because I've never done that before)

Thanks again!

EisenF
January 5th, 2022, 16:39
Ah, my bad, I meant to include that in my reply as well.

I just cycle through the option underlined in red in the picture.

TheoGeek
January 5th, 2022, 17:10
Thanks! I tried something similar but the effect did not go away. I'll try again. :)

TheoGeek
January 5th, 2022, 17:40
Thanks! I tried something similar but the effect did not go away. I'll try again, but I must be doing something wrong because I can't get it to expire. ugh.

EisenF
January 5th, 2022, 17:44
Setting the effect to expire and then rolling the damage after should make it go away. Just make sure the attack/damage is being handled as a crit.
Are you using targeting on a CT? That could also affect it

I can join at a table or through discord to help out as well.

TheoGeek
January 5th, 2022, 18:08
OK...it's weird. For some reason my attacks were considered untargetted. I changed the faction of the target to "hostile" and it worked. Is that normal? I'll look into it more tonight. Thanks for the report!

EisenF
January 5th, 2022, 18:13
I was testing with a character hitting themselves, so I'm not sure faction should affect it, might be something strange happening there

TheoGeek
January 5th, 2022, 18:53
looks like something was messed up. It's not doing that anymore.

I'm pretty sure figured it out. I'm calling "ActionDamage.getReductionType(rSource, rTarget, "IMMUNE")" which apparently has a side effect of expiring the expiring effects, so the extension removes the effect prior to the damage being computed by the engine resulting in the target no longer being crit immune. Should be an easy fix so the new version should be up sometime tonight!

EisenF
January 5th, 2022, 19:05
Awesome! Thanks for the quick work, I did not expect it to be resolved so soon! :D

TheoGeek
January 5th, 2022, 23:49
Uploaded 7.1.6 to the forge (https://forge.fantasygrounds.com/shop/items/115/view). Fixes a bug with targets whose "IMMUNE: critical" effect is expiring.

Thanks EisenF for reporting it and ShadowedHand for confirming!

ShadowedHand
January 6th, 2022, 00:25
50782

Just got home, updated FG and tested again. The attachment is from a screenshot.

Damage Roll 1 is a CRIT with IMMUNE: critical applied to the target, set to 'expend' On Next Action

Damage Roll 2 is a CRIT right after.

So, as far as I can tell, the sequence is now listed correctly.

Before, it was listing the sequence as if the damage was being applied AFTER the effect expired, but still calculating the damage correctly.

A niche oddity of an error, but an error none the less. ;)

Thanks TheoGeek!

TheoGeek
January 6th, 2022, 03:28
Great!

The bug was in a function that I was using to get the effects from the target. The "get" function that I thought simply returned the status also has a side effect of expiring effects that are set to expire. So my extension was expiring the effect and then the ruleset's damage calculation function called that same function and, of course, didn't find the critical immunity because it was already expired.

Fortunately, it was an easy fix - I just had to manually search the effects for the "IMMUNITY: critical" one and return "true" if it was found. :)

Thanks for the input - I'd likely have never found this bug without it!

TheoGeek
January 6th, 2022, 05:31
Uploaded 7.1.7 to the forge (https://forge.fantasygrounds.com/shop/items/115/view). Fixes a bug with targets whose "IMMUNE: critical" effect is inactive.

mattekure
January 8th, 2022, 16:47
In my game last night, I got this. Looks like a left over debug statement.
v7.1.7
https://i.imgur.com/NHJxMVe.jpg

TheoGeek
January 8th, 2022, 18:00
In my game last night, I got this. Looks like a left over debug statement.
v7.1.7
https://i.imgur.com/NHJxMVe.jpg

DOH! Thanks for pointing that out...removed it and updated the forge. I left the version at 7.1.7 though because I didn't think this warranted a new one. :)

Hylomorph
January 22nd, 2022, 19:19
I've been using this extension for a long time! It has been a while since I updated; I have been using 5.1. I tried using the Forge version today (7.1.7) and found a possible regression. Maxing damage dice and removing crit dice wasn't working. In a new campaign with only this extension loaded:

51120

Am I missing something?

TheoGeek
January 22nd, 2022, 20:28
Yikes! That should work. I'll look into it now.

TheoGeek
January 22nd, 2022, 21:21
Fixed! Uploaded 7.1.8 to the forge (https://forge.fantasygrounds.com/shop/items/115/view).

Hylomorph
January 22nd, 2022, 21:39
Working perfectly! Thanks for your work!

TheoGeek
January 22nd, 2022, 22:43
Working perfectly! Thanks for your work!

Glad to help! And I'm glad you like the extension!

TheoGeek
February 4th, 2022, 23:16
Fixed bug in handling crit immune targets. Updated forge (https://forge.fantasygrounds.com/shop/items/115/view) to 7.1.9.

SONSON
May 22nd, 2022, 04:06
The function to max out the damage on criticals is not working after the 05/17 update. 52882

TheoGeek
May 22nd, 2022, 04:27
The function to max out the damage on criticals is not working after the 05/17 update. 52882

Hmmm...It's working fine for me...what version does it say in the chat and are you getting it from the forge? That output doesn't look like what it's supposed to look like, so I'm assuming you are either using an old version, you are not subscribed to the forge version, or the forge is not updating it like it should.

Let me know.

Thanks!
Jeff.

R0b0to
June 15th, 2022, 15:31
It doesnt seem to work for me

TheoGeek
June 15th, 2022, 21:31
It doesnt seem to work for me

1) What version shows up in the chat window when you start FGU?
2) What options do you have set for it?
3) What is displayed in the chat as the damage string when you roll critical damage?
4) What other extensions are you using?
5) What doesn't seem to be working?

I'll see what I can do, but it's more than likely something with your environment because it's working fine for me and my players.

Thanks!

Slagmoth
July 19th, 2022, 01:13
Suggestion as we just had a lengthy discussion at my table on implementing this, could you add the additional option to just guarantee Half instead of Max? That way you guarantee actually full damage instead of 3/4 of a max critical mathematically.

TheoGeek
July 19th, 2022, 01:40
Suggestion as we just had a lengthy discussion at my table on implementing this, could you add the additional option to just guarantee Half instead of Max? That way you guarantee actually full damage instead of 3/4 of a max critical mathematically.

Well, my extension (with the default option set) guarantees at least full normal damage + any crit damage rolled so do you mean you want an option to do MAX(normal damage) and HALF(MAX(crit damage))?

I may not be understanding so let me give an example and see if this is what you are talking about...

Barbarian uses a greatsword (2d6)
Barbarian crits
RAW says that the damage is 2d6 (normal weapon damage) + 2d6 (critical weapon damage) : RANGE = 4-24

With my extension, you can set the option to do:
1) MAX(2d6) + 2d6 = 12 (normal) + 2-12 critical : RANGE = 14-24
2) 2d6 + MAX(2d6) = 2-12 (normal) + 12 critical : RANGE = 14-24
3) MAX(2d6 + 2d6) = 12 normal + 12 critical : RANGE = 24

Are you asking for an option that would do any of the following:
1a) HALF(2d6) + 2d6 = 1-6 (normal) + 2-12 (critical) : RANGE = 3-18
2a) 2d6 + HALF(2d6) = 2-12 (normal) + 1-6 (critical) : RANGE = 3-18
3a) HALF(2d6 + 2d6) = 1-6 (normal) + 1-6 (critical) : RANGE = 2-12

OR

1b) HALF(MAX(2d6)) + 2d6 = 6 (normal) + 2-12 (critical) : RANGE = 8-18
2b) 2d6 + HALF(MAX(2d6)) = 2-12 (normal) + 6 (critical) : RANGE = 8-18
3b) HALF(MAX(2d6 + 2d6)) = 6 (normal) + 6 (critical) : RANGE = 12

OR

1c) Any combination of MAX() and HALF(MAX()) so you could do MAX(2d6) + HALF(MAX(2d6)) = 12 (normal) + 6 (critical) = 18. Like the option would be HalfMax for either normal dice or critical dice or both?

I can add whatever options, but any of the "a" or "b" options seem to nerf the damage instead of buff the damage.

Or are none of those what you are asking? :)

Let me know and I'll see what I can do!

MrDDT
July 19th, 2022, 02:13
I think what they want (not what I'm asking for).

They want to make sure that the roll is going to meet the minimum of 1/2 the first dice of damage. IE. 1d8 would have to be a 4 or higher on the first roll.
So currently on a crit, you can do a 1d8 + 1d8, getting anywhere from 2 to 16 damage, using the first die at max (as the current setting), you could get a 9 to 16.
So instead of only the options of 2 to 16, or 9 to 16, they want min 1/2 on the first die. Which would be 5 to 16.

Personally, I don't see the need but I guess having it a little more refined slightly lower is maybe better for some.
Doing MAX + second die RNG might be to much for some.

TLDR
Current options are
2 to 16 or 9 to 16. They want the option for 5 to 16.

TheoGeek
July 19th, 2022, 04:02
Ah, gotcha.

So, for something like a greatsword, I'm assuming a range of 6-12 (3-6 + 3-6) rather than 4-12 (3-6 + 1-6)? for the normal damage?

That would give, for the 4d6 on a greatsword crit (2d6 + 2d6) a range of (6-12) + (2-12) = 8-24 instead of (4-12) + (2-12) = 6-24.

I think I get it.

It'll be a good exercise...I'll call it something like "soft critical" or something. :)

MrDDT
July 19th, 2022, 04:11
Ah, gotcha.

So, for something like a greatsword, I'm assuming a range of 6-12 (3-6 + 3-6) rather than 4-12 (3-6 + 1-6)? for the normal damage?

That would give, for the 4d6 on a greatsword crit (2d6 + 2d6) a range of (6-12) + (2-12) = 8-24 instead of (4-12) + (2-12) = 6-24.

I think I get it.

It'll be a good exercise...I'll call it something like "soft critical" or something. :)


Yes, however, you said "(4-12) + (2-12)", when "normal crit" of a GS is (2-12) + (2-12) = 4-24 range.

Note: This part is correct.
As your GS example with the "SOFTCRIT" it would be 6-12 + 2-12 = 8-24.

Also Note:
With the MAX first die, it would be 12 + 2-12 = 14-24. So quite noticeable change.

@Slagmoth,
This would also minimize the effect of special skills like Great Weapon Fighter which reroll 1s and 2s. Just throwing that in there a bit.


TLDR
Example Greatsword Crit
Normal Crit = 4 - 24
SOFT Crit = 8 - 24
MAX First = 14 - 24

TheoGeek
July 19th, 2022, 04:24
Yes, however, you said "(4-12) + (2-12)", when "normal crit" of a GS is (2-12) + (2-12) = 4-24 range.


Yeah, that 4-12 came from the idea of halfmaxing only 1 of the 2 damage dice for normal damage (3-6 + 1-6 = 4-12) - assuming that's NOT what they wanted. :)


With the MAX first die, it would be 12 + 2-12 = 14-24. So quite noticeable change.

Yup...which is why I want to call it something like "Soft Crits", it's on average average better than just rolling damage dice twice but not as good as the default improved crit damage as it doesn't guarantee at least max weapon damage.

With this "soft critical" option set, a longsword could potentially only do 3+1=4 damage on a crit (instead of the extension default minimum of 8+1=9) while that loser with a mace could potentially do 5-6 on a normal hit (strength bonuses not withstanding). :)

Slagmoth
July 19th, 2022, 14:49
Well, my extension (with the default option set) guarantees at least full normal damage + any crit damage rolled so do you mean you want an option to do MAX(normal damage) and HALF(MAX(crit damage))?

I may not be understanding so let me give an example and see if this is what you are talking about...

Barbarian uses a greatsword (2d6)
Barbarian crits
RAW says that the damage is 2d6 (normal weapon damage) + 2d6 (critical weapon damage) : RANGE = 4-24

With my extension, you can set the option to do:
1) MAX(2d6) + 2d6 = 12 (normal) + 2-12 critical : RANGE = 14-24
2) 2d6 + MAX(2d6) = 2-12 (normal) + 12 critical : RANGE = 14-24
3) MAX(2d6 + 2d6) = 12 normal + 12 critical : RANGE = 24

Are you asking for an option that would do any of the following:
1a) HALF(2d6) + 2d6 = 1-6 (normal) + 2-12 (critical) : RANGE = 3-18
2a) 2d6 + HALF(2d6) = 2-12 (normal) + 1-6 (critical) : RANGE = 3-18
3a) HALF(2d6 + 2d6) = 1-6 (normal) + 1-6 (critical) : RANGE = 2-12

OR

1b) HALF(MAX(2d6)) + 2d6 = 6 (normal) + 2-12 (critical) : RANGE = 8-18
2b) 2d6 + HALF(MAX(2d6)) = 2-12 (normal) + 6 (critical) : RANGE = 8-18
3b) HALF(MAX(2d6 + 2d6)) = 6 (normal) + 6 (critical) : RANGE = 12

OR

1c) Any combination of MAX() and HALF(MAX()) so you could do MAX(2d6) + HALF(MAX(2d6)) = 12 (normal) + 6 (critical) = 18. Like the option would be HalfMax for either normal dice or critical dice or both?

I can add whatever options, but any of the "a" or "b" options seem to nerf the damage instead of buff the damage.

Or are none of those what you are asking? :)

Let me know and I'll see what I can do!

So, we had two suggestions... one was that if the overall value rolled is less than the max base damage the value would increase to max weapon damage.

So, if you roll 1, 1, 1, 1 on a greatsword critical it would just default to 12. This is likely more complicated though.

What my original suggestion was is that instead of (for the greatsword with the same roll) 6, 6, 1, 1 +x which would be a bit more than maximum each time it is not the average. The average each crit with your current system is 19 +x 6, 6, 3.5, 3.5 +x so your damage will be very much higher on average on a critical. If instead you floor the first set of dice to 3, 3, 3.5, 3.5 +x the average is 13 +x which is closer to the max weapon damage.

So, to simplify:

Average greatsword hit is 7 + X with a crit it is 14 + X
With your ext the average with a crit is 19 + X
With the ability to choose half dice that drops to 13 + X

I originally wanted to use this until one of my players pointed out the skew of averages to the high end and it is a bit too high for our game as we play grittier with very few punches pulled by me as the DM and sometimes fewer hit points than average.

Obviously, we are but one table and if it wasn't for the Forge obfuscating all the extension code now, I likely would have just changed it myself for just our game.

Hope this made the idea clearer. No worries if it is not something anyone else wants.

TheoGeek
July 19th, 2022, 15:22
Thanks for the clarification!

Also, you are more than welcome to try to make the changes yourself if you want (as long as you don't upload them or anything). My extensions get installed into the data folder, not the vault, so you can unzip them and check them out. I prototyped something last night and got something working, but I'd like to improve it a bit based on your feedback.

I assume you'd also want to, let's say "raise the floor" for all damage types on a crit (my extension defaults to "don't max critical dice, max normal damage dice, max effect dice) but those can be tweaked. I'm thinking of an option like "Soft Critical" or "Raise the floor" that would "modify" other options (except "double damage" where it would double everything last) such that if you had one of the "max" damage options selected, rather than maxxing that damage class, it would raise the floor to half the number of sides on the damage die.

Hmmm...no I'm thinking...this might lead to changing the options altogether so there would be something like "Normal Damage: ", with options of "Standard, Maximize, Raise Floor" (defaulted as appropriate). This would be the same for "Critical Damage" and "Effect Damage"...honestly, that would make some of the internals easier anyway so I'll just do it to clean up my code. :) It would also make it easier to add other options like "Lower Ceiling" where you might want to maximize the damage dice but cap the critical damage that could be done to half the number of sides (so a 1,1,1,1 would be 6,6,1,1 and a 1,1,6,6 would be 6,6,3,3 = 18 instead of 24, or even 1,1,6,6 = 3,3,3,3 for 12 instead of 18!)

This would also allow a combination of any of the die modifications for each damage class (normal, critical, effect).

So with ...

Normal Damage: Raise Floor
Critical Damage: Raise Floor

... then a 1,1,1,1 would be 3,3,3,3 = 12.

Or with ...

Normal Damage: Raise Floor
Critical Damage: Standard

... then a 1,1,1,1 would be 3,3,1,1 = 8.

How bout that?

I'm always up for a good coding exercise! :)

MrDDT
July 19th, 2022, 19:49
What my original suggestion was is that instead of (for the greatsword with the same roll) 6, 6, 1, 1 +x which would be a bit more than maximum each time it is not the average. The average each crit with your current system is 19 +x 6, 6, 3.5, 3.5 +x so your damage will be very much higher on average on a critical. If instead you floor the first set of dice to 3, 3, 3.5, 3.5 +x the average is 13 +x which is closer to the max weapon damage.

So, to simplify:

Average greatsword hit is 7 + X with a crit it is 14 + X
With your ext the average with a crit is 19 + X
With the ability to choose half dice that drops to 13 + X


That info is partly incorrect.

AVG crit hit with a GS standard rules = 3.5x4 = 14
AVG crit hit with a GS max first dice = 12+3.5x2= 19
AVG crit hit with a GS min first dice 1/2 (really 3) = 4x2+3.5x2 = 15

Why is it 4x2? Because (3+3+3+4+5+6)/6 =4. Which is the odds of what you would get on a min 3 on the first dice.


I think for me as a DM and a Player. I know you hit that crit, you hate seeing a 2 damage total roll for something like a longsword or something.
So however, the max first dice on a crit is also very deadly when its always going to be a big hit, as you can see avg is 19 for a GS. Thats like BOOM, so even if you get a "bad" crit, with max first on a GS, you looking at 14 damage, which is not massive for a GS crit, but it doesn't feel bad at all. But it also as a DM can be very harmful for people who are made as a crit fisher or when you have a lower-level party and crits can happen.

Personally, I think I would use the 1/2 rule because the min damage is the major factor. With the 1/2 (soft crit) rule, it would make it so min GS damage would be 8 damage instead of 4. This is where it really shines to me. It just feels so bad when you hit a crit and end up with 4 damage.

TheoGeek
July 19th, 2022, 20:36
It just feels so bad when you hit a crit and end up with 4 damage.

Agreed...Something just seems off about a fighter critting with a GS doing the same damage as a guy with a dart. :)

I get the whole random thing but c'mon man!

TheoGeek
July 21st, 2022, 01:26
OK, I updated to version 8.0 on the forge.

I added options for all damage dice (normal weapon damage dice, effect damage dice, critical damage dice, and special critical damage dice (from the Nat20 extension)) to set their modifiers to:

"Standard" : no modification
"Maximize" : set the die roll value to EQUAL the number of sides of the die rolled
"Raise Floor" : set the die roll value to be AT LEAST 1/2 of the number of sides of the die rolled
"Lower Ceiling" : set the die roll value to be AT MOST 1/2 of the number of sides of the die rolled

I tested it a lot and it worked for all my test cases.

If you find something odd, let me know!

Thanks for the suggestions!

MrDDT
July 21st, 2022, 05:00
This looks cool, I will have to check it out.

TheoGeek
July 21st, 2022, 05:14
Feedback is appreciated. :)

I'm also thinking about adding an option to do something with some random multiplier from like 10% to 100% where a crit would do like max weapon damage + some random percentage modifier of die rolls like this:

MAX/RAISE/LOWER(weapon damage) + (SUM(crit dice rolls) * RND(0.1 .. 1.0))

That would allow even more tweaking of critical damage. Default would be 100% (calculate critical damage normally)

Not sure how often it would be used, but it would be easy to implement.

TheoGeek
July 22nd, 2022, 09:33
OK, updated to 8.1 with a sort of preview function for critical dice only...if y'all like it, let me know and I can make the other damage types follow suit.

Basically, it's this: add more options for critical dice only: "Soft Criticals" (scale die rolls to a range of 1 - 50% of max), "Medium Criticals" (30%-70%), "Hard Criticals" (50% - max)

This differs from the "raise floor" and "lower ceiling" in that those two options don't scale the rolls to a new range, they simply force rolls to a certain min or max value (i.e, the roll profile for a d8 in a raise floor option just forces all results <4 to equal 4 (4,4,4,4,5,6,7,8). Where the "hard criticals" option scales the roll like this: 4,5,5,6,6,7,7,8.

So, the roll profiles for a d8 are:
Soft: 1,1,2,2,3,3,4,4
Medium: 3,3,4,4,5,5,6,6
Hard: 4,5,5,6,6,7,7,8

It's subtle, but it can make for some interesting combinations, and I can add an option to enter your own ranges as well. :)

Consider some of this a playground for you since there may be some overlap with how these options interact, but it'll give you more flexibility.

And, you can always set the options to "Standard" or "No" to return to the normal "rules as written" behavior.

Anyway, play around with it and let me know what you think.

And as always, if something's broken, let me know!

TheoGeek
July 23rd, 2022, 06:42
I think what they want (not what I'm asking for).

They want to make sure that the roll is going to meet the minimum of 1/2 the first dice of damage. IE. 1d8 would have to be a 4 or higher on the first roll.
So currently on a crit, you can do a 1d8 + 1d8, getting anywhere from 2 to 16 damage, using the first die at max (as the current setting), you could get a 9 to 16.
So instead of only the options of 2 to 16, or 9 to 16, they want min 1/2 on the first die. Which would be 5 to 16.

Personally, I don't see the need but I guess having it a little more refined slightly lower is maybe better for some.
Doing MAX + second die RNG might be to much for some.

TLDR
Current options are
2 to 16 or 9 to 16. They want the option for 5 to 16.

I didn't even think about this, but the extension also has an option to only max the first dice of each die group or only the first overall die rolled, such that a GS crit would look like this:

6 + (1,6) + 2d6 critical = 7-12 + 2d6

Then, with the soft/medium/hard critical dice:

6 + 1d6 + soft(2d6) = 7-12 + (1,3)+(1,3) = 7-12 + 2-6 = 9-18
6 + 1d6 + med(2d6) = 7-12 + (2,4)+(2,4) = 7-12 + 4-8 = 11-20
6 + 1d6 + hard(2d6) = 7-12 + (3,6)+(3,6) = 7-12 + 6-12 = 12-24

I'd love to run an Anydice simulation for all these cases to see what the probabilities are. :)

MrDDT
July 23rd, 2022, 07:22
Yeah I've been looking to test this in a game once I work out all the issues with the EXTs that broken after the last update to FGU.

Pretty much have my core EXTs fixed up so going to check this out soon.

TheoGeek
July 23rd, 2022, 17:36
Awesome!

I have a test version where I'm exploring different options for modifying the behavior of the "soft, medium, hard" ranges.

1) add these ranges as selectable for all damage types (weapon, effect, crit, and special)
2) add options to set the min/max percentages for each range (soft max, medium min, medium max, hard min)
3) add option to either scale or clip the inputs to those ranges (i.e. if the medium range is 3-6 on a d8, scaling could look like 1,2,3,4,5,6,7,8 => 3,3,4,4,5,5,6,6 but clipping would look like 1,2,3,4,5,6,7,8 => 3,3,3,4,5,6,6,6)

I haven't done any statistical analysis on any of this to see how it practically affects outcomes, and it seems kind of pointless for small dice, but hey... options!

TheoGeek
July 28th, 2022, 06:27
OK....here's a test version. I'd like feedback if you can give it. It's probably "option overload" but whatever. :)

Added the following:

"Damage (critical dice)"
[Standard]* - Does not maximize the critical dice
[Maximize] - Maximize extra critical dice
[Raise Floor] - use Floor to determine minimum damage (clips, doesn't scale)
[Lower Ceiling] - use Ceiling to determine maximum damage (clips, doesn't scale)
[Soft Criticals] - use Soft Critical Max and Damage Range Method to determine maximum damage
[Medium Criticals] - use Medium Critical Min/Max and Damage Range Method to determine maximum damage
[Hard Criticals] - use Hard Critical Min and Damage Range Method to determine minimum damage

"Damage (effect dice)"
[Standard] - Does not maximize the critical dice
[Maximize]* - Maximize extra critical dice
[Raise Floor] - use Floor to determine minimum damage (clips, doesn't scale)
[Lower Ceiling] - use Ceiling to determine maximum damage (clips, doesn't scale)
[Soft Criticals] - use Soft Critical Max and Damage Range Method to determine maximum damage
[Medium Criticals] - use Medium Critical Min/Max and Damage Range Method to determine maximum damage
[Hard Criticals] - use Hard Critical Min and Damage Range Method to determine minimum damage

"Damage (special critical dice)"
[Standard]* - Does not maximize the critical dice
[Maximize] - Maximize extra critical dice
[Raise Floor] - use Floor to determine minimum damage (clips, doesn't scale)
[Lower Ceiling] - use Ceiling to determine maximum damage (clips, doesn't scale)
[Soft Criticals] - use Soft Critical Max and Damage Range Method to determine maximum damage
[Medium Criticals] - use Medium Critical Min/Max and Damage Range Method to determine maximum damage
[Hard Criticals] - use Hard Critical Min and Damage Range Method to determine minimum damage

"Damage (weapon)"
[Standard] - Does not maximize the critical dice
[Maximize]* - Maximize extra critical dice
[Raise Floor] - use Floor to determine minimum damage (clips, doesn't scale)
[Lower Ceiling] - use Ceiling to determine maximum damage (clips, doesn't scale)
[Soft Criticals] - use Soft Critical Max and Damage Range Method to determine maximum damage
[Medium Criticals] - use Medium Critical Min/Max and Damage Range Method to determine maximum damage
[Hard Criticals] - use Hard Critical Min and Damage Range Method to determine minimum damage

"Damage Range 1 (Floor)"
[10%-90% of max] - (default 50%) For "Floor", set the minimum of the die damage to x% of the number of sides the die has

"Damage Range 2 (Ceiling)"
[10%-90% of max] - (default 50%) For "Ceiling", set the maximum of the die damage to x% of the number of sides the die has

"Damage Range 3 (Soft Max)"
[10%-90% of max] - (default 30%) For "Soft Criticals", set the maximum to x% of the number of sides the die has

"Damage Range 4 (Medium Min)"
[10%-90% of max] - (default 30%) For "Medium Criticals", set the minimum of the die damage to x% of the number of sides the die has

"Damage Range 5 (Medium Max)"
[10%-90% of max] - (default 70%) For "Medium Criticals", set the maximum of the die damage to x% of the number of sides the die has

"Damage Range 6 (Hard Min)"
[10%-90% of max] - (default 70%) For "Hard Criticals", set the minimum of the die damage to x% of the number of sides the die has

"Damage Range Method"
[Clip] - When computing a range, clip the damage at the min and max values (Floor and Ceiling always clip)
[Scale]* - When computing a range, scale the damage to evenly fit the min and max given the type of dice

There can be some overlap. For example, setting "Damage Range 1 (Floor)" to "50%" and using "Floor" as the damage type is the same as setting "Damage Range 6 (Hard Min) to "50%", "Damage Range Method" to "Clip", and using "Hard Criticals" as the damage type.

I was going to have it all as one option, but thought "hmmm...maybe someone wants to mix and match ranges. :)

MrDDT
July 28th, 2022, 07:57
Holy Moley!

The rabbit hole you've gone down. Like it.

mapleybacons
August 21st, 2022, 03:22
I'm going to go out on a limb and ask if you can incorporate the One D&D changes criticals please. (Or as much as you can.) :)

TheoGeek
August 21st, 2022, 03:45
I'm going to go out on a limb and ask if you can incorporate the One D&D changes criticals please. (Or as much as you can.) :)

I was actually thinking about doing this, I believe the changes are:

1) Spells cannot crit
2) Monsters cannot crit
3) Effects don't crit

I'm not sure how to do #1, mainly because I've never tried to distinguish between spells and weapon attacks. Might be possible.

I think #2 could be done by checking the source and target and see if the source is an NPC and the target is a PC and clear the crit flag in that case. I could also only check if the target is a PC which would disable any crit damage against any PC from any source, but I'm not sure if that's what's intended.

I think #3 could be handled by removing the critical damage dice from any source other than the weapon.

These changes would come for free if Smiteworks implemented them in the ruleset, but until they are officially released, there's no incentive for them to do that because they will likely change as the general consensus I've heard so far is that the One D&D Critical rules won't last through the playtesting and if they do, DMs aren't likely to use them.

It would be a neat coding exercise though. :)

I'll look into it.

mapleybacons
August 21st, 2022, 14:32
Woohoo! Good luck! :D

mapleybacons
September 3rd, 2022, 13:40
Second thoughts….

So, it looks like smiteworks would need to treat spell and weapon attacks separately to handle it properly, but in the mean time can we add CRITZEROED and CRITREMOVED to the critical dice, effect dice, special effect dice, and weapon dice options?

TheoGeek
September 5th, 2022, 01:10
Second thoughts….

So, it looks like smiteworks would need to treat spell and weapon attacks separately to handle it properly, but in the mean time can we add CRITZEROED and CRITREMOVED to the critical dice, effect dice, special effect dice, and weapon dice options?

First, some clarification:

1) the critical dice (green ones) are already affected by CRITZEROED and CRITREMOVED, so "CRITREMOVED critical" is the existing behavior
2) Special Critical dice don't generate green dice so wouldn't be affected. These are the critical types added by my Nat20 extension that aren't considered extra critical damage (green), but are added as normal damage if a critical hit is scored (like damage ignoring crit immunity, etc).
3) The only thing this would option would do is to choose between: removing all green dice, removing green dice added for weapon damage, or removing green dice added for effect damage

That said, the engine does not keep track of what source (effect or weapon) added what crit dice so, for example, in order to remove crit dice added for effect damage and keep crit dice added for weapon damage, I would have to parse all the dice and match an effect dice to the critical dice that was added for it. This could get everything out of whack if something else added an extra dice or something that was not accounted for.

For example, if a weapon had damage = 2d6 slashing + 1d8 fire and critted, it would do: 2d6 (slashing) + 2d6 (slashing, critical) + 1d8 (fire) + 1d8 (fire, critical). That case would be easier because each damage die maps to a critical damage die, however, there could be cases where those damage dice wouldn't match up right and critical dice could be removed that shouldn't be. I think it would typically be OK, but I wouldn't want to add something like that for fear of removing a critical dice that is supposed to be there.

The existing CRITZEROED and CRITREMOVED apply to all critical dice and remove all added critical damage dice (i.e. the green ones)

I could work on something like an "Experimental Options" that would do a "buyer beware" removal of effect criticals by simply matching damage types and removing that many green dice of the effect type, but that can get hariy pretty quickly.

In the example above, were you wanting options to select the damage to be:

1) "CRITREMOVED effects" = 2d6 slashing + 1d8 fire + 2d6 slashing, critical (in this case, the green 1d8 fire, critical dice would be removed)
2) "CRITREMOVED weapon" = 2d6 slashing + 1d8 fire + 1d8 fire, critical (in this case, the green 2d6 slashing, critical dice would be removed)

"CRITREMOVED critical" is the way it behaves now and results in 2d6 slashing + 1d8 fire.
"CRITREMOVED special critical" makes no sense given the definition of special criticals - they don't generate extra critical damage dice so it would never do anything.

Just trying to see what you are asking to see if it makes sense to do, and if it's robust given how you can't tell what source added the critical damage dice - they generally match up but I've not verified that in all cases, they would.

Thanks!
Jeff.

mapleybacons
September 5th, 2022, 04:46
I was not expecting such a detailed response! This makes a lot of sense, thanks. I guess we’re kind of at SmiteWorks’ mercy on this one.

But, still, thank you for all your work on this. I really appreciate it. :)

mapleybacons
September 19th, 2022, 20:12
FYI, getting a lua error when rolling damage for NPCs after setting "Disable critical damage dice" to "remove crit die". Setting it to "Force crits to 0" does not throw an error. Only shows up on the DM client, not players.

TheoGeek
September 19th, 2022, 20:13
Hmmm...I just ran it with my standard array of extensions and didn't get any LUA errors...which version shows up in the chat window when you load it? Also, could you try the attached "test" version from post #167 in this thread? I'm going to be committing that one to the forge probably today or tomorrow since I haven't run into any issues with it.

Also, what's the error you are getting?

Thanks!

mapleybacons
September 21st, 2022, 16:08
I did some testing with different extensions loaded. I get the same error every in all cases.

Normal load:
https://i.imgur.com/LPPgrww.jpg

"Isolated" with just a Improved Criticals and a theme:
https://i.imgur.com/L2VH5tz.jpg

Same, but with the beta from post#167: (I think these were the same version I had from the Forge?)
https://i.imgur.com/GlJl5mW.jpg

I did also unload the theme to check and got the same error.

TheoGeek
September 21st, 2022, 18:28
Ah, are you dragging damage to the target instead of rolling the damage? I never do that so I didn't see this. Until I get an update uploaded, you can avoid the error by rolling against a target instead of dragging the damage.

mapleybacons
September 21st, 2022, 19:02
I have the tokens targeted then drag rolls, damage, and effects to the chat/roll window usually. Will double clicking work?

TheoGeek
September 21st, 2022, 19:05
I have the tokens targeted then drag rolls, damage, and effects to the chat/roll window usually. Will double clicking work?

It should, but I *think* I fixed the issue. :) If you update the extension, dragging should work now. Let me know!

Fingersome
December 18th, 2022, 20:25
Do you think it would be possible to code a feature to disable critical hits from monsters, to embrace the design philosophy for the upcoming edition change? It'd be nice to be able to turn monster crits off.

mattekure
December 18th, 2022, 20:59
Do you think it would be possible to code a feature to disable critical hits from monsters, to embrace the design philosophy for the upcoming edition change? It'd be nice to be able to turn monster crits off.

Just give your players the effect “IMMUNE: critical”.

mattekure
December 18th, 2022, 21:28
Accidentally double posted

TheoGeek
December 19th, 2022, 19:06
This. Also a side effect is that One D&D effectively makes adamantine armor pointless.

Also, this method should be used because the One D&D rule basically limits critical hits to player's weapon attacks or unarmed strikes. Nothing else can crit so if you want to make sure you are covering the current crit rules of One D&D, adding "IMMUNE: critical" makes sure of that.

Fingersome
December 19th, 2022, 20:34
I am, as usual, a big dummy who overlooks the simple solution haha

TheoGeek
December 19th, 2022, 20:37
Ha! I overlook simple a lot too. :)

It'll be interesting to see how Fantasygrounds Incorporates these updates when/if they become canon and how that changes my extension.

WinterSoldier7
February 8th, 2023, 11:50
Thanks for the extension, is there a setting I can use so that PCs have their crits always above the average, but enemies can roll the full range?

I want players to be able to always hit average or higher, but enemies to have the possibility of rolling a crit and doing little damage.

TheoGeek
February 9th, 2023, 04:09
Without changing anything, enemies use the same settings as PCs, so I can look into changing that. If I did, I'd add an "enemies ignore settings" kind of setting because there are a few ways to get PCs to always do more damage...

1) you can use the "Raise Floor" option and set the floor to be 50% of the max which should cause damage to be (MaxPossible/2 to MaxPossible) so if crit was a greatsword, the damage would be [6,12] + 12 for a range of 18-24 on a crit. You can set the floor to any percentage from 10% to 90%.
2) you can use the "hard criticals" option and set the hard min to some percentage. This is effectively the same as raising the floor, but was added so you could set some values and forget about them and only change the damage calculation.

So there isn't a "Buff PC Damage" but using "Raise Floor" or "Hard Criticals" (or even "Medium Criticals"), you can achieve what you want.

Thanks!
Jeff.

--- Update ---
So, it's pretty straightforward to do this, the question is "what's the best way to structure the options?" because the damage is broken out into 4 categories. Do I want to have the same configurable options for NPCs as well (which would double the options and clutter the options dialog)

Since NPCs also have critical, effect, weapon, and special damage types, I'm inclined to just have one option for NPC damage to bypass the whole thing or apply the options as specified. That makes it easy. Note that "bypassing the whole thing" would still apply the remove/zeroize critical dice setting and only include the damage options.

With more effort, I could make 4 "mirrored" options for "NPC Damage (xxx dice)", but I'm thinking NPCs should be an all or nothing thing. Though it would be kinda cool to have the ability to "nerf" or "buff" NPCs too...now you got me thinking. :)

WinterSoldier7
February 10th, 2023, 14:30
I think I'm following you :P

If it helps to understand where I am coming from, I'm happy for my PCs to have a crit that does above average damage... but when an enemy did this in our last session and effectively wiped out a PC in one hit, I decided I'm ok for them to get a crit but roll low damage.

With that in mind, I guess my needs are met with an 'NPC ignore' option?

TheoGeek
February 11th, 2023, 00:09
OK, I went and did it. :) I'm testing now, but I changed a few things. There are now two new "global" options - "Apply damage to NPC crits" and "Apply damage to PC crits" which will enable/disable the damage modifiers for each type (critical, effect, special critical, and weapon) for NPCs or PCs respectively. I also changed the 4 damage types to now be separately modifiable for NPCs and PCs.

So, now, using the "Apply damage to xxx crits" option, you can enable/disable damage mods for NPCs, PCs, both, or neither independently.

It wasn't that hard actually because of how I have it set up.

Also, regardless of the "Apply damage to ..." setting, the "Apply to crit immune targets", "Disable critical damage dice", "Double Dice", and "Max Dice: First die only" options always apply across the board.

Should be available within a couple hours!

Thanks for the suggestion!
Jeff.

I attached a minimally tested version if you want to give it a go before I put it on the forge.

TheoGeek
February 11th, 2023, 19:07
OK, released 8.4 to the forge! It makes PC and NPC damage independently configurable. Enjoy!

TheoGeek
February 11th, 2023, 19:31
Oops...had to fix a stupid bug related to dragging damage from the chat window. 8.4.1 uploaded.

WinterSoldier7
February 13th, 2023, 13:13
Sorry, just coming back to this now. This is great - thank you for looking into it!

I think I have it set correctly now and can't wait to try it!

Edit; what does the universal Double Dice option do? I guess it should be self explanatory, but I have it turned off and still get double dice on crits - which is how I want it, but I thought perhaps this option isn't working as intended.

Mysteran
February 17th, 2023, 15:56
I love the extensions and am going to start using it in my Pathfinder 2E games so we can run crits RAW instead of the FG default of just having it roll more dice.

When testing with one of my players we noticed it works perfectly for weapon damage rolls but does not affect spell damage rolls at all. So right now we can only do weapon attack rolls as PF2 RAW.

TheoGeek
February 17th, 2023, 21:55
First off, thanks!

Next, I'll check on that. Do you know if it used to work with spell damage? I don't play PF2 so my testing in that environment is spotty at best. :)

To test spells in 5e, I use something like Eldritch Blast and that uses the modifiers in the options properly so there may be something different now in PF2?

Jeff.

LordEntrails
February 17th, 2023, 22:26
Great support, and even more impressive making this more configurable :)

TheoGeek
February 17th, 2023, 22:48
Thanks! And I just found that PF2 spell bug. I didn't realize that PF2 has a damage type of "spdamage" and sets up handlers for that. :) Uploading to the forge now.

Mysteran
February 18th, 2023, 00:27
Thanks! And I just found that PF2 spell bug. I didn't realize that PF2 has a damage type of "spdamage" and sets up handlers for that. :) Uploading to the forge now.

You are a saint! Thanks for the quick look and fix for that!

Edited to add:
Looks like the update was available on the forge so just grabbed it and initial testing looks like it works as expected for spells too. Going to be using it for the game tonight so I'll follow up with more feedback after the game.

TheoGeek
February 18th, 2023, 20:13
Going to be using it for the game tonight so I'll follow up with more feedback after the game.

Sweet. Any feedback, especially for PF2, is welcomed!

Mysteran
February 23rd, 2023, 00:03
Played late and forgot to post...

Spell and Weapon crit damage worked great for the PF2 game on Friday. Didn't see any issues with this extension.

Thanks again for that swift update for PF2 spell damage!

TheoGeek
February 25th, 2023, 00:39
Sorry, just coming back to this now. This is great - thank you for looking into it!

I think I have it set correctly now and can't wait to try it!

Edit; what does the universal Double Dice option do? I guess it should be self explanatory, but I have it turned off and still get double dice on crits - which is how I want it, but I thought perhaps this option isn't working as intended.

Sorry! Didn't see your edit!

That option doubles the damage that is rolled for the selected die type. For example, if you have it set to "Damage Dice" it would result in the following result for a greatsword (2d6 + 5 for example) on a critical hit:

Rolled : damage dice=3,5; critical dice=2,3; modifier=5: TOTAL DAMAGE = (3+5) + (2+3) + 5 = 18
Modified: damage dice=3*2+5*2; critical dice=2,3; modifier=5: TOTAL DAMAGE = (6+10) + (2+3) + 5 = 26

I did that so I could emulate 2E crits where the damage roll was doubled. To do that, set the "Disable Crit Damage Dice" to "Remove crit die" and the "Double Dice" to "Damage", in the above critical example, iit would then be:

Rolled: damage dice=3,5; critical dice are removed so they aren't even there; modifier=5: TOTAL DAMAGE = 13
Modified: damage dice=3*2,5*2; no crit dice; modifier=5: TOTAL DAMAGE = 21.

The "Double Dice" option is there, not to double the amount of dice rolled, but to double the damage that was rolled for the specified dice.

So, if you wanted the MASSIVE damage, you'd set that to "All" and MAX everything. :) Then, the above example would result in:

DOUBLE(MAX(2d6)) + DOUBLE(MAX(2d6)) + 5 = (12+12)+(12+12)+5 = 53

but you shouldn't do that hehe

Hope that's clearer than mud. :)

Actually, I'll change the name of that in a future release to something like "Double damage for..." or something - that would make it easier to understand.

claedawg
February 26th, 2023, 01:05
Critical button is throwing an error.
[2/25/2023 6:59:21 PM] s'[Warning] 'AutoFlankingAndRange' Unknown range between the source and target' | databasenode = { combattracker.list.id-00001 } | nil
[2/25/2023 6:59:21 PM] s'[Warning] 'AutoFlankingAndRange' Unknown range between the source and target' | databasenode = { combattracker.list.id-00010 } | nil
[2/25/2023 6:59:21 PM] s'[Warning] 'AutoFlankingAndRange' Unknown range between the source and target' | databasenode = { combattracker.list.id-00008 } | nil
[2/25/2023 6:59:21 PM] s'[Warning] 'AutoFlankingAndRange' Unknown range between the source and target' | databasenode = { combattracker.list.id-00001 } | nil
[2/25/2023 6:59:21 PM] s'[Warning] 'AutoFlankingAndRange' Unknown range between the source and target' | databasenode = { combattracker.list.id-00012 } | nil
[2/25/2023 6:59:21 PM] s'[Warning] 'AutoFlankingAndRange' Unknown range between the source and target' | databasenode = { combattracker.list.id-00019 } | nil
[2/25/2023 6:59:21 PM] s'[Warning] 'AutoFlankingAndRange' Unknown range between the source and target' | databasenode = { combattracker.list.id-00009 } | nil
[2/25/2023 6:59:21 PM] s'[Warning] 'AutoFlankingAndRange' Unknown range between the source and target' | databasenode = { combattracker.list.id-00006 } | nil
[2/25/2023 6:59:32 PM] [ERROR] Script execution error: [string "..ek-ImprovedCritical:..mprovedCritical.lua"]:398: attempt to call field 'getReductionType' (a nil value)
[2/25/2023 7:00:04 PM] [ERROR] Script execution error: [string "..ek-ImprovedCritical:..mprovedCritical.lua"]:398: attempt to call field 'getReductionType' (a nil value)

claedawg
February 26th, 2023, 01:54
Oddly enough, criticals work when you have the MAX button clicked. It is effecting all critical rolls and not applying any damage (does not show on the console either).

TheoGeek
February 26th, 2023, 08:31
What version of the extension are you using? I ask because I took that "getReductionType" function call out like a year ago, and the version where it was at line number 398 was from almost 2 years ago.

You should be on version 8.4.2...it looks like you have version 5.2 or something.

claedawg
February 26th, 2023, 13:07
Gotcha. Look like I do have 2 versions in the load screen. I have the 5.2 loaded. There is another one available that just has the name and no version. I think I had downloaded one from the forums a long time ago and then got it again when the forge came online. I thought I had tested these out a while back and was getting issues with the other. Let me try switching them out and seeing if that works. Sorry for any confusion. Thanks!


UPDATE: I had the wrong one loaded. I can't see to find where I have both extensions downloaded. I only see the one in the extension folder. Does Forge download to a different folder?

TheoGeek
February 26th, 2023, 14:50
The Forge should put this in the "extensions" folder. If I were you, I would delete the .ext files. If you downloaded it from the forums AND have it owned on the forge, there might be two files:

Theogeek-ImprovedCritical.ext
5E-Theogeek-ImprovedCritical.ext

Also, make sure you don't have any of those unzipped into a folder.

I renamed it to drop the "5E-" part a long time ago.

But if you delete both of those , the next time you press the "Check For Updates" button on the FGU launcher, it'll fetch the latest version.

I have no idea why you have one that looks like it doesn't have a version...I've had versions on that for a very long time.

Let me know if that fixes the version thing...and you may need to do that with all of your extensions if you've downloaded them from the forums and the Forge.

Later!
Jeff.

Jestertrek
March 9th, 2023, 05:19
Noting the problems with the old Improved Critical with the new FGU, for the first time, I downloaded and installed this extension from the Forge (thank you for the extension, BTW, it's great!). But it doesn't seem to be "on". I see Fantasy Grounds Updater pick it up, I see it Enabled in my Inventory, I see the Theogeek-ImprovedCritical.ext in the /extensions folder, but I no longer get the text notification in the chatbox when I start up FGU, and it doesn't seem to be active. Is there another step I need to follow to "turn it on", as it were?

Thanks in advance for assistance!

TheoGeek
March 9th, 2023, 21:05
Noting the problems with the old Improved Critical with the new FGU, for the first time, I downloaded and installed this extension from the Forge (thank you for the extension, BTW, it's great!). But it doesn't seem to be "on". I see Fantasy Grounds Updater pick it up, I see it Enabled in my Inventory, I see the Theogeek-ImprovedCritical.ext in the /extensions folder, but I no longer get the text notification in the chatbox when I start up FGU, and it doesn't seem to be active. Is there another step I need to follow to "turn it on", as it were?

Thanks in advance for assistance!

If you aren't seeing the text in the chat box with the "Theogeek's Improved Critical v8.4.2 for 5E/PFRPG2 ruleset." that means it's not loaded. If you are selecting it when you load your campaign and it's still not showing up, and there's no error in the console (which would pop up automatically if there were), then there's a problem with your setup or something...not sure what that would be.

Assuming you are seeing that, there is a setting in the "Options -> Improved Critical: PC Damage -> Apply modifiers?" that needs to be set to "Yes" in order for any of the other options to enable for PC attacks.

Also, unless you have the option "Apply to crit immune targets" set to "Yes", if the target has the effect "IMMUNE:critical", none of the modifications will get applied either.

So, are you actually selecting it when you load your campaign from the "Extensions" box?

Jestertrek
March 9th, 2023, 21:36
So, are you actually selecting it when you load your campaign from the "Extensions" box?
Duh. I'd completely forgotten that was a thing. Yep, that was it and it's working great. Thanks for your help (and the extension!)!

TheoGeek
March 9th, 2023, 21:38
Duh. I'd completely forgotten that was a thing. Yep, that was it and it's working great. Thanks for your help (and the extension!)!

HA! No worries! I've been known to do things like that before. Even recently. :)

Enjoy!

JohnQPublic
May 30th, 2023, 00:45
Create new Pathfinder 2e campaign. Enable Theogeek's Improved Critical. Get error on load.

[5/29/2023 4:42:31 PM] [ERROR] Script execution error: [string "..ek-ImprovedCritical:..mprovedCritical.lua"]:441: attempt to index global 'ActionDamage' (a nil value)

It does show up in the chat window as 8.4.2

TheoGeek
May 30th, 2023, 00:54
Thanks for the report! I'll get on it!

UPDATE:

I was able to create a new PF2 campaign with only that extension and continue an already created PF2 campaign with multiple other extensions with no error on startup and it functioned as expected on a critical hit.

What other extensions are you running with (it looks like one of them is redefining ActionDamage in a way that others don't which is causing it to not be defined when my extension runs.)

JohnQPublic
May 30th, 2023, 06:14
Was a corrupt ruleset pak on my side. Deleted, updated and all good now. Thanks for the quick response!

TheBluePsion
August 25th, 2023, 22:15
Hi there! Using the PF2e ruleset and just added a Rogue with a Deadly weapon. Instead of using the GM optional "alternate" method of calculating critical hits (which is better for single-target and lower level use), I'm wanting to use the "default" method of doubling the results. The Improved Initiative extension achieves this, and properly doubles Sneak Attack damage, but seems to be doubling extra damage from things like the Deadly weapon trait, and that damage shouldn't get doubled. I'm not sure about the Fatal trait, but I believe that works the same way, and applies after damage/dice are doubled. "Benefits you gain specifically from a critical hit" (CRB p.451) is what distinguishes which dice get doubled.

Thanks!

TheoGeek
August 26th, 2023, 05:57
Thanks for the report!

I might not be able to get to this this weekend, but I'll check into it...also, PF2e isn't a strong suit of mine so I may need help interpreting the rules. This sounds like a special case thing that is an effect, but applies differently than other effects?

TheBluePsion
August 26th, 2023, 21:09
Sure thing, thanks for looking into it. Here's the relevant text from the PF2e CRB:

Doubling and Halving Damage
Source Core Rulebook pg. 451 4.0
Sometimes you’ll need to halve or double an amount of damage, such as when the outcome of your Strike is a critical hit, or when you succeed at a basic Reflex save against a spell. When this happens, you roll the damage normally, adding all the normal modifiers, bonuses, and penalties. Then you double or halve the amount as appropriate (rounding down if you halved it). The GM might allow you to roll the dice twice and double the modifiers, bonuses, and penalties instead of doubling the entire result, but this usually works best for single-target attacks or spells at low levels when you have a small number of damage dice to roll. Benefits you gain specifically from a critical hit, like the flaming weapon rune’s persistent fire damage or the extra damage die from the fatal weapon trait, aren’t doubled.

IMO, FGU should work this default way right out of the box. But yes, damage dice from things like Deadly and Fatal weapon traits should be rolled after crit damage is doubled, so those extra dice do not get doubled, while other dice like from Sneak Attack do.

Let me know if this makes sense I'm happy to help figure this out however I can.

TheoGeek
September 16th, 2023, 03:37
Sorry it's taking me so long to get back to this!

So, PF2 distinguishes between weapon traits and effects? How are those weapon traits accounted for in "standard" PF2 rules with no extensions?

Sorry...unfamiliar with PF2 rulesets... :)

If you could give me an example of a couple of different weapons that would be "deadly" on a character with Sneak Attack, that would help!

Thanks!

TheBluePsion
September 19th, 2023, 18:23
So for the Deadly trait as an example, see here for rules and a list of ALL weapons with that trait: https://2e.aonprd.com/Traits.aspx?ID=174

A very common weapon here would be the rapier. So a Rogue with a rapier, getting sneak attack, on a critical hit, would roll 1d6 for the rapier, 1d6 for sneak attack, and add ability score bonus. This sum gets doubled. THEN, another 1d6 is rolled for Deadly, and added.

So if they rolled a 3 on the rapier, 4 on sneak attack, and have a +5 DEX bonus, that'd be 12, which is doubled to 24. Then a roll of 6 for Deadly, which isn't included in the doubling, bumps that up to 30 total damage.

I hope this is helpful, but unfortunately I ultimately decided to migrate over to Foundry, which is much more out-of-the-box compatible with the base, default mechanics in PF2e.

Mysteran
November 17th, 2023, 02:14
FantasyGrounds recently updated Pathfinder 2 ruleset that will likely need a small extension update.

The new Pathfinder 2E Remaster ruleset is now the base PFRPG2 ruleset.
The pre-remaster ruleset is now named PFRPG2-Legacy. Would it be possible to update the extension to also include the PFRPG2-Legacy ruleset so we can continue using it if we don't upgrade to Remaster yet?

TheoGeek
November 17th, 2023, 05:07
FantasyGrounds recently updated Pathfinder 2 ruleset that will likely need a small extension update.

The new Pathfinder 2E Remaster ruleset is now the base PFRPG2 ruleset.
The pre-remaster ruleset is now named PFRPG2-Legacy. Would it be possible to update the extension to also include the PFRPG2-Legacy ruleset so we can continue using it if we don't upgrade to Remaster yet?

Thanks for the heads up!

I may not get to this till Saturday, but I'll try!

TheoGeek
November 17th, 2023, 20:09
Version 8.5 uploaded to the forge...has 5E, PF2, and PF2-Legacy support. I haven't really tested out the functionality for PF2/PF2-Legacy beyond "Yup, it adds the crit damage like I'd think it should", but I'm no PF2 expert. If you see anything goofy, let me know!

Smoltok
February 27th, 2024, 00:14
Hi, I have a question about weapon with double dice. It seems not to work properly. I have to use some trick such as :
59950

TheoGeek
February 27th, 2024, 04:24
Hmmm... I'll take a look tomorrow, but last time I checked, it worked with something like a greatsword.

What settings are you using, and what is showing up in the chat window for damage?

===

Update: I just tested it and it works fine. Greatsword normal hit does 2d6 damage and a critical hit does MAX(2d6) + 2d6.

roflmike
March 27th, 2024, 01:46
You aren't forgetting to select it when you start your campaign are you? :) That's neeeeever happened to me. hehe

This is the way. Thanks for the help.

WinterSoldier7
April 25th, 2024, 20:19
Don't suppose someone could help me get to the result I'm looking for?

I've had this extension for a long time, but recently decided I want the following:

PC
- First die is max, all other rolls as normal

NPC
- All roll as normal, but with a roof of 80%

This is what I currently have, but isn't working:

60669

TheoGeek
April 25th, 2024, 22:57
Hey WinterSoldier7!

Thanks for using this extension!

I set up a scenario with the settings in your screenshot, and I'd offer this instead:

60671

One issue is that the "first dice" setting is universal - it applies to both PCs and NPCs. I'll look into changing that because I don't think you can do what you want to do with that. It's also poorly named - "Max" in this context means "Apply the modifications". I'll certainly change that to "Modify Dice:" as I look into moving that into the PC and NPC sections.

The second issue is that by setting the Damages in the PC Damage section to "Standard", you are defaulting to the 5e rules for criticals and not applying any of the settings to the roll. If you only want to apply the modifications to the first weapon die and nothing else, you'd set the "Max Dice: First die only" to "Overall" and in the PC Damage section, set it to "Yes", "Standard", "Standard", "Standard", "Maximize". That way, the only die that actually gets modified is the very first weapon die, and it gets maximized.

If I get the "Max Dice" setting moved to be separately configurable, I think that would solve the biggest of your issues. I'll see what I can do!

TheoGeek
April 25th, 2024, 23:51
OK, I got something up. Version 8.6 moved the "Max Dice: First die only" to "Modify Dice: First die only" and I made it distinct under the PC and NPC section.

So, you should be able to do what you want now. :)

Just make the settings like this:

PC Damage Section:
Apply Modifiers: Yes
Damage (critical dice): Standard
Damage (effect dice): Standard
Damage (special critical dice): Standard
Damage (weapon dice): Maximize
Modify Dice: First die only: Overall

NPC Damage Section:
Apply Modifiers: Yes
Damage (critical dice): Medium Criticals (or preferably Lower Ceiling and set Damage Range 2 (Ceiling) to 80%)
Damage (effect dice): Medium Criticals (or preferably Lower Ceiling and set Damage Range 2 (Ceiling) to 80%)
Damage (special critical dice): Medium Criticals (or preferably Lower Ceiling and set Damage Range 2 (Ceiling) to 80%)
Damage (weapon dice): Medium Criticals (or preferably Lower Ceiling and set Damage Range 2 (Ceiling) to 80%)
Modify Dice: First die only: No

Let me know if this works for you!

Fingersome
April 26th, 2024, 03:13
Looks like there is a conflict somewhere with the Damage Reroll Feats for 5e (https://www.fantasygrounds.com/forums/showthread.php?79537-Damage-Reroll-Feats-for-5E) extension... it doesn't break anything horrendously, but I don't believe that your extension works when both are installed for whatever reason. Not a complaint, just an observation as someone who uses a lot of extensions. :)

TheoGeek
April 26th, 2024, 03:16
Good to know. I don't have that extension but I do use a ton and I haven't run into any issues. Not doubting that some exist tho. Can you explain what's going on - that might give me a clue as to where to look and maybe I can send you some debug versions if you're willing.

WinterSoldier7
April 26th, 2024, 20:11
OK, I got something up. Version 8.6 moved the "Max Dice: First die only" to "Modify Dice: First die only" and I made it distinct under the PC and NPC section.

So, you should be able to do what you want now. :)

Just make the settings like this:

PC Damage Section:
Apply Modifiers: Yes
Damage (critical dice): Standard
Damage (effect dice): Standard
Damage (special critical dice): Standard
Damage (weapon dice): Maximize
Modify Dice: First die only: Overall

NPC Damage Section:
Apply Modifiers: Yes
Damage (critical dice): Medium Criticals (or preferably Lower Ceiling and set Damage Range 2 (Ceiling) to 80%)
Damage (effect dice): Medium Criticals (or preferably Lower Ceiling and set Damage Range 2 (Ceiling) to 80%)
Damage (special critical dice): Medium Criticals (or preferably Lower Ceiling and set Damage Range 2 (Ceiling) to 80%)
Damage (weapon dice): Medium Criticals (or preferably Lower Ceiling and set Damage Range 2 (Ceiling) to 80%)
Modify Dice: First die only: No

Let me know if this works for you!


Just came back to this and did not expect you to have replied so fast, let alone been so generous with your time and effort!

This now looks to do exactly what I wanted it to do. Very much appreciated, thank you!

TheoGeek
April 27th, 2024, 05:33
Just came back to this and did not expect you to have replied so fast, let alone been so generous with your time and effort!

This now looks to do exactly what I wanted it to do. Very much appreciated, thank you!

You're very welcome!