CleverRaven / Cataclysm-DDA

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

Mapgen damage over time #65394

Closed fairyarmadillo closed 1 year ago

fairyarmadillo commented 1 year ago

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

Areas that are full of zombies and other baddies, or even just uncared for for long periods of time, should slowly accrue damage as windows break, walls and roofs are damaged from storms, portal storms, tree branches falling, zombies, etc.

Solution you would like.

A possible solution for this would be to have area types in mapgen have a decay score. This score would be high in areas with zombie activity (IE towns), low in isolated areas (like cabins) and nonexistent in areas that are inhabited and cared for by intelligent monsters like mi-go or NPC factions. When these areas get generated (IE when the player gets close enough for them to actually get mapped out by the game, I'm not sure how close that is, but I assume the whole infinite world doesn't get drawn the first time you turn on the game), damage could be applied in a random pattern to all structures, vehicles, and furniture in the area. This damage could be applied in the same manner as it is when you bash - IE it's just a randomized amount of HP damage to whatever's in the tile, so you'd see a lot of broken windows, occasional broken doors, and very rarely a wall or something would be collapsed.

If you wanted to take it further, you could have tall grass and other wilderness plants sporadically growing where there's usually only short grass, to give a sense that nobody's taking care of the lawns. You could also have items in loot tables begin to be damaged or missing, depending on the amount of time passed since the Cataclysm.

Describe alternatives you have considered.

One downside to this method is that already-explored areas would still be static. To me, this seems fine - if the player explores an area early and frequently returns there, it will either get destroyed over time by the zombies and portal storms in the reality bubble, or the player will clear it out and it won't seem so weird that it isn't getting damaged since it's empty.

I know there are vague plans for a more robust system, where you'd get things like active signs of looting, fires burning down big parts of the towns, etc., but I don't know that such a system would necessarily conflict with this one. It could be a good first step toward making the world feel alive, or dead, as it were.

Additional context

The most difficult part, or at least the one I don't know how to do, seems like it would be to figure out how to apply the damage in a random pattern to the maps. I'm sure that's a simple enough thing for a more experienced coder, but C++ is hard.

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.