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. :)