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

Added puddles with fresh water. Replaced shallow water in forests with puddles #53231

Merged
merged 15 commits into from
Dec 16, 2021
Merged

Added puddles with fresh water. Replaced shallow water in forests with puddles #53231

merged 15 commits into from
Dec 16, 2021

Conversation

Night-Pryanik
Copy link
Contributor

@Night-Pryanik Night-Pryanik commented Dec 5, 2021

Summary

Features "Added puddles with fresh water. Replaced shallow water in forests with puddles."

Purpose of change

It always bugged me out that you can get an infinite amount of water from a tiniest one-tile piece of shallow water. You found one such tile - you're provided with water up to the end of the game.
This change replaces all tiles with infinite water in forests and swamps with puddles with finite amount of water. This should encourage players to settle next to a more reliable (=infinite) sources of water like rivers, lakes, or ponds.

Describe the solution

  • Added puddles with fresh and salt water. Ingame they're called "recesses". They look like ordinary dirt with water on top of them. Water is spawned automatically during the mapgen due to the new SPAWN_WITH_LIQUID flag. Type of liquid spawned is defined by use of other flags, such as FRESH_WATER. Amount of water spawned is randomized (4 to 24 40 to 240 charges).
  • To get water, one need to examine the tile. Added a new finite_water_source iexamine function which calls liquid-from-ground handler. If there is no liquid on that tile, nothing happens.
  • Crafting correctly recognizes puddles as sources of water.
  • Replaced shallow water spawn in forests with fresh water puddle. Also replaced shallow water spawn in swamps with murky shallow water.
  • I didn't make a migration for old shallow water tiles to new puddles, puddles will only appear when new territory is revealed.

Describe alternatives you've considered

None.

Testing

Started new game, teleported to nearby swamp forest, looked around for puddles with water. Examined puddle to get water in my bottle. Used water directly from a puddle for crafting.

Additional context

Forest with a puddle
изображение

Old picture of swamp with puddles, no longer valid
изображение

In the future we could make that these recesses would be filled with water back again during rains.

@Night-Pryanik Night-Pryanik added the Map / Mapgen Overmap, Mapgen, Map extras, Map display label Dec 5, 2021
@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Dec 5, 2021
@Alex-Folts
Copy link
Contributor

In the future we could make that these recesses would be filled with water back again during rains.

Would be nice if someone implement this later, to compensate for reduce in water sources. The only problem i see is that you can refill water sources with rain, but you can't refill salt water sources with rain, means salt water become deficit over time.

Also it would be nice if rain can fill non-grass dirt tiles making them mud tiles, and eventually converted into puddles, and with time water go away in reverse order...

@Photoloss
Copy link
Contributor

Swamps should keep their "infinite" water. They aren't sealed bowls of pure water but rather one continuous layer of porous sponge-like material saturated with water as long as it is being replenished from somewhere (rain, groundwater, river...)

Similarly if the area is salty enough to yield "salt water" there's probably enough around in the soil to leech out into rainwater and turn it salty for quite a while.

Both of these would need another look once interactions with permanent settlements get added, similar to how tree-cutting faction camp missions already remove forests that scale of effort could drain a swamp. But for the more typical case of a lone survivor filling up a 60l tank or two a swamp is as "infinite" as a pond or forest creek.

If a nerf is needed for gameplay purposes the water should instead be loaded with parasites and toxins more so than toilet bowls, including a bunch which require filtering and chemical processing to remove entirely rather than mere boiling.

@nexusmrsep
Copy link
Contributor

I like the direction this is going, but I also second what was said above.

loaded with parasites and toxins more so than toilet bowls, including a bunch which require filtering and chemical processing to remove entirely rather than mere boiling.

This. Unless taken from running water source like a stream, stagnant water would be loaded with stuff (organic and non organic) that you'd rather not drink even after boiling. Boiled brown water is still brown water. Thus this might be a good point in time to introduce a new kind of water, for the sake of this discussion lets say "murky water" that would need to me mechanically filtered (bringing back the water filer bottles, life straws, etc.) into "water" and then boiled into clean water. This perhaps implies a fourth stage "boiled murky water" but it can be omitted as well. Then place murky water in stagnant reservoirs.

