Jump to content

Recommended Posts

ADV - ACE CPR

Giving you a second chance if your everyday CPR doesn't do squat.

cpr.jpg

 

My community and I had a serious problem with the way ACE handles its CPR.

If you're playing with ace_medical_enableRevive=1 you might have found out that CPR practically does nothing as long as your patient has no pulse (i.e. is in the revive state). You would need to use a Personal Aid Kit to revive your patient, setting all his health variables back to their start values - practically doing a magical heal with the magical wand called PAK.

With adv_aceCPR you can finally use CPR to get someone out of the revive state without healing him completely, making gameplay much more interesting.

 

After successfully "stabilizing" the patient, he/she will have a basic pulse of at least 30bpm. ACE-doctors have a 40% success rate and ACE-medics have a 15% success rate. Regular riflemen can resuscitate a patient, but they will have a much lower success rate. They can still keep the patient from dying due to an expired revive timer though. The success rate is lowered if the patient looses blood and is raised if the patient received Epinephrine right before CPR. The minimum rate is always 2% - except if resuscitation has been disabled for regular riflemen (look at "For mission builders" for additonal info).

With version 1.4.0 a new item has been added to adv_aceCPR: A defibrillator.

The defibrillator works almost like the CPR action, but you have to have a defibrillator in your inventory and it's much faster and the success rate is way higher. You can only use the defibrillator if you're a medic (ace_medical_medicClass > 0).

I highly recommend to put your PAKs in mothballs.

