roth-michael / FoundryVTT-RestRecovery

This repository adds support for D&D 5E's Arcane/Natural Recovery within the short rest dialog, and additional short rest mechanics
Other
20 stars 17 forks source link

[BUG] When settings 2 units of water required per day, we can't input 2 water skins in the rest recovery dialog #222

Closed edoreld closed 1 month ago

edoreld commented 1 month ago

Describe the bug When settings 2 units of water required per day, and then taking a long rest, we can't fullfil the water requirements even if we have 2 water skins in the PC's inventory.

To Reproduce Steps to reproduce the behavior:

  1. Go to the module's settings -> Food & Water
  2. Set "Units of Water required per day" to 2 and "enable food and water automation" to on
  3. Create a PC
  4. Give the user 2 waterskins
  5. Take a long rest

Can't input my 2 water skins to fullfil the water requirements. If I put a 2 in the text box, it changes it to 1.

Expected behavior Should be able to input 2 water skins

Screenshots image

Setup:

Active modules: fvtt-midi-qol-troubleshooter.json

Additional context Add any other context about the problem here.

roth-michael commented 1 month ago

Yep, can verify that that's happening. This isn't a Rest Recovery bug, so much as an function of the way the core system handles quantities of objects with charges - if they're not set to destroy on empty, then even if you fully use all charges, it'll just sit there at 0/1 (you can try this by using the waterskin manually - even if you have 3 of them, you can only use it equal to the number of charges). There are two ways around this, both involve editing the waterskin item.

Personally I think the latter makes more sense; you own one waterskin, and can fill it with X units of water, as opposed to owning multiple waterskins and tossing them once empty. Will one of those options work for you?

roth-michael commented 1 month ago

Marking this as closed - feel free to get back to me if you've got any questions.