CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.59k stars 4.16k forks source link

NPC container duplication/disappearence/transmogrification #38342

Closed Funguss closed 3 years ago

Funguss commented 4 years ago

It seems that any container can duplicate or disappear when traded to or from an NPC, including its contents, if any. It appears that, sometimes, another item is overridden, though I can't identify a pattern. It's likely based on how the item is stored in memory. I've not been able to reliably reproduce this, sometimes a trade causes duplication and disappearances, other times nothing. This may be linked with #36884 as both are issues around containers.

Edit: Wrong save! Correct save: Bentonia.zip

I've not been able to identify the trigger but there's a definite duplication when trading liquids to NPCs on occasion. I've only noticed it with liquids that have freshness modifiers but it could occur with water or the like. So far I've only seen it with plastic bottles, specifically mayonnaise and one other I forget. Each duplication causes a copy to be left in the player inventory.

Edit: In this save, if you go north of the NPC there's a pile of food, including rotten orange and fruit juice. Pick up a few bottles of both and try trading back and forth. Sometimes, one will transform into the other, sometimes they'll duplicate. Point Blank.zip

Edit 2: Nothing to do with freshness as I had a canteen of water disappear while trading multiple. This may be linked with #36884 as both are issues around containers. I'll test out with some dry foods.

Versions and configuration

Additional context

Funguss commented 4 years ago

Trading a single item seems to work fine all the time. Trading multiple (more than one on either side, or one from each) mostly fails, generating duplicates or becoming copies of a different container already held.

MarceloLaser commented 4 years ago

To add to this, the inventory errors may include equipped items, and may involve items marked for trade remaining in origin inventory. The error does not seem to require the trade to involve containers or liquids. To illustrate, I am attaching a save file located in front of the refugee center trader, with an inventory containing 100L worth of filthy clothing items for trade. Attempting to trade all items in inventory will almost always result in an error of some form, and the error may not always be the same, even if items traded are. Bug is still present as of April 10.

Edit: If necessary for testing purposes, directly outside the refugee center in the attached save file are both 1) a pile of items that are not meant to be traded, which may be picked up, and 2) a vehicle with approximately 1400L worth of miscellaneous items.

West Lake Hills.zip

int-ua commented 3 years ago

Please try reproducing in latest experimental and/or adding clear and concise steps to reproduce from scratch.