Of course the above can be done separately from limiting water quantity - but here I also second the aforementioned opinions that swamps regenerate their water reservoirs and that forests can have both - shallow puddles and larger ponds. Else you'll end up with one eager player that will dry out the swamp with a galon jug and a barrel at hand, which would be the opposite of what you want to achieve I guess.

It would be very nice to have some puddles appear and evaporate and drain / sink info soil after rain.

@Photoloss
Copy link
Contributor

Thus this might be a good point in time to introduce a new kind of water, for the sake of this discussion lets say "murky water" that would need to me mechanically filtered (bringing back the water filer bottles, life straws, etc.) into "water" and then boiled into clean water. This perhaps implies a fourth stage "boiled murky water" but it can be omitted as well. Then place murky water in stagnant reservoirs.

I was hoping the parasite system used in food could handle this to some extent without adding an entirely new item type to bloat recipes. Mutant toxins at the very least do survive "boiling" type crafting, not sure how parasites are handled especially since we also have recipes such as "raw sausage" which don't involve boiling. That way we wouldn't need to audit every present and future recipe using water as to whether it can kill parasites or work with "murky water", we'd just add a few recipes and item actions (water purification tablets) which explicitly remove the new impurities.

Lab-grade distilled water, which is the one non-comestible context where purity might matter, should require a dedicated process separate from the above as toilet or pool water does not meet such purity standards either. Assuming we have any uses for such in the first place.

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Dec 6, 2021
@Night-Pryanik
Copy link
Contributor Author

Swamps should keep their "infinite" water. They aren't sealed bowls of pure water but rather one continuous layer of porous sponge-like material saturated with water as long as it is being replenished from somewhere (rain, groundwater, river...)

I agree about infinite water in swamps. However, IRL swamps have infinite water in long term. You get some water from puddle, emptying it in the process, and wait for water to reappear.
In game though we have infinite water right here and right now: you can get thousands of liters of water from one tiny puddle and in few minutes.

The ultimate solution IMO would be to make puddles replenish drained water after some period of time, but I don't know how hard it would be to implement.

@Photoloss
Copy link
Contributor

you can get thousands of liters of water from one tiny puddle and in few minutes.

More realistically though the average use case is filling a single 60l tank or 200l drum. Thinking of those as 6/20 10l buckets and keeping in mind the game counts 240/800 charges respectively the 4-24 charges listed in the OP are way too low for a "puddle" up to 1 m² in size. Those little dips exist too but definitely do not match what I picture as a swamp "water" tile. Here's one with nice brown water, still way more than 6l.

@Night-Pryanik
Copy link
Contributor Author

I'm open to discussion on volume of puddles. If you say 60 liters is ok, I'll change my numbers to yours, no problems.

@Photoloss
Copy link
Contributor

Unfortunately I can't really give a proper estimate of the upper limit, especially since the size of a tile is not fixed. For reference a square metre puddle holds 100 l per 10 cm of depth, a 30 cm * 30 cm puddle holds 9 l per 10 cm of depth. So my 60 l puddle only needs to be 6 cm to 70 cm deep, still less than hip height for a short person in the worst case.

Ideally we'd have a large spread with many smaller puddles on the outskirts (down to <1 l) but also rarer clusters of cubic metres of water. Plus mapgen features for actual ponds including salt water and "connecting" adjacent swamp tiles with deeper puddles but that would be a separate PR.

@PatrikLundell
Copy link
Contributor

I'm fine with the introduction of puddles in forests (as mentioned in the OP), and with them having rather limited amounts of water. However, I don't think that logic translates well to swamps, where the water table reaches the surface to create a more or less contiguous body of water partially underground and partially exposed, as opposed to a puddle which tends to just be a depression in the ground filled with water and having a bottom with poor permeability. Sure, there are soggy areas in real world forests, but then you're delving into hybrid area management.
You can drain swamps (and that has been done on a large scale to use the land for agriculture), but you do that by leading the water away through dug channels (or buried pipes), not by scooping up lots of buckets of water.

When it comes to acquiring fresh water for a settlement, a well is the superior choice...

@Night-Pryanik
Copy link
Contributor Author

Ok, I increased amount of water in puddles tenfold (10-60 liters), and removed spawning of puddles in swamps.

