CleverRaven / Cataclysm-DDA

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

Plastic canteens and hip flasks take up more volume in inventory than they're supposed to #50325

Open AmarinReyny opened 3 years ago

AmarinReyny commented 3 years ago

Describe the bug

While doing zombie laundry with my main character, I happened to notice that slightly more space in the washing machines was being used up than was supposed to be. Looking at the volumes of the items in the washing machine, I didn't see any which had an abnormal volume, so instead, I started taking things out just to see what could have been causing it. Through this, I figured out it was the plastic canteens and hip flasks. The strange thing is, when looking at the items themselves, their volume is displayed as what I expect it to be - 1.50 L for plastic canteens, and 0.25 L for hip flasks. However, when I put it in the washing machine again, they take up slightly more than that. I tested this further by dropping them on the ground and selecting them to be picked up again, and comparing the displayed volume of the respective items to the volume of space they would take up in my character's inventory, which was listed as 1.51 L for plastic canteens, and 0.26 L for hip flasks. The extra volume isn't much, but it's enough to become inconvenient for my efforts to maximize the productivity of every unit of detergent I use while doing large amounts of zombie laundry for the purposes of obtaining clean clothes to be disassembled into raw materials.

Steps To Reproduce

  1. Find or debug spawn a plastic canteen or hip flask
  2. Either drop it on the ground and attempt to pick it back up again, or put it in a washing machine
  3. Compare the listed volume of the item to the volume of space taken up when selecting it for pickup/when it's in the washing machine

Expected behavior

I expect that the listed volumes of the item will reflect the amount of space they'll take up when they're in my character's inventory or otherwise inside something else.

Screenshots

Screenshots can be viewed here.

Versions and configuration

Additional context

Yes, I also tested it with a new world with only vanilla content and mods that are loaded by default, as you'll see in the version/config part. I also tested this with the 2.5L canteen and the wooden canteen; both had the same amount of volume taken up in inventory/washing machines as their listed volume.

Tamiore commented 3 years ago

I'd check their volume in relevant .json directly. UI tends to round things up.

AmarinReyny commented 3 years ago

I'd check their volume in relevant .json directly. UI tends to round things up.

Huh... Well, the volumes in the json file were slightly above the stated volume when examining the item, and would have rounded up to the amount of space it takes up in inventory/washing machines. It's kind of strange, though, since it seems like it's rounding down on the item info, but rounding up in inventory.

Tamiore commented 3 years ago

Inconsistent rounding is a thing, I guess, but it's borderline an issue. One could argue it's not exactly possible for a human to estimate volume precisely by just looking.

AmarinReyny commented 3 years ago

Inconsistent rounding is a thing, I guess, but it's borderline an issue. One could argue it's not exactly possible for a human to estimate volume precisely by just looking.

That's fair. I'm sure it's probably a non-issue for most players. I kinda play CDDA differently than most do, though - where most players probably have fun simulating the struggles of a zombie apocalypse survivor who dies two days later, I find a feeling of simulated fulfillment, security, and catharsis - which helps me cope with trauma - in the idea that my survivor is helping to build a new civilization and safe haven for what's left of humanity (and mutants, and cyborgs, and mutant cyborgs, and all the dogs and cats and other tamable animals I'm able to rescue) from the ashes of the old world. Thus, I probably interact a lot more with things like faction camps and NPCs, and I put a lot more effort into maximizing the efficiency of the resources I use and finding sustainable ways of producing more of said resources, than most players do. That's why a lot of issues that stand out for me are things that most players either wouldn't notice or care about.

chrispikula commented 3 years ago

Containers, unless they are a Tardis (As in, have that specific flag!), are larger than the total of their pockets. A Plastic Canteen, which holds 1.5L, is 1.503L in size. Yeah, 3mL is the entire physical volume of a canteen, which is kinda of silly small. That's... zip-lock bag small. Also means that it's material is some sort of plastic that is 52g/ccm, or nearly 5 times that of lead.

This is a little bit of a gui display bug, and maybe a physical representation bug. It should have an outer volume of something close to 1.65L or even larger. It's just that no one wants to go through the hundreds of items and justify each one.

AmarinReyny commented 3 years ago

Containers, unless they are a Tardis (As in, have that specific flag!), are larger than the total of their pockets. A Plastic Canteen, which holds 1.5L, is 1.503L in size. Yeah, 3mL is the entire physical volume of a canteen, which is kinda of silly small. That's... zip-lock bag small. Also means that it's material is some sort of plastic that is 52g/ccm, or nearly 5 times that of lead.

This is a little bit of a gui display bug, and maybe a physical representation bug. It should have an outer volume of something close to 1.65L or even larger. It's just that no one wants to go through the hundreds of items and justify each one.

I kind of figured it made sense that the volume of space taken up by the container would be more than the volume of its contents (especially for rigid containers), so I understand that. Still, the alternating rounding (and the removal of one of the displayed numbers after the decimal point) in the UI is kind of bothersome for me to deal with, especially since I'm still getting used to 0.F after playing 0.E for so long. Still, I appreciate the work that goes into this game.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not \'bump\' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.