Cataclysm-dda: Clean up water purification

Created on 18 Feb 2013  路  4Comments  路  Source: CleverRaven/Cataclysm-DDA

For something that's pretty central to survival, water purification is quite haphazard.

Some cleanups we can do:

  1. Differentiate between clear (but possibly contaminated), cloudy (obviously dirty), and tainted (from a very dangerous source) water.
  2. Differentiate between biological and chemical contamination. (internally, this will not be player-visible without a test)
  3. Carry contamination across recipes as called for.
  4. Differentiate between sterilized (boiled/chemically treated, not that tasty) and filtered/distilled water (very clean).

To be more concrete, I'm proposing:
New Items:
cloudy water (obviously dirty, probably unsafe, from rivers)
toxic water (obviously dirty water from an obviously dangerous source)
sterilized water (flat or chemical-tasting water, biologically safe, output of boiling or chemical purification, lower morale boost than clean water)
water test kit (item used to detect chemical contamination in water)
New item attributes:
bio_contamination
chem_contamination
Code changes:
Enhancing recipe code to copy contamination from inputs to output
Enhance recipes to indicate whether they transfer contamination
Item changes:
Let iodine be used to sterilize (percent chance?) water.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

(S2 - Confirmed) <Enhancement / Feature>

Most helpful comment

Here's my take on water and its sources:

  1. Terrain: Fresh shallow and deep water in flowing and still versions, shallow and deep salt water as well as pool water and sewage.
    a. Still water would be clear by default. Unless there's a current to keep it moving solid particles would drop to the bottom and even sewage would settle out within a few days of the sewer system ceasing to function. This would have no effect on its potability.
    b. Flowing water would be cloudy, but not inherently any more unsafe than still water in the region. How to model that variation in potability effectively is an open question, discussed below.
  2. Water from pre-cataclysm municipal sources (currently hot water heaters and toilets). Clean and clear, though potentially dropping in safety over time if water contamination is modeled.
  3. Water from wells, shallow and deep. Presumably water heaters and toilets in more remote houses and locations would also be from local wells. Of variable safety depending on local groundwater.
  4. Water that is visibly off or definitely tainted. Pools of water in gutters with a sheen of oil, toilet tanks with brightly colored toilet bowl cleaner pucks, water from swimming pools etc. Possibly water flowing from pipes like you can see at homeless encampments. This water would not be made potable by boiling, as these contaminants wouldn't be neutralized by heat. Possibly a more advanced water filtration system would be able to deal with this stuff.

Questions:

  1. How to test water safety? Many minerals or pollutants will change the water quality in ways that are easily noticed ( taste, color, odor and staining of fixtures). This can affect all of the types of terrain as well as wells, and should be very visible to the player once they're looking at it. Some of this water, while having alarming characteristics, is still safe to drink. (Or, in extremis, having deleterious health effects that are much longer-term than dehydration.) I haven't found anything online that shows how to make your own kits that test for potability, so they're single use and pretty irreplaceable?
  2. How to model water safety? Water flows the entire length of the Mississippi in 90 days, so within a few months pollution from industrial sources would have gone into the ocean or terminal lake, but in that same timeframe you'd see new issues from lack of maintenance on those same industrial systems. Is it possible to affect groundwater quality based on distance from special locations? The groundwater will be worse next to a dairy farm than it will far away from human construction. Presumably there would be a groundwater safety quality and a flowing water safety quality, and the sum of the two is how dangerous the rivers are to drink? There's some work being done on lakes and rivers; possibly model groundwater boundaries based on that system? Depending on the complexity of the groundwater modeling, there could be significant amounts of useful trace minerals in the water.
  3. Longer term water storage: should water in unsealed containers become contaminated? Water in toilet tanks and water heaters that might be good in the first few weeks may not be good indefinitely, and water that's boiled and poured into an open tin can on the counter will not stay good for long. This opens up possibilities for preserving water sources much like other foods are preserved. You shouldn't expect to boil 60L of water, leave it sitting by your stove and then come back in a month and find it fine.

I agree with the types of water laid out by Kevin. There's been recent upgrades to recipes to track calories from the base ingredients and will carry the (rotten) effect across; will that system work for water contamination? (See here) Will the types of contamination have different effects? Requiring different purification types? I don't know if there were as many options for water purification when Kevin proposed this. As it stands, boiling, the water purification tablets, charcoal water filter and the electronic water filter all would deal with biological contaminants, but only a distillation system like a still or a solar distiller would consistently separate the chemical contaminants from polluted water. Some chemicals have a lower boiling point than water, so even those wouldn't be removed IRL, but we might handwave that issue.

All 4 comments

