Cardiopulmonary Resuscitation #38278

@Orsoniks

Adds a CPR verb to crit mobs. This starts an automatic, continuous application of small amounts of blunt damage, while removing Asphyxiation and Bloodloss (but not bleeding). The result is more time before the crit person dies (due to blunt damage instead of asphyxiation). The PR is done, it works, and conceptually, everyone seems to be in favor of the general idea. However:

  • A Contributor suggested that it should maybe require actual breathable gas being present, right now, it just simply removes asphyx damage (and some bloodloss). This gave me the idea that it would be more appropriate for it to just tie into SharedRespiratorSystem and not block inhalation for the crit person while CPR is performed. (breathing slowly removes the asphyx damage already present) The change would be fairly simple, at a glance, but only if one is already familiar with RespiratorSystem. It might be unfair to ask this change of a (new) contributor who did not set out to do this. If we want it this way, this could simply be a future update to be done after we merge the proposed version

  • Apparently some version of this already exists on forks, with manual triggering of every compression (every 7? seconds), meaning that it requires actual attention from the first responder. Might be worth thinking about making it manual? @SlamBamActionman

2 Likes

Having it require active attention (be it via pressing the verb, ā€œhugā€ interaction or just that old wideswing bar to act as a skill check) seems like the right direction.
I would also require breathable atmosphere (or internals) for CPR to be effective.

It does start with the alternate action (hug) - though it also executes (and fails, because the target is crit) a hug, which produces a popup. That would be more annoying if you had to press the key every time, so for that the popup should be fixed

I was the one suggested the breathable atmosphere, where I meant CPR should be dependent on if the crit character had access to air (i.e. the room had enough air or they had internals on)

I don’t think it should be a blocker, it can be addressed in a separate PR in my opinion.

Maint Vote to see where we are standing

  • Merge as-is after code review, add the rest later
  • Require respirator stuff and/or manual pressing
  • Close (I guess I technically had to include the option, but come on.)
  • Abstain
0 voters

Yeah, it shouldn’t just magically heal asphyx damage, but rather allow you to breath even when in crit. This should be quite easy to implement, right now the Respirator system just checks the mob state. This should be replaced with a CanBreathe ActionBlocker.

Plot twist, I’m told the downstream is RMC, so there has been MIT-licenced CPR out there for the taking the whole time… We might want to look at that, too

I just checked the RMC code for this and it needs some cleanup in some placed and is hardcoded to a certain RMC role in others. Otherwise it is mostly similar and I don’t see any reason for using their implementation over the PR in our repository.

I like this PR seems like a good addition. How would everyone feel about cpr on dead bodies preventing rot from advancing?

I think making it require proper breathable gas would be nice. Guess basically working through forcing the breathing to proc? Not too familiar with the code in that area.

An aside: Every time I see the defibrillator in game is that they are not magical devices IRL that make people’s heart restart, but rather CPR is what starts it and then defibs help things settle. It would be nice if we could have that somehow eventually. But this idea probably should be inspected separately and isn’t too relevant here.

I think both subjects should have there mouths uncovered for it. the compression pumps air but after a 30 compressions mouth to mouth is needed to restore air to the subject. but that could be a bother to get running, but could be engaging if someone wanted to put time into it (30 clicks, then two long presses). Over all I like the PR though, and think a mini-game on timing is pretty cool.

Well due to how I made the vote, I guess it’s not clear which of the two proposed changes everyone wants. Is it okay if we only do the Respirator functionality for now, or are you all also feeling strong about the timed action ā€œminigameā€?

Requirements for merge? Keep in mind that it would be nice if it could be finished, reviewed and merged by the cutoff on thursday, and that will be aided by asking for less
  • Force respiration instead of direct healing
  • Manual presses and Timing requirement
  • More / Other (Please state)
  • Abstain / Just Ship It
0 voters

Edit: on second thought, putting " just ship it" on this poll was knd of pointless, since that’s the only outcome that won’t happen but cant remove it now

So I checked in with one of the downstreams that use the ā€œrequire constant inputā€ CPR and the feedback was as follows:

  • It’s a cool feature! Useful for the scenarios where it is useful.
  • … But hard to remember existing. While it is easy to initiate, nothing shows it exists.
  • The timing can be a bit tricky to just understand (since it comes with a doafter, should you time it so that the doafter finishes after X seconds, or should you start the doafter after X seconds?).

Okay we have respiration working on the PR branch now.
However. I tried the RMC CPR in dev, and honestly I don’t really feel the repeated pressing, in its current mildly-confusing form, adds a lot to the experience.

It does occupy the player performing the CPR, which might be considered a feature, and may be an important point in a team pvp game. But in Spess 14, what this will do is prevent a bystander from both performing CPR and (effectively) call for help. I think this would be a net negative.

Opinions?

I did the thing. CPR being auto-repeat is now a cvar.

This is how it works: there are two cvars. One for Autorepeat, and one for EffectDuration.
The effect of the CPR (ie, that the crit person can breathe normally) will last for doafter length (0.7 seconds) multiplied by EffectDuration (2 by default)

Keeping Autorepeat on acts exactly as the original proposal: you press interact and CPR will start and keep going (except it allows breathing rather than directly remove asphyxiation damage)

If it’s off, then you need to keep pressing that interaction manually. With the default setting of 2, that means you have 0.7 seconds to start the next CPR interaction after the doafter finishes, otherwise there will be a gap in respiration. And if the next breathe action of the target happens in that gap, they will fail to perform their respiration action. missed respiration will start to build up asphyxiation, though if they never miss multiple in a row they will never actually start to gasp even as they slowly die from the asphyxiation and blunt damage.

Now, having to alt-click or keypress every 0.7-1.5 seconds is… not great. If we want to configure the cvars this way, we might want to consider lowering the required rate of compression. An EffectDuration of 7 would mean a 5 second window, which sounds manageable.
There are two issues with this:

  • there is not any sort of indication about what rate you need to perform CPR at, or of you are doing it well.
  • Blunt damage might have to be increased to make up for the lower rate of compressions, however this means that someone performing CPR at the maximum rate of every 0.7 seconds (either out of cluelessness or will to harm) will cause several times more damage than intended

(whoops, this was an edit instead of a new post. Anyway)

So, opinion? Should I go ahead with this version and commit it?
(I still have some issues with the popups to figure out, but design-wise, is this what we want?

I would like to add to the discussion that the inhale and exhale methods in the respiration system are public.

It would take a bit of work but you could have the do-after force an exhale when you start it (dealing a bit of blunt) and then force an inhale on a successful do-after completion.

Basically the same concept as what was suggested (Since inhale saturation lasts about 2 seconds in normal air) but using the already existing inhale and exhale methods.

Id say that looks good.