Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Total weight not accounting for proficient equipped multiplier OR miscalculating maximum capacity. #41

Open
TheAlexPlus opened this issue Jun 7, 2024 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@TheAlexPlus
Copy link

Module Version: v0.15.6

VE-Errors.txt

Describe the bug
There are multiple overlapping issues, but it can be mostly summed up as: The maximum capacity calculating is broken on first sheet load and then any sheet update fixes the max capacity, but breaks the total weight, ignoring the equipped proficient items modifier.
As a result, a character that shouldn't be encumbered, gets the effect applied during the miscalculation.

A character has a backpack with 29 lbs of stuff and is carrying 69 lbs of stuff outside of that. (98 lbs in total)
The character is proficient in 65 lbs of equipped gear (quarterstaff, chain mail, and shield), and I've set that modifier to be 0.5, so that should be halved to 32.5 lbs, bringing the total expected weight to 65.5 lbs.

The sheet displays the correct weights on each item and updates each item correctly as I equip or unequip them, but the total in the bar above doesn't update correctly. This is true no matter what type of bag you use.

If the sheet has no container on it at all:
Opening a sheet always shows the accurate total, but the maximum capacity is always just 16, which is his strength score.
Equipping, unequipping, or adding an item will always update the maximum capacity to be correct, but the weight total always jumps back to the unmodified amount (69 lbs in this case).
I also noticed that when the sheet first loads in, it doesn't show a Multiplier.

If I'm using the core Foundry Containers:
Again, it always opens with the maximum capacity at 16 and changing anything updates the max capacity, but sets the total to the unmodified weight.
With the added weight of the bag, the difference between the modified total (accounting for halved proficient equipped items) and the unmodified total is the difference between being encumbered or not.. and so, changing anything on the sheet (including simply adding an item to the sheet) automatically adds the encumbered effect to the character.
Starting with nothing equipped it shows 99, which is only correct if you're still adding the backpack weight even though it's not equipped (I understand that this might just be the case since core Foundry containers probably don't support the weightless unequipped feature that the item containers mod has).

If I'm using Item Collect/Containers:
With nothing equipped, the sheet opens with the same 16 max capacity as usual, but the total weight is oddly 71, adding the unequipped bag, with the weightless unequipped setting on, it somehow weighs 2 lbs.
In the previous examples, editing anything would typically update the max capacity to be correct and the total weight to be the unmodified weight of all the objects, but this time editing anything sets the total weight to 82, (13 lbs more than it should).
If I then equip the bag, it updates the total weight to 112, which is the total weight with an extra 13 lbs added, and the weird part is that i can equip and unequip and it will actively update the total weight unlike any time previous. it jumps between 82 and 112.

To Reproduce
Steps to reproduce the behavior:

  1. Put some items in a container on a character
  2. Set proficient equipped items multiplier to be 0.5
  3. Observe weight readout as you equip and unequip the container.
  4. See error

Expected behavior
I expected the total to reflect the modified amounts and I expected the max capacity not to change.

Screenshots
This is the sheet and the bag contents if you want to do your own math
image

Browser:

  • Chrome

Foundry Version:
v11.315

Game System:
dnd5e 3.1.2

Additional context
I'm using the default dnd5e character sheet with only the following modules active:
DAE
Item Collection/Item Container for Dnd5e (although, the problem seems to be consistent using either type of container)
libwrapper
Midi QOL
socketlib
Variant Encumbrance+Midi

@TheAlexPlus TheAlexPlus added the bug Something isn't working label Jun 7, 2024
@p4535992 p4535992 added the help wanted Extra attention is needed label Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants