Simple-Station / Einstein-Engines

A Space Station 14 upstream repository, inspired by Baystation12.
GNU Affero General Public License v3.0
46 stars 122 forks source link

CPR Rebase and Rework Design Document #473

Closed VMSolidus closed 1 month ago

VMSolidus commented 3 months ago

Description

CPR was originally a Nyanotrasen feature, which allowed crewmembers to perform CPR on individuals in critical condition. When performing CPR, after a short Do-after requiring both performer and patient not move, the patient would be given the ability to breathe for a few seconds, even while in crit. Although this feature was somewhat poorly coded, and had several glaring issues with it, it did add a significant amount of depth to the game experience for players. Predating the Epi-pen and Defibrillator entirely, CPR was originally pitched as a way for non-medical crewmen to help with medical gameplay, and acted as a stopgap for the medical system being very poorly implemented.

To state right now, I have no intention of copying the original Nyanotrasen CPR code, I do not believe it to be worth recovering. Instead I wish for it to be rewritten using existing Systems that were not originally available at the time of its creation. But after discussing the subject extensively with Old Dance Jacket, I am also putting forward a design document for a full rework of CPR, so that it is significantly more relevant to today's version of the game. My changes look to address some issues with medical gameplay that I feel are being incorrectly addressed elsewhere with destructive changes.

Reworked CPR Mechanics

  1. The Do-after will repeat itself unless interrupted
  2. If the patient is in Crit, the patient will be healed of a small amount of Airloss damage
  3. If the patient is "Dead But Not Rotten", it heals a small amount of Airloss damage and decrements the patient's Rot Timer by 6 seconds. This effectively means that so long as a patient is actively receiving CPR, their rot timer is paused.
  4. A dead patient should metabolize a very small amount of chems anytime CPR is completed on them.
  5. If CPR can reduce a person's airloss damage such that their total damage drops below 200, there should be a very small chance that the CPR will resuscitate them back to a crit or alive state. This is rolled as probably a 1% chance each time the Do-After is completed.

Okay, but they're dead?? Why reduce the rot timer??

Dead isn't a binary yes or no state, and unfortunately the game's medical system is kind of bad. It's very clear to someone with real world CPR training that the rotting system is a sort of poorly worded and portrayed abstraction of the complexity of how people die. But basically, if your heart stopped as you were reading this sentence, you wouldn't be dead. Space Station 14 would say you're dead, but clinically you aren't. If I went and started performing CPR on you while your heart was stopped, your eventual "Brain death"(the point of actual, true death) will be delayed until I run out of stamina and pass out from exhaustion. The point is to buy time for a real doctor to show up with real medical equipment, and revive you. CPR is the act of buying precious time for that doctor to arrive.

So How Does This Improve Medical "Experience"?

  1. Reworked CPR helps expand the role-play aspect of Medical. Your character gets to be the Good Samaritan by performing CPR on a coworker.
  2. Gives a way for non-doctors(who buy the CPR Training trait) to positively interact with medical staff. John Greytide spent 2 of his starting trait points on CPR Training, and now he's in the medbay performing CPR on the Captain, while Urist McDoctor is frantically searching for epinephrine and bicaridine.
  3. It may also provide opportunities for antagonists to potentially earn people's trust. Who in their right mind would ever suspect the guy performing CPR on the Captain?
  4. Helps solve at least part of the problem of people being brought into the medbay with severe injuries, and being rejected by medical staff due to a perceived risk of rotting. This should never happen so long as a spare hand is available to perform CPR.
  5. If there are zero medical supplies available at all, it gives you at least SOMETHING to do to help, rather than sit around watching people's rot timers slowly go up.
  6. Gives Paramedics and Interns something extremely important to do, especially if triage is being solo'd by a Gigachad CMO with a duffel bag full of bicaridine jugs.
  7. Helps reduce reliance on Cloning/Metempsychosis. Look, not everyone likes these two machines, but they exist for a reason, and that reason is "Medical gameplay sucks". I'm not going to pretend that CPR will eliminate the need for Cloning/Metem, but by god every little thing I can do to make medical suck less, will mean people are less likely to be frustrated by the two bad-gameplay-bandaid-simulators

But What About Morgue/StasisBed/Cryo/UnobtainiumChemistry?

A person is required to perform CPR, you can't thank a stasis bed for saving your life. This provides a substantial RP benefit to medical gameplay, encouraging teamwork, and provides a meaningful solution that doesn't involve chemists begging salvage to fulton dead space carps to the medbay. I've grown sick of other forks making the medbay jobs worse by replacing one bad solution with another, and right now the current in favor bad solution is "Unobtainium Chemistry". Utterly deranged.

Related PRs:

DangerRevolution commented 3 months ago

The Do-after will repeat itself unless interrupted For moar gameplay and LARP; you should have to do it on a timer (ala CM13 or 14). i.e: CPR once, then have to wait a second or two, CPR again.

VMSolidus commented 3 months ago

