PDA

View Full Version : Damage Reroll Feats for 5E



lprchaun
November 9th, 2023, 19:38
In Fantasy Grounds Unity, rerolling damage using the feats Savage Attacker and Piercer cannot be done with just effects. The user must roll the damage and reroll what is needed, then the host must move the correct damage to the corresponding target.

This extension automates the use of these feats.



When damage is rolled, this extension will check if the Combatant has the Savage Attacker and/or Piercer feat. It will then check if the attack is from a melee weapon for Savage Attacker and if the attack does piercing damage for Piercer.

As the feats can only be used once per turn, it will also check if the combatant has used the feat this turn. Because of this, the combat tracker needs to be used as intended as the feat use will reset when the Next Actor button is pressed.

The damage will be rolled, then a window will pop up asking if the user wants to use the corresponding feat.



If the user presses the Checkmark for Savage Attacker, then the damage from the weapon (not including extra damage from other effects, etc. per the feat) will be rerolled and the highest damage will be applied to the target(s).



If the user presses the Checkmark for Piercer, then the die corresponding to the damage dice that will benefit the most from a reroll will be rerolled and the correct damage will be applied to the target(s).


Damage reroll in weapon properties will be applied every time it is supposed to be applied

https://forge.fantasygrounds.com/shop/items/1455/view

Zacchaeus
November 9th, 2023, 19:51
You may want to add a link to your extension :D

lprchaun
November 9th, 2023, 20:13
I am getting there thanks. lol.
Have to get it on Forge and post the link to this post on it. then post the link to forge in this post.
Just getting it all together.

ProPreBefore
November 11th, 2023, 02:35
I purchased this and don't see it in the extensions listing. What's the name, or is there another way to enable the extension?

Zacchaeus
November 11th, 2023, 08:37
I purchased this and don't see it in the extensions listing. What's the name, or is there another way to enable the extension?

Did you update FGU after you made the purchase?

Trenloe
November 11th, 2023, 08:45
Moved this thread to the Paid Creations sub-forum - any creation that has a purchase cost should be posted in this sub-forum, as per these rules: https://www.fantasygrounds.com/forums/showthread.php?61018-Rules-for-advertising-Read-First!

lprchaun
November 11th, 2023, 13:27
I purchased this and don't see it in the extensions listing. What's the name, or is there another way to enable the extension?

Damage Reroll Feats
I put that it is in Test phase on Forge. Does anyone know if that changes how it applies to purchasers?


Changed from test phase

ProPreBefore
November 11th, 2023, 14:13
Yes sir.

Trenloe
November 11th, 2023, 14:16
I put that it is in Test phase on Forge. Does anyone know if that changes how it applies to purchasers?
It means it's only available to someone who's running there FG install in the test channel - only recommended if they're specifically taking part in any ongoing beta testing.

Best to put your forge product in live - it's expected you've tested it before making it available in the Forge.

Tooting Dog
November 11th, 2023, 18:55
[Edit] It now shows in Extensions when loading a campaign. I should have actually logged into FGU this morning before typing what was only valid for last night. I hate the taste of my foot.

ProPreBefore
November 11th, 2023, 21:36
It's working great. Thank you for this. It will save a ton of time.

Trenloe
November 14th, 2023, 00:28
@lprchaun - please stop posting links to this thread in other threads. Refer to the paid creations rules I posted a link to in post #6 of this thread - namely "Items which are not free should not be posted to any other thread on the forums."

I’ve removed your posts in other threads.

lprchaun
November 14th, 2023, 01:55
Thanks. I'm sorry.

