Cumulative Damage

Sorry if this was reminded in an other post, but…

I thought about cumulative damage. Let’s say you have a solid rock wall. Currently, your average joe with a sledgehammer won’t do anything to it. IRL, each hit would chip bits of the wall, and, after a day, you brought it down. IDK if it’s entirely doable, and if the game needs it.

Supposedly the game can’t handle this now? There was a thread that someone said something about this, in the case of breaking reinforced glass. I can’t remember.

Terrain/furniture does not store any sort of “health” value right now. In some cases there are in-betweens, like door, damaged door, door frame, but these are separate terrains with separate bash values.

Thats good . So we could have a multiple stage destruction of a concrete wall where we can see our progress by it turning into different stages of destoyed.

I reallly don’t know why no one tries to do that. It should not be hard!

I reallly don’t know why no one tries to do that. It should not be hard![/quote]

If you’re asking for a damaged concrete wall, well, same reason nobody’s bothered to make the curtainless openable windows. It’d require Quite A Lot of cross-referencing and duplicative JSON. :-/

Well, this is a huge hack, honestly, but it could work to an extent - temporarily hold recently struck tiles in memory, and allow some damage to cumulate. Say, whenever smashing fails, if the power of the blow is >66% of required to smash damage, lower the threshold, up to 75% of the initial. This would be more for “close to threshold” cases rather than full blown cumulative damage.

If this was for short time, it wouldn’t be a hack - it’s how things like this are usually implemented. This wouldn’t be very realistic when interrupted, but in long term would have a similar effect to a “proper” damage solution - walls ignoring low numbers of moderate hits, but eventually giving in.
And if realism matters, we can just compare it with the current solution - if a creature can bash down a wall, it can do so in 1 turn.

I think that’s an ok approach, was maybe going to go this way myself if I got around to it.
Implementation-wise, you could just add a std::map<point, int> that stores “damage to furniture or terrain at x,y”.
Or an array of int or two for that matter, but that seems a bit wasteful.

The temporary nature would rely on chunk loading, when map chunks are written to disk, you just wouldn’t write this damage data out, so on load it will have reset.