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

Hundreds of items have nonsensical densities and need correction #54811

Open drhead opened 2 years ago

drhead commented 2 years ago

Describe the bug

Several hundred items (which I have identified) have densities that appear to be way out of line with their material composition. All current instances of this need to be resolved in order to merge a test that will prevent this from happening in the future.

Steps to reproduce

  1. Look at item stats for something like burdock wine (one of the items on the list), noting the volume, mass, and also note how charges apply to volume and mass if applicable (volume is for one stack of the amount of charges, mass is per charge)
  2. Burdock wine has a volume of 0.25L, mass of 0.25kg, and 7 charges, so a stack of 7 will have volume of 0.25 and mass of 1.75kg.
  3. Burdock wine is almost as heavy as steel -- about 7g/cm3, with steel being 8.

Expected behavior

Items should have densities that are no greater than that suggested by their materials, and generally well under that -- sheet metal, for instance, has a density of 6g/cm3, suggesting that even items in a favorable shape for storage often aren't very efficiently stored (though there are some that I'd say are justified being equal, like liquids and things like the 800L plastic cube)

Screenshots

No response

Versions and configuration

Additional context

bad-item-density.txt

This first file has all of the items listed. I am working on a second file which has only the very obviously incorrect items and none that may warrant changes to the test or the base material density. Second list is done, I removed about 100 items which I think should be resolved later instead: low-hanging-fruit.txt

Some pointers for people fixing items on this list:

Common material densities used from my test (you can refer to my updated materials.json here: https://github.com/CleverRaven/Cataclysm-DDA/pull/54747/files ):

(also tagging PR #54747)

coyo7e commented 2 years ago

It seems like this is particularly egregious with liquids, as has been brought up in (usually singular) instances previously. Not sure why density would be a factor for liquids in most smaller containers in any case - filling a small plastic bottle with X volume of mercury shouldn't be impossible when X volume of water/etc works, even though mercury is obviously denser than most other liquids.

This also makes filling containers kind of a PITA when one assumes a certain volume density and then finds out after crafting a batch, that they do not have enough viable containers nearby for the "extra" liquid.

Possibly, some containers' "weight capacity" could be upped for items which are within reason to help deal with this?

chrispikula commented 2 years ago

I've got a list of a few liquids that currently can't fill up large jerrycans due to their high densities over at #54538

Liquid Soap is an egregious example, given it's density, 5x that of water. Magiclysm mercury is on the other end, at 1.5 water's density. Lamp oil is 1.0, when it should be .81 You caught Lamp Oil in your document, awesome! For things of M:Powder ... Yeah, they're all over the map. Lye is .5, when it should be 2.1 Acrylamide is .5, when it should be 1.13 Citric Acid is .5, when it should be 1.66

coyo7e commented 2 years ago

Yes, liquid soap is really annoying since 4 units is small enough to not be useful almost at all. :(

And seriously, a bottle of liquid detergent lasts for MONTHS irl, why is it only able to wash a handful of items? Perhaps liquid soap as an outlier could be changed to the oil/gasoline/etc units of 250/ per quarter liter? I only need to use a couple drops of soap washing dishes, and even with laundry I use maybe a couple ounces

chrispikula commented 2 years ago

And that sort of soap is significantly watered down. :-D The most concentrated I ever worked with, zymeflow, was strong enough that you had an upper limit of about a 1:450 v/v mix to prevent excess foaming. That stuff isn't available to buy without a corporate contract, though, but it is an amazing chemical due to it's nearly benign nature for a surfactant.

coyo7e commented 2 years ago

I'd love to discuss soap usability/feasibility in terms of appliances vs handwashing for instance, but that may be more appropriate in a real discussion thread that covers hand washing vs machine washing etc? Adding in factors like cold water vs hot for instance might be possible in that kind of thread.

drhead commented 2 years ago

I just added a slightly trimmed list to the original post, most of the things left in it should have fairly obvious corrections.

I'll regenerate the list once a few people do pull requests correcting items.

hjk321 commented 2 years ago

So should we split this list up amongst ourselves or is it kinda a free for all? This seems an especially bad issue to duplicate work on.

drhead commented 2 years ago

So should we split this list up amongst ourselves or is it kinda a free for all? This seems an especially bad issue to duplicate work on.

I would say just do however much you'd like to do and reference this issue in the pull request, and be sure to check other pull requests to see if the items you are trying to fix have been done already. I can update my test branch to generate a new list periodically but I'll be away for the next 10 days or so.

If you want to preemptively call some part of the list that works too I suppose.

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.

NetSysFire commented 2 years ago

Damn you stalebot.

How is the progress going with #54747? Since it got merged just now what are the next steps?

batekulve commented 2 years ago

I've been looking for a good first issue and I think this fits. I'll start with liquids in alcohol.json and brewing.json, and if that gets merged and goes well maybe start doing more.

Edit: Also drink, drink_other, and dairy because that didn't take as long as I thought.

batekulve commented 2 years ago

Adding here that milk is 1.03g/cm3, not 1.1.

ANickelN commented 2 years ago

I'm thinking about picking up the keyboard and cranking away at at least some of these, so I picked up some more densities I've found from either real-life testing with material or internet searching. They're here for my or others future reference.

If anyone wants to argue these values feel free, all my testing has been done on my own and even though I'm careful it is possible to make mistakes.

Cotton: 1.5 g/cm3

Kevlar: 1.44 g/cm3 (Taken from https://www.dupont.com/content/dam/dupont/amer/us/en/safety/public/documents/en/Kevlar_Technical_Guide_0319.pdf)

Nomex: 1.4 g/cm3 (https://www.dupont.com/content/dam/dupont/amer/us/en/personal-protection/public/documents/en/Nomex(R)%20Fiber%20Technical%20Guide.pdf)

Lycra, Spandex, Neoprene : 1.25 g/cm3

Nylon: 1.15 g/cm3

Yarn: 0.8 g/cm3

Felt: 0.128 g/cm3 (surprising but I checked a few times with pieces from around the house)

I'm going to continue adding to this as well.

github-actions[bot] commented 1 year 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.

HeliusNine commented 1 year ago

I'm guessing the chitin powder density was changed as people worked on this issue.

I just wanna point out that the recipe for chitin powder still only calls for 0.09Kg worth of material, but now generates 0.45Kg of powder.