Fingersome
April 19th, 2024, 00:34
Seems there's a conflict between this and Theogeek's Improved Critical (https://www.fantasygrounds.com/forums/showthread.php?61376-5E-Theogeek-s-Improved-Critical). It doesn't break anything crazily; but the crits ignore his extensions parameters completely.

lprchaun
April 19th, 2024, 02:23
Extensions like these have to utilize a method that supercedes what FGU normally does without breaking what it needs to do.
If there are two things that are modifying the same thing they might not be able to coexist.
I will look into it tonsee if anything can be done

MrDDT
April 19th, 2024, 07:27
Are there currently only 2 reroll damage options for this ext right now? Or is there ways to customize others or are others being added?

lprchaun
April 19th, 2024, 18:49
I programmed these for 5E feats.
What other damage reroll options are you talking about?

TheoGeek
April 26th, 2024, 03:25
Extensions like these have to utilize a method that supercedes what FGU normally does without breaking what it needs to do.
If there are two things that are modifying the same thing they might not be able to coexist.
I will look into it tonsee if anything can be done

Hello! I just got a notification that our extensions collide in some ways. I'd be willing to look into it as well but I don't have your extension. My extension does have wrappers around onDamageRoll, onDamage, and modDamage, but they are set up like this:

-------------------------------------------------------------
-- Name: onInit()
-- Description:
-- This function initializes the option menu items and
-- sets up the handlers.
-------------------------------------------------------------
function onInit()
registerOptions()

ActionDamage.onDamageRoll_IC_External = ActionDamage.onDamageRoll
ActionDamage.onDamageRoll = onDamageRollWrapper
ActionsManager.registerPostRollHandler("damage", ActionDamage.onDamageRoll)

ActionDamage.onDamage_IC_External = ActionDamage.onDamage
ActionDamage.onDamage = onDamageWrapper
ActionsManager.registerResultHandler("damage", ActionDamage.onDamage)

ActionDamage.modDamage_IC_External = ActionDamage.modDamage
ActionDamage.modDamage = modDamageWrapper
ActionsManager.registerModHandler("damage", ActionDamage.modDamage)

-- PF2 uses a spell damage handler. Use a custom ruleset init function for it.
ImprovedCritical_ruleset.init()
end

which allows my code to use the wrapper and then call whatever function was assigned to those names when it was executed.

lprchaun
April 26th, 2024, 22:24
Yes, also use the Wrappers. I am guessing the problem comes into play because of two extensions using onDamage/onDamageRoll wrappers.

I ahve been extremely busy with my real job and have been unable to look into this more deeply. sorry and will get on it as soon as I can.

TheoGeek
April 26th, 2024, 22:37
Cool. No worries. I'll help with my extension if you need it. :)

lprchaun
July 22nd, 2024, 15:24
I would like to apologize for this taking so long. Life got in the way.
I am now able to work on this and with the help of TheoGeek, I believe I have figured out hot to get my extension to work with his and other extensions.
I should be able to upload the update soon.

Thanks for your patience.

lprchaun
July 23rd, 2024, 19:15
The Damage Reroll Feats extension has been updated.
With help from TheoGeek I have been able to make it work with his extension and it should now hopefully behave with any other extension that hasn't been tested as well.

Thanks again to TheoGeek and for everybody's patience.

Fingersome
July 25th, 2024, 01:33
The Damage Reroll Feats extension has been updated.
With help from TheoGeek I have been able to make it work with his extension and it should now hopefully behave with any other extension that hasn't been tested as well.

Thanks again to TheoGeek and for everybody's patience.

Great news!
I've tried it out, and everything seems to be working okay, but with one small problem

When testing with a rogue with both the savage attacker and piercer feats, it seems to deal damage when you roll damage against a target, instead of waiting to check if you want to reroll - but it then also asks if you want to reroll with piercer and deals damage *again*. Essentially rather than rerolling the damage using piercer, it rolls the dice again and simply adds that as additional damage on top of the savage attacker damage roll. Screenshot included to show you what I mean.

61386

In the attached image, the yeti *should* have taken only 10 damage, but instead, it took 21.

I've confirmed the behaviour isn't due to other extensions, by running an instance with just Theogeeks Improved Criticals and this extension loaded.

lprchaun
July 26th, 2024, 00:00
Great news!
I've tried it out, and everything seems to be working okay, but with one small problem

When testing with a rogue with both the savage attacker and piercer feats, it seems to deal damage when you roll damage against a target, instead of waiting to check if you want to reroll - but it then also asks if you want to reroll with piercer and deals damage *again*. Essentially rather than rerolling the damage using piercer, it rolls the dice again and simply adds that as additional damage on top of the savage attacker damage roll. Screenshot included to show you what I mean.

61386

In the attached image, the yeti *should* have taken only 10 damage, but instead, it took 21.

I've confirmed the behaviour isn't due to other extensions, by running an instance with just Theogeeks Improved Criticals and this extension loaded.


I think the damage message is confusing...it actually removes the previous damage and applies the new damage. TheoGeek found a couple of other bugs so I am fixing it now. I am rolling back the version for now so it applies the damage correctly, but it will make TheoGeeks extension fail again.
However, I am working hard on this now and should have it fixed soon.

Fingersome
July 26th, 2024, 05:14
I think the damage message is confusing...it actually removes the previous damage and applies the new damage. TheoGeek found a couple of other bugs so I am fixing it now. I am rolling back the version for now so it applies the damage correctly, but it will make TheoGeeks extension fail again.
However, I am working hard on this now and should have it fixed soon.

Righto! I appreciate all your hard work...! <3

lprchaun
July 31st, 2024, 23:57
Righto! I appreciate all your hard work...! <3

EUREKA!

I got it working. it is uploaded now.

Fingersome
August 1st, 2024, 01:47
EUREKA!

I got it working. it is uploaded now.

Huzzah!

Fingersome
August 1st, 2024, 02:20
Once again tested, and found it not to be working as intended, with both extensions installed (but no others).

There are two issues I can see:
1) It does not take into account critical hits you land on the same turn after you use savage attacker / piercer, meaning they don't get maximised as they should with Theogeek's Improved Criticals.
2) It does not allow me to use both Savage Attacker AND Piercer on the same damage roll to reroll the damage rolls with Piercing damage, when the character has both feats.



Sorry to be the bearer of bad news always, but if you keep working on it I shall continue to test it o7

lprchaun
August 1st, 2024, 21:36
Once again tested, and found it not to be working as intended, with both extensions installed (but no others).

There are two issues I can see:
1) It does not take into account critical hits you land on the same turn after you use savage attacker / piercer, meaning they don't get maximised as they should with Theogeek's Improved Criticals.
2) It does not allow me to use both Savage Attacker AND Piercer on the same damage roll to reroll the damage rolls with Piercing damage, when the character has both feats.



Sorry to be the bearer of bad news always, but if you keep working on it I shall continue to test it o7



thank you for testing.
1. I was testing this and it seemed to work for me. I will look into it.

2. As for the Savage AND Piercer, I am not having any problems with that part. It will ask if you want to do the Savage Attacker first, then will ask about the Piercer

lprchaun
August 1st, 2024, 22:05
Just uploaded new version. again.