CleverRaven / Cataclysm-DDA

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

More underbrush-like terrain which can be foraged #77288

Open NetSysFire opened 1 week ago

NetSysFire commented 1 week ago

Is your feature request related to a problem? Please describe.

We only have the underbrush to forage yet we have different biomes. It would be amazing if there was the possibility of having more foragable terrain, each with their own loot table. There are already a couple of good usecases:

  1. Pile of sand, found on the shore and close to rivers. Can yield crabs and river debris and the like.
  2. Tangled mound of dirt. Found in, who'd have guessed, swamps. Yields loot that is more appropriate to swamps. Different bird eggs, more reptile eggs perhaps and different plants.
  3. Fungal underbrush. Found in mycus territory. Can yield mycus matter and maybe even one of those elusive berries?
  4. Tree stump or fallen log with mushrooms. Yields mainly/only shrooms.

Solution you would like.

I believe the best way to accomplish that is using examine_action. Like this (concept stolen from effects on condition):

"examine_action": { "type": "forage", "itemgroups": { "spring": "foraging_beach_spring" } }

The tricky part is that our current underbrush turns into t_underbrush_harvested_spring when harvested in spring and turns back into t_underbrush when the season changes, so this is unfortunately not a good first issue.

Describe alternatives you have considered.

No response

Additional context

No response

ampersand55 commented 1 week ago

Arguably you could forage in urban environments too, like in scrap heaps. garbage bins, recycling centers and debris.

Dynamically generating some items upon foraging might help preventing 10 gb save files.

NetSysFire commented 1 week ago

The issue is that underbrushes and similar regenerate while those piles of rubble are meant to be finite.

ampersand55 commented 1 week ago

Yea it would need some code support, but given that we're adding forage support for different terrains it shouldn't be much more than adding a JSON flag to mark its non-generation.

Foraging underbrushes is currently hardcoded as "shrub_wildveggies" and it's more complicated than a simple harvest function as it's success chance and move cost depends on survival skill and perception.

ADekema commented 1 week ago

A problem with being able to forage stumps and tree trunks would be the fact that you would be able to cut down a tree and magically shrooms appear on it. If you could forage tree stumps and trunks it might also be sensable to add stuff like worms or various edible bugs that you might find in old rotten stumps (If you break it open with a tool).

Could also be added to pretty much all other forageable terains. Maybe even some unusually big insects that are mutated but not fully cat sized yet.

Maddremor commented 1 week ago

Just to be cautious, if this is added then foraging needs to be less bountiful to compensate lest we get an even greater food abundance than we already have.

NetSysFire commented 1 week ago

Have you made an issue to track the balancing of the food supply?