p4535992 / foundryvtt-variant-encumbrance-dnd5e

A FoundryVTT module, providing a visual modification to player character sheets to better display the effects of the Encumbrance variant ruleset in the PHB.
MIT License
3 stars 4 forks source link

[BUG] Ammunition calculating incorrectly #21

Closed txm3278 closed 1 year ago

txm3278 commented 1 year ago

Module Version: v0.31.1

image

Describe the bug Ammunition is not calculating correctly, instead of using the weight 0.075, it is using 1.5. I looked through the settings and could not find anything that could be causing this (using default settings)

To Reproduce Steps to reproduce the behavior: Add ammunition with quantity 20 and weight 0.075 to a characters inventory. Observe total weight

Expected behavior Weight should be 20 * 0.075, which is 1.5

Screenshots image image

Browser:

Foundry Version: 11.306 Game System: DnD5e: 2.2.2

p4535992 commented 1 year ago

Sorry @txm3278 cannot replicate the issue on my actors can you pass to me the actor json data ?

txm3278 commented 1 year ago

I ran Find the Culprit and this is only an issue with the item containers module installed. I can't upload a json here, can I dm it to you over discord?

p4535992 commented 1 year ago

a ok there is a already open issue for that, it's seem something is changed on the item container side and i must find a way to solve it

p4535992 commented 1 year ago

Should be fixed with 0.13.3 let me know it

txm3278 commented 1 year ago

Ammunition now calculates correctly, but I am having the same issue described here.

txm3278 commented 1 year ago

Fixed, Thanks!

txm3278 commented 1 year ago

This bug is back,

image image

image

Looking through the code, for ammo, it is calculating the weight with itemQuantity * itemWeight. Then it is again multiplying by itemQuantity

p4535992 commented 1 year ago

I was sure it was solved... can you export the actor data json (rename the json with .txt for upload on github)

txm3278 commented 1 year ago

Tested in the latest update, this is working again! The debug messages do look a bit odd though, mainly the last one, image

p4535992 commented 1 year ago

i'll fix that