(Btw.: ADV is my nametag, it's not an abbreviation for 'advanced'. ;))

 

The most current version (1.4.9) can be downloaded here: https://github.com/Pergor/ADV_Mods/releases/download/1.4.9/adv_aceCPR.zip

 

Or get it at armaholic (thanks to foxhound!):

news_download_a3_3.png
ADV - ACE CPR v1.4.9

 

For now I uploaded ADV-ACE CPR to Steam Workshop as well:

http://steamcommunity.com/sharedfiles/filedetails/?id=1104460924

 


required_addons.png
Advanced Combat Environment 3 (ACE 3)
Community Base addons A3

The Addon is signed and has a bikey. And of course ACE³ is needed - adv_aceCPR works with at least version 3.12.0

 

For mission builders:

It's possible to limit the CPR to units with ace_medical_medicClass > 0 only. In that case regular soldiers can still keep a patient from running out on revive time, but they can't resuscitate him. An ACE-medic (ace_medical_medicClass == 1) or ACE-doctor (ace_medical_medicClass == 2) can use CPR to resuscitate a patient, depending on your setting.

adv_aceCPR_onlyDoctors = 0;			//all players can resuscitate.
adv_aceCPR_onlyDoctors = 1;			//medics and doctors can resuscitate.
adv_aceCPR_onlyDoctors = 2;			//only doctors can resuscitate.

Additionally you can set the probabilities for successfull resuscitation individually depending on the value for ace_medical_medicClass a player's unit has.

adv_aceCPR_probabilities = [40,15,5,85];	//the first entry is for ace_medical_medicClass == 2, the second for == 1, the third for regular units with ace_medical_medicClass == 0 and the fourth one for the defibrillator.

The classname for the defribrillator item is

"adv_aceCPR_AED"

I highly recommend to adjust the values for adv_aceCPR_probabilities when using the defibrillator.

If you want to enable logging to rpt set this variable:

adv_aceCPR_diag = true;

Current issues:

- Unknown

 

Special thanks:

- LeWarz and the whole Spezialeinheit Luchs for playtesting

- Markus from Boom Tools Filmton for his support and the AED sound!

- T.Fork

 

Changelog:

1.4.9:

  • FIXED: removed superfluous animation start on CPR or AED action.

1.4.8:

  • FIXED: Compatibility to ACE 3.11.0
Spoiler

1.4.7:

  • FIXED: removed time quotient again - seemed to cause issues.

1.4.6:

  • IMPROVED: Added model for defibrillator.

1.4.5:

  • FIXED: wrong query for revive enabled.
  • IMPROVED: pulse reducing medication will now lower the chance of success significantly.

1.4.4:

  • IMPROVED: adv_aceCPR_quotient will revert to 1 for values below 1.
  • IMPROVED: changed nomenclature of functions.
  • IMPROVED: moved call for fn_addTime.
  • IMPROVED: readded time quotient.
  • IMPROVED: bloodvolume and pulse will only be reset if revive is enabled.
  • IMPROVED: morphine now lowers probability.

1.4.3:

  • FIXED: CPR action wasn't available in some cases.

1.4.2:

  • IMPROVED: Raised weight of AED item.
  • IMPROVED: AED will "show" heartrate of patient after use.
  • IMPROVED: Added pain for every use of AED.
  • IMPROVED: Added probability for AED to adv_aceCPR_probabilities.
  • MATCHED: licence

1.4.1:

  • ADDED: sound for AED (great shoutout to Boom Tools Filmton!)
  • FIXED: Wrong function called on non-local AED usage.

1.4.0:

  • ADDED: New defibrillator item.

1.3.4:

  • FIXED: CPR hasn't been working properly since 1.3.3. Should be fixed now.

1.3.3:

  • FIXED: CPR not possible in cardiac arrest (Thanks to T.Fork for pointing that out!)

1.3.2:

  • Changed animation for CPR action.
  • Added prefix to pbo.

1.3:

  • Added new variable adv_aceCPR_probabilities that contains an array of probabilities for [ace_medical_medicClass == 2, ace_medical_medicClass == 1, ace_medical_medicClass == 0 ]. Default values are: [40,15,5].
  • Added new debugging function to streamline the code.
  • Standard ACE-CPR is no longer executed additionally.
  • Revive timer will now gain a random value between 0 and 5 seconds additional to the 15 seconds the action takes to perform.

1.24:

  • adv_aceCPR_onlyDoctors can now have a value of 0 (all can resuscitate), 1 (medics and doctors can resuscitate), 2 (only doctors can resuscitate). Compatibility with boolean-values is still provided (false for 0, true for 2).

1.22:

  • reduced probability of successfull resuscitation for regular soldiers.

1.21:

  • added variable adv_aceCPR_onlyDoctors (default: false) to allow successfull CPR only for medics with ace_medical_medicClass = 2.
  • updated ReadMe & license.

1.2:

  • added a lot of debugging possibilities (set adv_aceCPR_diag = true).
  • added changing probability of success depending on medication and bloodloss.
  • fixed a minor locality issue.

1.1:

  • Fixed locality issues.

1.0:

  • First build

 

And of course, the licence:

 

This addon - as a whole - is allowed to be copied, distributed or modified as per the GPL-2.0 licence.

Additional terms apply for using this addon:

You may not use this addon or parts or derivatives of it for any commercial purposes, including monetized game servers.

This addon or parts or derivatives of it may not be used in any derivative of Life gamemode.

Different licences may apply to parts of this addon if it's not copied or distributed as a whole.

Edited by Belbo
Update to 1.4.9
  • Like 8

Share this post


Link to post
Share on other sites

Updated to version 1.1 - hopefully the locality issue has been solved by using cba-eventhandlers.

Share this post


Link to post
Share on other sites

Updated to version 1.2 - changed first post, including licence.

Share this post


Link to post
Share on other sites

Hey foxhound, thanks for your upload! But it seems the mod is not linked to my profile (username Belbo - and not belbo). Could you look into that please?

Share this post


Link to post
Share on other sites

Sorry, forgot to change it (again?). I have updated the page and assigned it to your account.

  • Like 1

Share this post


Link to post
Share on other sites

Updated to version 1.22 - changed first post, including info for mission builders.

  • Like 1

Share this post


Link to post
Share on other sites

Would it be possible to have it so that medics and doctors can use CPR to resuscitate someone, while non-medical personnel can only extend the timer?

Share this post


Link to post
Share on other sites

With

adv_aceCPR_onlyDoctors = true;

you can set it so only ace-doctors (with ace_medical_medicClass == 2) can resuscitate. I'm considering to change it so you can define from which ace_medical_medicClass value upward you can resuscitate.

 

#edit: I've updated it so you can set a numerical value for adv_aceCPR_onlyDoctors depending on which players you want to be able to resuscitate incapacitated players: 0 = all players; 1 = only players with ace_medical_medicClass >= 1; 2 = only players with ace_medical_medicClass == 2.

Share this post


Link to post
Share on other sites

Updated to version 1.24 - changed first post, including info for mission builders.

Share this post


Link to post
Share on other sites

Mind you, if ace_medical_increaseTrainingInLocations > 0 then regular players can still resuscitate, as long as they are in a medic location or vehicle.

Share this post


Link to post
Share on other sites

Updated description, image and generally first post.

Share this post


Link to post
Share on other sites

Thanks for the mod, it looks awesome.

 

I'd like to throw a few remarks in, though ...

 

On 27/03/2017 at 1:45 PM, belbo said:

If you're playing with ace_medical_enableRevive=1 you might have found out that CPR practically does nothing as long as your patient has no pulse (i.e. is in the revive state). You would need to use a Personal Aid Kit to revive your patient, setting all his health variables back to their start values - practically doing a magical heal with the magical wand called PAK.

 

Actually, there are two different states where the patient has no pulse :

The patient might be in cardiac arrest (because of extreme values of heart rate / blood pressure), and each CPR has a 40% chance of restoring heart rate.

The patient can be in revive mode (instead of dying), and CPR will extend the revive state duration (which is useless when that state duration is not finite).

 

Advanced medical simulation in ACE was initially developed without revive state, and players would just die when they took damage ; then they would either disconnect or respawn.

Revive was then added to allow raising dead players with a vanilla-like mechanism, and shorten the reinforcements time.

 

When it comes to your mod, I'm not very sure that I'll use it. On one hand, ACE does provide a revive-state / PAK-raise which will put the patient in a very healthy condition, which is not realistic. On the other hand, your mod does restore pulse with CPR only on a bleeding patient which is not realistic either ; CPR only restore pulse scarcely, mostly for ventilatory causes such as drowning or chocking which are not yet handled by ACE. I wish you could add a new PAK-like item (a defibrillator ?) which could only restore heart pulse, and not restore actual health. I would definitely use it then.


Regards

Share this post


Link to post
Share on other sites

Yes, you're right there.

The problem with the cardiac arrest state in ace³ is that it almost never occurs - the only viable way to fall in cardiac arrest is by bloodloss or medication. The extension of revive time by CPR is almost neglegible, as it adds a random value of 0 to 20 seconds to the revive timer with a fixed cost of 15 seconds (well... practically it doesn't but that's another point). So the current implementation is either useless or cosmetic at best.

My mod's goal is not to deliver a realistic system for CPR (that will come with the ace_medical-overhaul we are all long awaiting) but rather a playable system that provides players with the option not to have their 'fallen' magically revived by a wand and especially remove the need to have special items or abilities to resuscitate an incapacitated player.

 

I thought about adding a defibrilator item to the game - but dismissed that idea, since it would basically do the same thing just in a less gamey costume (and be more of a hazzle ;)). That's why I went with the ace³-CPR action instead. Additionally, the way "health" is handled by ace is a bit curious as well. The values of heart rate, blood pressure and blood volume are in parts connected, so raising just one value will rub off on the others. If blood volume is too low your patient instantly reenters the revive state. That's why my CPR is only removing the revive state and raising the heart rate and blood volume to survivable values.

 

But thanks for your remarks!

Share this post


Link to post
Share on other sites

I recommend making it possible to change the chance of restoring heart rate. Makes it a bit more user friendly, I know theres times in training where teaching medical that it's a lot easier if theres less room for failure, then later on they still know what to do, but theres a chance that they'll fail. 

 

None the less, it's a nice little addition, maybe head over to the github and push a commit, or suggest a push and see if the rest of the guys like your idea. ACE3 is always looking to expand and the guys over there are good blokes. 

 

Share this post


Link to post
Share on other sites

I thought about that as well.

But in that case I'd recommend setting ace_medical_medicClass for the trainees to 2. That way, if you're giving the patient epinephrine before you use CPR on him, the chance to resuscitate him is at 50%.

I keep it in mind and will create an array in the next version with which you can define the probabilities for each ace_medical_medicClass instead of or additional to adv_aceCPR_onlyDoctors. Then you could set them like this: adv_aceCPR_probabilities = [40,15,5]; or [100,100,100]; or however you like.

Share this post


Link to post
Share on other sites

Updated to version 1.3 - changed first post, including info for mission builders.

 

And a polite plea to foxhound: If you could update the thumbnail, Description and Usage at http://www.armaholic.com/page.php?id=32574 that'd be really wonderful.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×