Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hundreds of items have nonsensical densities and need correction #54811

Open
drhead opened this issue Jan 26, 2022 · 15 comments
Open

Hundreds of items have nonsensical densities and need correction #54811

drhead opened this issue Jan 26, 2022 · 15 comments
Labels
Help Wanted Not particularly urgent or easy (see Good First Issue for this), but help is appreciated with this! Items / Item Actions / Item Qualities Items and how they work and interact [JSON] Changes (can be) made in JSON (P5 - Long-term) Long-term WIP, may stay on the list for a while. <Suggestion / Discussion> Talk it out before implementing

Comments

@drhead
Copy link
Contributor

drhead commented Jan 26, 2022

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

  • OS: Windows
    • OS Version: 10.0 2009
  • Game Version: 2ed119b [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    No Fungal Growth [no_fungal_growth],
    Bionic Professions [package_bionic_professions],
    Aftershock [aftershock],
    Blaze Industries [blazeindustries],
    Crazy Cataclysm [crazy_cataclysm]
    ]

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:

  • You should probably leave things made of organic matter alone until most of the rest have been whittled down.
  • A number of items have densities that COULD make sense if the percentage composition of each material was altered, which is a new feature. My testing suite takes that into account. One example is the batteries that are at the top of the file. If an item can be fixed by altering material ratios without touching mass or volume, do that.
  • Pay close attention to item charges! The bug I mentioned with burdock wine is responsible for a LOT of the worst offenders.
  • Let it be emphasized that the vast majority of items are not in a perfectly efficient shape for storage, and therefore should not be exactly equal to material density. Don't just multiply the item's existing mass by density and call it a day.
  • The list is subject to change, off the top of my head I should be able to test rigid containers more thoroughly by subtracting interior volume, and tweaking density values for materials will also change things, I'll update the list here if I change anything of that nature.

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 ):

  • Elemental substances like copper or silver, or those with well-defined chemical compositions, are just the density for that element or substance
  • Bronze is 8.8
  • Plastic is 1.0
  • Kevlar is 1.4 (all forms)
  • Iron and all Steels are 8.0
  • Most organic matter including leather is 1.1 -- might be subject to change later. Bones are 1.4.
  • Glass is 2.5
  • Ceramic is 4.5
  • Chitin is 1.45
  • Superalloy is 1.8 but I might change it
  • Stone is 2.8
  • Clay is 1.6

(also tagging PR #54747)

@coyo7e
Copy link

coyo7e commented Jan 26, 2022

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
Copy link
Contributor

chrispikula commented Jan 26, 2022

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
Copy link

coyo7e commented Jan 26, 2022

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
Copy link
Contributor

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
Copy link

coyo7e commented Jan 26, 2022

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.

@Leland Leland added <Suggestion / Discussion> Talk it out before implementing [JSON] Changes (can be) made in JSON Items / Item Actions / Item Qualities Items and how they work and interact labels Jan 27, 2022
@drhead
Copy link
Contributor Author

drhead commented Jan 27, 2022

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
Copy link
Contributor

hjk321 commented Jan 28, 2022

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
Copy link
Contributor Author

drhead commented Jan 28, 2022

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
Copy link

stale bot commented Mar 2, 2022

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.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Mar 2, 2022
@NetSysFire
Copy link
Member

Damn you stalebot.

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

@stale stale bot removed the stale Closed for lack of activity, but still valid. label Apr 8, 2022
@batekulve
Copy link
Contributor

batekulve commented Apr 8, 2022

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
Copy link
Contributor

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

@ANickelN
Copy link
Contributor

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
Copy link
Contributor

github-actions bot commented Dec 6, 2022

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.

@github-actions github-actions bot added the stale Closed for lack of activity, but still valid. label Dec 6, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 5, 2023
@NetSysFire NetSysFire removed the stale Closed for lack of activity, but still valid. label Jan 5, 2023
@NetSysFire NetSysFire added the (P5 - Long-term) Long-term WIP, may stay on the list for a while. label Jan 5, 2023
@NetSysFire NetSysFire reopened this Jan 5, 2023
@HeliusNine
Copy link

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.

@NetSysFire NetSysFire added the Help Wanted Not particularly urgent or easy (see Good First Issue for this), but help is appreciated with this! label Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Not particularly urgent or easy (see Good First Issue for this), but help is appreciated with this! Items / Item Actions / Item Qualities Items and how they work and interact [JSON] Changes (can be) made in JSON (P5 - Long-term) Long-term WIP, may stay on the list for a while. <Suggestion / Discussion> Talk it out before implementing
Projects
None yet
Development

No branches or pull requests

9 participants