PDA

View Full Version : Number of items



Durak Zaesul
August 29th, 2021, 16:13
Issue Summary: For items in a PC's 'EQUIPMENT' inventory on the Character Sheet, if an item has a quantity of zero (i.e., is blank) and then receives any number of quantity for that item (whether through direct drag-and-drop from the 'ITEMS' window, through direct parcel link/icon drag-and-drop, or through Party Sheet assignment) then the quantity for the item updates inaccurately with a '+1' to the total quantity.

Example; [#] column is blank/zero for 'Potion of Healing' in a PC's 'EQUIPMENT' Inventory, a 'Potion of Healing' is then assigned from the 'PARTY SHEET' and distributed to the PC. The PC now has a quantity of two (02) 'Potion of Healing' instead of just one (01).

Ruleset(s): Only tested in D&D 5e v2021-07-06 in FGU v4.1.5 (2021-08-26)

Extensions/Themes: None / default

Steps to Reproduce: In the inventory tab of a PC Character Sheet, add any item(s) (e.g., Crossbow Bolt) and delete the quantity in the [#] column. Then give the same item to the PC through any means (other than direct number entry in the [#] column). The PC Inventory for that item will reflect one more in quantity than it should have.

48925
48926

Moderator: Moved to House of Healing

Moon Wizard
September 1st, 2021, 15:25
Thanks for raising this issue.

If I remember right, there were some assumptions built into the original item transferring code that assumed a count of 1 if the item existed (since players can enter items manually) (and items are generally removed completely on zero count). A lot has changed in the many years since that capability was added; so it probably needs to be reviewed to see whether that assumption is still needed, and specific code added to handle zero counts.

Regards,
JPG

Durak Zaesul
September 5th, 2021, 01:30
Thanks, Moon Wizard. Appreciate the attention taken towards addressing this.