@github-actions github-actions bot removed the BasicBuildPassed This PR builds correctly, label assigned by github actions label Dec 7, 2021
Valiant added 2 commits December 8, 2021 10:15
@Night-Pryanik
Copy link
Contributor Author

While I'm here, in swamps I replaced spawn of tiles of shallow water with murky water. Water collected from these tiles can badly poison you if drank untreated (slightly less poison value than that of a sewage).

@github-actions github-actions bot removed astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Dec 8, 2021
@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Dec 8, 2021
@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label Dec 8, 2021
@Night-Pryanik Night-Pryanik changed the title Added puddles with fresh and salt water. Replaced shallow water in forests and swamps with puddles Added puddles with fresh water. Replaced shallow water in forests with puddles Dec 8, 2021
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Dec 8, 2021
@I-am-Erk
Copy link
Member

I-am-Erk commented Dec 10, 2021

I'm clearly late to the discussion here but just to clarify for reference's sake, this is what a new england salt water swamp looks like:
image
so yeah, if anything judging from my searches, we really should have more water in swamps. A later PR might add a "boggy ground" tile for swamps so that there is more walkable ground that's got water in it but can't be built on.

Another thought (again can wait) is that we should have some more, smaller "pond" map extras for forests if we remove the tiny puddly ones.

@github-actions github-actions bot removed the BasicBuildPassed This PR builds correctly, label assigned by github actions label Dec 10, 2021
@nexusmrsep
Copy link
Contributor

Somewhat related: #72 and #47380

@Alex-Folts
Copy link
Contributor

Isn't boiling should solve most of the problems? How about some people whole life use water from well, and often drink not boiled water from that well.

I have feeling that some complains are exaggerated and not fit into overall survival situation, also some problems could take effect only after long period of time which is way beyond gameplay period(not everyone would play same save for 5-10 years).

Ofc best cleaning measure would be distilling, but it requires about 8 times more energy compare to just boil same amount of water, it is slow process, require some equipment, and some sources claims that drinking distilled water for extended period of time would be dangerous.

Collecting rainwater unreliable, again it is mostly distillate, and could be slightly acidic.

@Night-Pryanik
Copy link
Contributor Author

Isn't boiling should solve most of the problems?

Yes, it should.

How about some people whole life use water from well, and often drink not boiled water from that well.

I doubt people who drink untreated water from wells would drink untreated water from puddles and swamps.

overall survival situation

What kind of situation? Drinking untreated water from puddles and swamps is probably better than dying of thirst.

@Alex-Folts
Copy link
Contributor

What kind of situation? Drinking untreated water from puddles and swamps is probably better than dying of thirst.

Yes thats what i mean. While people seems portrait it as insta death.

Whatever i'm out on this.

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Dec 11, 2021
@nexusmrsep
Copy link
Contributor

The only thing that bothers my mind now is if the water new properties (poison, contamination, parasites) interact with stacking with ordinary water. Will it stack & carry over, stack & lose properties or prevent stacking.

@I-am-Erk
Copy link
Member

If stacked, thenpropert should be applied to the whole stack. Theoretically you could dilute it to nothing but there's no rational way to figure that out, so mixing 1l clean water with 1l swamp water should give you 2l swamp water.

@I-am-Erk I-am-Erk merged commit 3d0ca92 into CleverRaven:master Dec 16, 2021
@Night-Pryanik Night-Pryanik deleted the puddles branch December 16, 2021 08:02
@NetSysFire
Copy link
Member

Same issue as https://github.com/Night-Pryanik/No-Hope/issues/4, shallow water still exists in these random forests which I just confirmed. I have no idea how these groves are called though.

@PatrikLundell
Copy link
Contributor

I would guess it's generated by data/json/mapgen/map_extras/winderness.json's copse_trees_palette.
If changed, usages should be checked, as it seems to be used for several "patches", so there might be some that would actually make sense to have reasonably clean water.

@NetSysFire
Copy link
Member

This is more about the infinite water source than about clean water. Those shallow water tiles should maybe be replaced with puddles.

@PatrikLundell
Copy link
Contributor

I'd say both murky water and puddles are better than shallow water, so I agree (and that both volume and freshness are aspects to consider for the other situations where that palette might be used.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions json-styled JSON lint passed, label assigned by github actions Map / Mapgen Overmap, Mapgen, Map extras, Map display
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants