hanna-greaves / Token-Says

Tokens speak dialog or play audio based on in game actions.
GNU General Public License v3.0
6 stars 3 forks source link

[Feature Request] Action Type: HP Loss #120

Closed harrisog closed 4 months ago

harrisog commented 1 year ago

It would be amazing if token sayings were able to trigger off of negative adjustments to the token's Bar 1 attribute. This would really not be Target Reacts "territory" because that module is both system and submod-specific (midiqol), is neither globally configurable nor im/exportable, and has not been updated to support the current version.

napolitanod commented 1 year ago

This is an interesting thought, to use the bars - I will research into it to see what is available in the Foundry base code to support this - I need to get my modules ready for the next Foundry release so it will take time before I can get to this.

harrisog commented 1 year ago

That's excellent to hear. There are mainly four saying types I would hope to see made possible by this feature:

  1. Decrease ("Ow, that hurt")
  2. Increase ("Thanks for the healing, pal")
  3. ==0 (Wilhelm scream)
  4. ==max ("ready to rock")
hanna-greaves commented 7 months ago

hey @napolitanod 👋 thanks so much for your work on this module, its great 🙏

I was really interested in having the 'say on HP loss/gain' feature available in my foundry game so I made some changes locally and have something working using the updateActor hook.

I'm happy to clean up the change and create a PR if you're open to it? 🙂

napolitanod commented 7 months ago

hi @hanna-greaves - I can field a PR, though haven't done it before so may need help walking through. I am looking for somebody to take over ownership of this module. Any interest? I have no time. My concern with PR in the past is that if a person adds functionality and then bails, I feel as if I am left on the hook to maintain it when future bugs are reported against it, whether due to system or foundry functional / api changes

hanna-greaves commented 7 months ago

@napolitanod I'd be happy to take over ownership if you feel comfortable with me doing so :) How about I make that PR first so you can see if I understand your architecture correctly? If everything there looks good I'm totally OK to take over from there.

I should have some time to make the pull request this weekend, and then I can walk you through the changes any time you're free

napolitanod commented 7 months ago

@hanna-greaves Im good just signing over. Anything waiting on me re review or merging is going to be delayed for some time. I think I have to make a request to foundry staff but will get that in motion.

I don't think there's much complexity in the module but I can answer questions if you don't mind the delay. Historically some of it is built in parsing comment objects but there may now be more robust hooks to use for things like dnd5e.

The biggest gotcha that I can think of is that originally a saying could be either text or audio. Now it can be both. I never migrated data into the new Json structure so you'll see some janky legacy handling for routing values for handling the old structure.

hanna-greaves commented 7 months ago

@napolitanod sorry for the delay, that sounds good to me, feel free to hand everything over whenever you're ready :) give me a shout if there's any additional info you need from me 🙂

napolitanod commented 6 months ago

@hanna-greaves do you have a discord account that we can connect over? I am at dnapolitano and I am on the FoundryVTT server. If you can connect with me there I can share with you the instructions from Foundry staff on how to request ownership. The request has to come from you :)

hanna-greaves commented 4 months ago

@harrisog a basic version of this feature has been merged in the latest release. I'll continue to develop it further including reacting to healing etc. in a future release