PDA

View Full Version : Free 5E extension to prompt the GM when reaction is triggered.



illahad
November 13th, 2023, 07:27
Hello everyone!

I made an extension to solve my problem, and I think it may be useful for others as well. The problem is that while I like to use complicated monsters, for example those from MCDMs “Flee, Mortals!” or The Tome of Beasts or Monsters Menagerie, I constantly forget about all the reactions they have. So many times my players had a much easier time that it could be only because I forgot that the monster explodes on death, or can intervene when its ally is attacked etc.

So the extension now takes care of this for me. Then an NPC is added to the combat tracker, it parses the text of its traits and reactions and keeps an index of them. And when the proper trigger happens, it makes sure that monster is not incapacitated and that it can see the target if the reaction requires it and so on. And if everything is fine - a message appears in the chat, with the link to the reaction text. Oh, my players are going to suffer now, mwahahahaha! Just kidding, I love my players :)

59274 59275

You can get the extension for free in the Fantasy Grounds Forge (https://forge.fantasygrounds.com/shop/items/1463/view) or on GitHub (https://github.com/IvanKostruba/Prompt-Reaction)

PS. If you want to report that something is not parsed, please attach the exact wording of a trait or reaction. As a workaround, you can try to change wording to a more standard, e.g. if “when the monster is dealt damage” is not parsed, try “when the monster takes damage”

illahad
November 14th, 2023, 17:55
Version 1.0.1 is now out, with the following changes:

* Start Turn reactions now only triggered by PCs to reduce noise

* New trigger supported: The monster suffers a crit. Typical wording is "when a creature scores a critical hit against the monster_name" or "when the monster_name suffers a critical hit".

* Monster fails an attack. Typical wording is "when the monster_name fails an attack roll" or "monster_name misses with an [possibly melee|ranged] attack"

* Creature regains hit points. The wording is practically that.

rocketvaultgames
November 14th, 2023, 20:44
This seems awesome so far. I'm pretty bad at remembering to Parry with the NPCs...

The only downside I'm seeing is that it is checking NPCs that are in the CT but not currently displayed in the CT due to being in a hidden Combat Group a la https://forge.fantasygrounds.com/shop/items/154/view.

Is there any way you can make it only announce available reactions for actors currently displayed in the CT?

I know Legendary Assistant (https://forge.fantasygrounds.com/shop/items/590/view) had an issue like this at first as well, but was able to be changed to play nice with Combat Groups.

Thanks much!

illahad
November 14th, 2023, 21:20
Thanks for bringing this to my attention. I'll try to look into that, but I don't use the former extention myself, so I cannot test, but I guess I'll take a look at the latter's code.

I guess, this is different from a creature being hidden, right?

I also want to find a way to detect spellcasting as there are many creatures what do something when someone casts a spell, but the FG doesn't really mark spell-related actions internally as it seems.

rocketvaultgames
November 14th, 2023, 21:32
It is not the same as just having visibility toggled off in the CT. The actor is in a group (from Combat Groups ext) that can be toggled visible/invisible in the combat tracker for the GM.

This allows you to have multiple encounters (and parties) all staged in the combat tracker with their effects and tokens on maps, but then hide them so you are only seeing what you want at any given time.

I'm happy to answer any questions or help test.

Thanks much for your consideration.

MrDDT
November 15th, 2023, 06:19
Thanks for bringing this to my attention. I'll try to look into that, but I don't use the former extention myself, so I cannot test, but I guess I'll take a look at the latter's code.

I guess, this is different from a creature being hidden, right?

I also want to find a way to detect spellcasting as there are many creatures what do something when someone casts a spell, but the FG doesn't really mark spell-related actions internally as it seems.

Also work, thank you so much for this.

I know BCEG (Better Combat Effects Gold) does detect spell casting, maybe talk to the author in that.

illahad
November 15th, 2023, 08:01
Version 1.0.2 is out, changes are:

Added two configuration settings -
"Notify for hidden tokens": now you can hide notifications for combatants, hidden in the combat tracker
"Notify in hidden Combat Groups": compatibility option for "Combat Groups" extension, allows to turn off notifications for unseen combat groups.

@mattvictim -- please check for updates go get the version 1.0.2 and you should be fine. If it doesn't work -- please let me know.

rocketvaultgames
November 15th, 2023, 15:06
Looks perfect now. Thanks!!

Not terribly important, but just to let you know that this exists if you want to have it show updates for your extensions: https://forge.fantasygrounds.com/shop/items/726/view

illahad
November 15th, 2023, 16:48
Great! And thanks for the hint.

illahad
November 17th, 2023, 22:03
Hello everyone!

I'm happy to say that version 1.1.0 is out with the following features:

* Now it can handle distances! If you use a grid, and the reaction says "within X feet", the extension will measure fow far the involved tokens are apart and notify you if the distance is too long.

* Another QoL improvement is that "Parry" style reactions got special handling. The extension will tell you, whether applying the bonus is enough to deflect the triggereing attack or not.

I hope you will like these changes. Cheers!

illahad
November 18th, 2023, 15:46
Hello again,

Today, version 1.1.1 is released, that added the parsing and detections of spellcasting. So reactions like "When a creature that the monster can see casts a spell" will trigger messages when a PC casts a spell.

With this, I implemented everything that I planned, so active development is over, but feel free to post suggections or bug reports.

Cheers!

Naimed
November 20th, 2023, 13:20
Awesome extension! Thank you very much!

I know this is a lot to ask but.. could you give me a hand with an extension that I need? I think it should be fairly simple.. I've send you a DM :ninja:.
Thanks!!

illahad
November 20th, 2023, 17:34
Thanks, I'm happy that it's useful.

Sure, I'll check DM and see what you've got.

MrDDT
December 11th, 2023, 18:29
@illahad
Thank you for this great ext, I've noticed that whenever someone is resistance to something, it will throw out the chat "Total mismatch in damage type totals"

I'm guessing this is some left over debugging or something from this ext.

I attached a picture.
https://www.fantasygrounds.com/forums/attachment.php?attachmentid=59456&d=1702319313


Also noticing that the first attack/damage roll of a session start is showing the triggers for all reactions of people in the CT, is this behavior meant to be like this and not able to detect to only show when its triggered?

illahad
December 11th, 2023, 18:44
@illahad
Also noticing that the first attack/damage roll of a session start is showing the triggers for all reactions of people in the CT, is this behavior meant to be like this and not able to detect to only show when its triggered?

Thank you for trying it out!

This latter behavior is expected as the extension scans the NPCs that remained in CT from the previous session when a reaction may be triggered (attack, damage or save is rolled or PC starts turn) or when you add an NPC to the CT. If you don't want to see reports regarding the scan results, you can turn it off with "Report parsing results" option (but then you will not see how an NPC is parsed when it added to CT as well).

Regarding the "Total mismatch" message, I assume it does no appear without my extension? The extension definitely does not produce this message itself, but maybe there's some hidden interaction, I'll take a look, thanks for bringing this up.

MrDDT
December 11th, 2023, 18:49
Thank you for trying it out!

This latter behavior is expected as the extension scans the NPCs that remained in CT from the previous session when a reaction may be triggered (attack, damage or save is rolled or PC starts turn) or when you add an NPC to the CT. If you don't want to see reports regarding the scan results, you can turn it off with "Report parsing results" option (but then you will not see how an NPC is parsed when it added to CT as well).

Regarding the "Total mismatch" message, I assume it does no appear without my extension? The extension definitely does not produce this message itself, but maybe there's some hidden interaction, I'll take a look, thanks for bringing this up.

Correct, in the picture you can see how I set it up, and its only your ext loaded. Without this ext, it doesnt show that message.

Thanks for the info about the other parsing thing. I'm on the fence which I want to do, see it each time I load up (once) or not see it all the time even when added NPCs to the tracker haha.

illahad
December 11th, 2023, 18:56
I guess I can make an option to only show parsing results when NPC is added.

illahad
December 11th, 2023, 20:16
Correct, in the picture you can see how I set it up, and its only your ext loaded. Without this ext, it doesnt show that message.

Thanks for the info about the other parsing thing. I'm on the fence which I want to do, see it each time I load up (once) or not see it all the time even when added NPCs to the tracker haha.

Hey, I think I fixed the problem that you encountered. Please update, and with version 1.1.2 that warning message about damage should be gone. Also, I added config option to display parsing messages only when NPC is added to the CT (and not when the initial bulk scan happens).

Feel free to post if you will find more issues.

Cheers!

MrDDT
December 12th, 2023, 04:20
Thank you so much, working perfectly, set that NPC added setting and only showing now when I add, the other text is gone on resisted damage. Very nice, very quick work. Thank you so much.

rocketvaultgames
February 6th, 2024, 21:35
Loving this extension! Just a thought with no expectation of implementation, but is there any chance a reminder could be triggered by an actor becoming "bloodied" (half max hit points or less)?

I have a number of custom NPCs with abilities like: "When first bloodied, the cambion can use its Fiendish Charm ability as a reaction."

Would it be helpful to implementation to phrase the ability differently with the "bloodied value"?

In this case the cambion has 82 hit points so maybe the wording is: "When first bloodied (41), the cambion can use its Fiendish Charm ability as a reaction."

illahad
February 6th, 2024, 23:15
I have a number of custom NPCs with abilities like: "When first bloodied, the cambion can use its Fiendish Charm ability as a reaction."

Would it be helpful to implementation to phrase the ability differently with the "bloodied value"?

Hello, thanks for posting, I'm glad to hear that you like my extension!

I think it can be done, you are not the only one who uses that, I believe "Level Up Advanced 5e Monster Menagerie" also uses this keyword. Or maybe some other keyword with the same meaning, I don't remember at the moment. The thing that's unlikely to get implemented is the "_first_ bloodied" because that would require to keep track which creature have already been bloodied before and that's too much complexity for the value added.

"Bloodied" condition itself is rather easy to detect, and you don't need to change your wording for it, since extension has the data of the full health of every NPC.

I'll consider your request, I'll also check again "Monster Menagerie" and "Flee, Mortals!" because potentially monsters from these sources can also benefit from such a feature.

Cheers!

rocketvaultgames
February 7th, 2024, 01:00
Thanks for taking a look.

I completely agree with not caring about "first".

I just had an idea... maybe even just the following would suffice: a (toggleable on/off in options (or on/off/friendly/ally/enemy/faction)) where whenever any actor in the CT became bloodied, the chat would get a message: "So-And-So is now bloodied!"

claedawg
February 7th, 2024, 01:32
Thanks for taking a look.

I completely agree with not caring about "first".

I just had an idea... maybe even just the following would suffice: a (toggleable on/off in options (or on/off/friendly/ally/enemy/faction)) where whenever any actor in the CT became bloodied, the chat would get a message: "So-And-So is now bloodied!"


I believe the Trigger Me Timbers extension will do what you are wanting but I'm not sure as I've not actually used it.

rocketvaultgames
February 7th, 2024, 02:56
I don't think so, but I could very well be missing something...

It looks like the available event triggers are:

After Attack Roll
After Saving Throw
Before Damage Taken
Dice Rolled
New Combat Round
Power Used
Turn End
Turn Start

illahad
February 7th, 2024, 19:34
By the way, are all of your NPC abilities phrased like "When first bloodied, the cambion can use its Fiendish Charm ability as a reaction." or is there some more variation in conditions?

rocketvaultgames
February 7th, 2024, 19:37
That is the standard I've been using, but I'm not opposed to changing if it helps you make this possible.

There are others that are "While bloodied, yada yada", but those wouldn't need a triggered reminder.

illahad
February 8th, 2024, 20:29
Good, then probably I will detect words like "When first bloodied ... reaction" and then as for the others I wll show the full text by the link. Maybe I will be able to extract the name of ability that is between "its" and "ability" and display a link to that. But again I will also check some other sources that use bloodied keyword and try to make something universally applicable if possible.

rocketvaultgames
February 8th, 2024, 20:52
Sounds good. In my opinion that fact that I see a reminder is much more important than being reminded of what the actual ability is.

Thanks much!!

illahad
February 10th, 2024, 21:58
Hey!

I've implemented what you was asking for. Try updating to version 1.1.3

The supported wordings are:
"when the monster_name is first bloodied" or "when first bloodied, the monster_name". (monster_name is not necessary)
"when reduced to half (of its) hit points"

I don't track "FIRST bloodied" so if the monster gets healed above half health and then drops again, you will see the notification again. But I think it's not a big deal.

Cheers!

rocketvaultgames
February 14th, 2024, 16:54
I just did a little testing and this seems PERFECT. Thanks much!!

illahad
February 14th, 2024, 18:32
I just did a little testing and this seems PERFECT. Thanks much!!

welcome, welcome ))