If water from the same source (river/lake/etc) retains the same cleanliness, etc when I get more of it later, then yeah, this sounds interesting. Nontrivial chance for tedium though, I'm thinking?

This issue was closed as it appears inactive.

Reducing open issues to those which are (or will) be actively worked upon helps us focus our efforts. This issue has not been deleted - it still appears in searches and if it contains relevant information you are encouraged to continue to link to it.

If this issue was a bug

It should be reopened if it can be reproduced in the current build. You can obtain the most recent copy here. Please check there is not a more recent report of this bug before doing so. If no more recent report exists you should continue the discussion in this issue.

If this was a feature request

If the consensus was that the idea was good you could consider submitting an implementation via a PR. If you want to comment further please do so here as opposed to opening a new issue. Before posting check nobody has already made the same point and consider whether your comments are likely to lead to an implementation. If you have doubts about either consider instead voting for the issue

If you want to work on this issue

Then either assign it to yourself or if you are unable to do so claim it via adding a comment. Please don't assign others or make a general request for action.

Here's my take on water and its sources:

  1. Terrain: Fresh shallow and deep water in flowing and still versions, shallow and deep salt water as well as pool water and sewage.
    a. Still water would be clear by default. Unless there's a current to keep it moving solid particles would drop to the bottom and even sewage would settle out within a few days of the sewer system ceasing to function. This would have no effect on its potability.
    b. Flowing water would be cloudy, but not inherently any more unsafe than still water in the region. How to model that variation in potability effectively is an open question, discussed below.
  2. Water from pre-cataclysm municipal sources (currently hot water heaters and toilets). Clean and clear, though potentially dropping in safety over time if water contamination is modeled.
  3. Water from wells, shallow and deep. Presumably water heaters and toilets in more remote houses and locations would also be from local wells. Of variable safety depending on local groundwater.
  4. Water that is visibly off or definitely tainted. Pools of water in gutters with a sheen of oil, toilet tanks with brightly colored toilet bowl cleaner pucks, water from swimming pools etc. Possibly water flowing from pipes like you can see at homeless encampments. This water would not be made potable by boiling, as these contaminants wouldn't be neutralized by heat. Possibly a more advanced water filtration system would be able to deal with this stuff.

Questions:

  1. How to test water safety? Many minerals or pollutants will change the water quality in ways that are easily noticed ( taste, color, odor and staining of fixtures). This can affect all of the types of terrain as well as wells, and should be very visible to the player once they're looking at it. Some of this water, while having alarming characteristics, is still safe to drink. (Or, in extremis, having deleterious health effects that are much longer-term than dehydration.) I haven't found anything online that shows how to make your own kits that test for potability, so they're single use and pretty irreplaceable?
  2. How to model water safety? Water flows the entire length of the Mississippi in 90 days, so within a few months pollution from industrial sources would have gone into the ocean or terminal lake, but in that same timeframe you'd see new issues from lack of maintenance on those same industrial systems. Is it possible to affect groundwater quality based on distance from special locations? The groundwater will be worse next to a dairy farm than it will far away from human construction. Presumably there would be a groundwater safety quality and a flowing water safety quality, and the sum of the two is how dangerous the rivers are to drink? There's some work being done on lakes and rivers; possibly model groundwater boundaries based on that system? Depending on the complexity of the groundwater modeling, there could be significant amounts of useful trace minerals in the water.
  3. Longer term water storage: should water in unsealed containers become contaminated? Water in toilet tanks and water heaters that might be good in the first few weeks may not be good indefinitely, and water that's boiled and poured into an open tin can on the counter will not stay good for long. This opens up possibilities for preserving water sources much like other foods are preserved. You shouldn't expect to boil 60L of water, leave it sitting by your stove and then come back in a month and find it fine.

I agree with the types of water laid out by Kevin. There's been recent upgrades to recipes to track calories from the base ingredients and will carry the (rotten) effect across; will that system work for water contamination? (See here) Will the types of contamination have different effects? Requiring different purification types? I don't know if there were as many options for water purification when Kevin proposed this. As it stands, boiling, the water purification tablets, charcoal water filter and the electronic water filter all would deal with biological contaminants, but only a distillation system like a still or a solar distiller would consistently separate the chemical contaminants from polluted water. Some chemicals have a lower boiling point than water, so even those wouldn't be removed IRL, but we might handwave that issue.

This issue has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/why-are-swamps-in-this-game-filled-with-salt-water/25349/6

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ituluwituluwzev picture ituluwituluwzev  路  3Comments

Cyrano7 picture Cyrano7  路  3Comments

Tsunder picture Tsunder  路  3Comments

BorkBorkGoesTheCode picture BorkBorkGoesTheCode  路  3Comments

Taberone picture Taberone  路  3Comments