The Do-after will repeat itself unless interrupted For moar gameplay and LARP; you should have to do it on a timer (ala CM13 or 14). i.e: CPR once, then have to wait a second or two, CPR again.

Back when I played on Baystation forks in 2010, the way CPR worked was you had to actually time yourself to a rhythm in real life, and click with a certain cadence. And the game would fail you if you clicked too slow or too fast. I don't think I want to subject players to that lmao. But it could very well be setup as CVar'able "CPR Difficulty" levels. With the highest difficulty CPR being one where you have to keep clicking to the beat of "Another One Bites The Dust".

DEATHB4DEFEAT commented 3 months ago

Back when I played on Baystation forks in 2010, the way CPR worked was you had to actually time yourself to a rhythm in real life, and click with a certain cadence. And the game would fail you if you clicked too slow or too fast. I don't think I want to subject players to that lmao. But it could very well be setup as CVar'able "CPR Difficulty" levels. With the highest difficulty CPR being one where you have to keep clicking to the beat of "Another One Bites The Dust".

I'd like a rhythm that the accuracy you have to have depends on your skill level and a CVar, or until skills come we just have “good luck” and “don't worry, I'm a Doctor!”.

VMSolidus commented 3 months ago

Back when I played on Baystation forks in 2010, the way CPR worked was you had to actually time yourself to a rhythm in real life, and click with a certain cadence. And the game would fail you if you clicked too slow or too fast. I don't think I want to subject players to that lmao. But it could very well be setup as CVar'able "CPR Difficulty" levels. With the highest difficulty CPR being one where you have to keep clicking to the beat of "Another One Bites The Dust".

I'd like a rhythm that the accuracy you have to have depends on your skill level and a CVar, or until skills come we just have “good luck” and “don't worry, I'm a Doctor!”.

Problem is that we can't use left clicks. It just occurred to me that both "Higher difficulty CPR" versions are nonviable with the game's current code for the very same reason that I can't reuse the original CPR code. Left click in help mode is hardcoded to hug people. It has to be done through a right click menu with context sensitive verb, and I just gave it a try by simulating Bay CPR on one of my desktop icons via an imaginary right click verb. It was literally impossible for me to get the cadence. It was impossible for me to get even 1/4th of the necessary cadence.

DEATHB4DEFEAT commented 3 months ago

Back when I played on Baystation forks in 2010, the way CPR worked was you had to actually time yourself to a rhythm in real life, and click with a certain cadence. And the game would fail you if you clicked too slow or too fast. I don't think I want to subject players to that lmao. But it could very well be setup as CVar'able "CPR Difficulty" levels. With the highest difficulty CPR being one where you have to keep clicking to the beat of "Another One Bites The Dust".

I'd like a rhythm that the accuracy you have to have depends on your skill level and a CVar, or until skills come we just have “good luck” and “don't worry, I'm a Doctor!”.

Problem is that we can't use left clicks. It just occurred to me that both "Higher difficulty CPR" versions are nonviable with the game's current code for the very same reason that I can't reuse the original CPR code. Left click in help mode is hardcoded to hug people. It has to be done through a right click menu with context sensitive verb, and I just gave it a try by simulating Bay CPR on one of my desktop icons via an imaginary right click verb. It was literally impossible for me to get the cadence. It was impossible for me to get even 1/4th of the necessary cadence.

It's not hardcoded, it's just a priority issue nobody resolved.

DangerRevolution commented 3 months ago

Back when I played on Baystation forks in 2010, the way CPR worked was you had to actually time yourself to a rhythm in real life, and click with a certain cadence. And the game would fail you if you clicked too slow or too fast. I don't think I want to subject players to that lmao. But it could very well be setup as CVar'able "CPR Difficulty" levels. With the highest difficulty CPR being one where you have to keep clicking to the beat of "Another One Bites The Dust".

I'd like a rhythm that the accuracy you have to have depends on your skill level and a CVar, or until skills come we just have “good luck” and “don't worry, I'm a Doctor!”.

Problem is that we can't use left clicks. It just occurred to me that both "Higher difficulty CPR" versions are nonviable with the game's current code for the very same reason that I can't reuse the original CPR code. Left click in help mode is hardcoded to hug people. It has to be done through a right click menu with context sensitive verb, and I just gave it a try by simulating Bay CPR on one of my desktop icons via an imaginary right click verb. It was literally impossible for me to get the cadence. It was impossible for me to get even 1/4th of the necessary cadence.

Make it an easier cadence; you don't need to do real life CPR cadence

VMSolidus commented 3 months ago

PREREQUISITES: https://github.com/space-wizards/space-station-14/pull/28050

DangerRevolution commented 3 months ago

PREREQUISITES: space-wizards/space-station-14#28050

What's status on mirror bot? We really should try limit manually scraping..

VMSolidus commented 3 months ago

PREREQUISITES: space-wizards/space-station-14#28050

What's status on mirror bot? We really should try limit manually scraping..

If I need something immediately, I'll just punch gitlens cherry-pick in vscode and take whatever I need. I've already grabbed it for my code. It's apparently really easy to do now that I've gotten used to doing it.