[BUG] 4th level exhaustion doesn't cut hitpoint maximum in half & it is causing visual artifact
Describe the Bug
When 4th level of exhaustion is applied to an actor - its hit points are not halved. Also, it is causing a visual artifact shown in the image below. A PC on the image has their max hp already reduced by 9, and then they the 4th level of exhaustion was applied.
Context
- Any errors in the console; access it by pressing F12
- Ran [Find the Culprit] and it led to this module
- Foundry version 11.315
- System and version dnd 5e 3.1.2
- Module version 6.0.3
- Chrome, Forge
To Reproduce
Steps to reproduce the behavior:
- Add a PC token to the scene
- Reduce their hit points maximum from 17 hp, to 4 using the character sheet's option to do so. Use "temp max hp"
- Save the change
- Add Convenient effect of 4th level exhaustion
- See as their health bar on the token moves out of bounds
- See as their hp is not halved from 4 to 2.
Expected Behavior
When adding the effect - it will be half the current max of hit points. As the actor's current maximum is 4 - then it is 2. Also, it shouldn't display the health bar incorrectly
Exhaustion 4 still used system.attributes.hp.max which is not available anymore. We are now supposed to use system.attributes.hp.tempmax which has not been implemented yet it seems.
I have fixed it myself by replacing it with the new attribute key with effect value: [email protected] * 0.5 and mode is Override.
I fixed it by going in the modules folder and finding the module. Open this file: "\AppData\Local\FoundryVTT\Data\modules\dfreds-convenient-effects\scripts\effects\effect-definitions.js" And change
key: 'system.attributes.hp.max',
mode: CONST.ACTIVE_EFFECT_MODES.MULTIPLY,
value: '0.5',
priority: 5,
With:
key: 'system.attributes.hp.tempmax',
mode: CONST.ACTIVE_EFFECT_MODES.OVERRIDE,
value: '[email protected] * 0.5',
priority: 5,
Thank you @CptLucky27 ! Will this be reverted when the module updates?
I have replied but I think Github didn’t send. Sorry if 2 same messages
@CptLucky27 thank you for sharing fix! Will try. Will it revert after an update?
Not sure to be honest with you. But you can always check if it has been changed or not by going into that file.
Got it, thanks! Will try and see
Seeing that - @attributes.hp.max * 0.5 isn't working 🤔
@DFreds
Not sure but I changed in the file itself and now exhaustion 4 comes up with this (see the image). And it seems to be working for me.
Not sure if it helps but I follow Chris's Premades dependencies: Midi-QOL: 11.4.34 DFred's Convenient Effects: 6.0.3 Warpgate: 1.19.2 (up to 1.closing) Effect Macro: 11.2.1 Template Macro: 11.0.1 Sequencer: 3.1.4 Token Attacher: v4.5.15 Build-A-Bonus: 11.8.0 (up to 11.10.6) Socketlib: 1.0.13 Dynamic Active Effects: 11.3.29 Automated Animations: 4.2.71 Times Up: 11.3.12
What version of dnd5e? It's definitely not working for me, and I have the same inputs.