Limelight Forums

Full Version: Medical Addon
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I am making a semi-advanced medical addon for Garry's Mod. I was wondering if people would want to help my brain come up with ideas and tweaks.

Here is my original idea document:
Code:
Things to keep track of:

-Number of wounds
   *each wound adds 4 Bps(Blood per second) to blood loss
-Blood Level
   *for blood pressure
   *in 1000 units
   *in B, Blood
-Blood Pressure
   *85%-100% is great
   *70-85% is good
   *50-70% is ok
   *25-50% is bad
   *below 25% is very bad
   *Calculated by **Blood Level**/**Max Blood Level**
   *in %, percentage
-Consciousness
   *determines whether player is conscious
   *in yes or no
-Health
   *Degenerates 10% every 3 seconds when blood pressure is very bad
   *Generates 10% every 3 seconds when blood pressure is great


Items:

-Bandage
   *slows bleeding of wound by 90%
   *6 s to apply
   Explanation: When you bandage a wound the bleeding loss of that wound is reduced by 90%.
-Epinephrine
   *increase blood level by 100 B
   *increase blood loss for a wound by 2 Bps
   *3 s to inject
   Explanation: When you use epinephrine, the patient will increase blood level by 100 B but will also increase blood loss for each wound by 2 Bps.
-Morphine
   *will make a person conscious if blood pressure is above good or great
   *3 s to inject
   Explanation: When you use morphine on a unconscious person with a blood pressure good or great they will become conscious.
-Saline IV
   *constant morphine
   *last 20 s
   *no overdose
   Explanation: A constant dose of morphine being injected through IV.
-Blood IV
   *constant increase in blood level by 25 Bps
   *last 10 s
   Explanation: A constant increase of blood through IV.
-Surgical Kit
   *stop bleeding of a wound
   *10 s to apply
   Explanation: A surgical kit that will completely stop the bleeding of one wound.
-Blood Pressure Reader
   *reads out blood pressure of applied patient
   Explanation: A device that constantly reads blood pressure.


Features:

-Health Menu
   *Use medical supplies on player
   *Perform medical actions on player
   Explanation: A menu that can be access for every player that allows a medic to perform medical actions.
-CPR
   *performed until moved
   *increases blood level by 15 Bps
-Pressure
   *performed until moved
   *applies pressure to a single wound
   *reduces blood loss for that wound by 50%



Here is my current document:
Code:
Things to keep track of:

-Number of wounds [Head, Torso, Arms, Legs] DONE
    *Head loses 4 Bps
    *Torso loses 3 Bps
    *Arm and leg loses 2 Bps
-Blood Level DONE
    *for blood pressure
    *in 1000 units
    *in B, Blood
-Blood Pressure DONE
    *86%-100% is great
    *71-85% is good
    *51-70% is ok
    *16-50% is bad
    *1-15% is very bad
    *Calculated by **Blood Level**/**Max Blood Level**
    *in %, percentage
-Heart DONE
    *stored as whether heart is working or not
    *no pulse
    *pumps 5 Bps into the body
    *75% chance of failure if blood pressure is very bad
    *100% chance of failure if blood pressure is 0%
-Consciousness DONE
    *Becomes unconscious in bad blood pressure
    *determines whether player is conscious
    *in yes or no
-Health DONE
    *Degenerates by 5% every 4 seconds when blood pressure is very bad
    *Generates by 5% every 4 seconds when blood pressure is great


Items:

-Bandage DONE
    *slows bleeding of wound by 90%
    *4 s to apply
    Explanation: When you bandage a wound the bleeding loss of that wound is reduced by 90%.
-Epinephrine DONE
    *increases the chance of CPR by 25%
    *last 20 s
    *2 s to inject
    Explanation: When you use epinephrine, it adds 25% to your chances of restarting someones heart through CPR.
-Morphine DONE
    *undos the effects of surgical kits on player speed
    *must have had surgery performed
    *2 s to inject
    Explanation: When you use morphine, it will remove the limiting speed effects of the surgical kits.
-Blood IV (500 B) WIP
    *constant increase in blood level by 25 Bps
    Explanation: A constant increase of blood through IV.
-Surgical Kit DONE
    *stop bleeding of a wound
    *makes patient walk at half of normal speed and prevents running
    *8 s to apply
    Explanation: A surgical kit that will completely stop the bleeding of one wound.


Features:

-Health Menu WIP
    *Use medical supplies on player
    *Perform medical actions on player
    Explanation: A menu that can be access for every player that allows a medic to perform medical actions.
-CPR DONE
    *8 s to apply
    *performed to restart the heart
    *50% chance



Through Throw any ideas at me.
^I need help.

If you want to help develop it, reply your discord info.

Guv

‍ 

"If this fails the Paramedic has to idk the term but uh insert some sort of syringe into the neck where the patient can breath through."

I belive the procedure would be a tracheostomy [if that's correct,i hope so] where basically instead of putting an ET tube through the mouth and down the throat, an incision is made in the throat past the blockage and an ET tube is passed through the incision and down the throat that way 


?
(Aug 3, 2019, 08:16 PM)Nebula Wrote: [ -> ]

I was writing a reply as to why I am not doing some of this stuff when I came up with ideas about a respiratory system and a more advanced but still simple cardiac system. 

Tongue in throat:
It probably won't be implemented, but maybe I can add a way to block the airway with blood from a head injury.

ECG:
Real ECG won't be a thing. The only heart stuff planned for now is a heart rate which controls the amount of blood put in the body naturally. Will probably add a way for the heart to fail, so you can still use a defibrillator and CPR. Also, I am trying to find a way to calculate some sort of real blood pressure without recreating the human circulatory system.

Exhaustion:
Exhaustion is something that is definitely possible, and I am highly considering it.


I'm writing up a new document.
Would personally like to see a system like ACE3 in arma3
(Aug 3, 2019, 10:52 PM)Daley Wrote: [ -> ]Would personally like to see a system like ACE3 in arma3

I am looking into how I can implement more of this into the addon. Totally forgot about this. Thanks


For BpS (Bloodloss per Second), make it a variable based on hitbox detected.  A hit to a hand/foot 1-5, randomly applied upon hit.  Where as a head would be (1-5)+3-5, as a head injury.  Heads bleed more and bleed faster than your foot.


Additionally, make sure this is tied to the weapon, not to damage in general.  I imagine car impacts are going to cause this system to spaz out from the multiple impacts on the ragdoll.  Besides, they typically auto down anyway.

Might be accomplished by having your med system call from the damage type using a reverse logic select statement.

Something like

If dmg != weapon_damage then

    skip bps
Else
    Call damage location.

Could even have it impacted by bullet type, because a .50 will do more damage than we'll say a .223(5.56).

In that case you could add in

Else
    Call ammo type
    Call damage location
    BpS = Damage location + ammo type.

And just have a random number generator applied to both in the ranges you feel are moderate.
(Aug 4, 2019, 06:43 PM)Jokhah Wrote: [ -> ]

For BpS (Bloodloss per Second), make it a variable based on hitbox detected.  A hit to a hand/foot 1-5, randomly applied upon hit.  Where as a head would be (1-5)+3-5, as a head injury.  Heads bleed more and bleed faster than your foot.


Additionally, make sure this is tied to the weapon, not to damage in general.  I imagine car impacts are going to cause this system to spaz out from the multiple impacts on the ragdoll.  Besides, they typically auto down anyway.

Might be accomplished by having your med system call from the damage type using a reverse logic select statement.

Something like

If dmg != weapon_damage then

    skip bps
Else
    Call damage location.

Could even have it impacted by bullet type, because a .50 will do more damage than we'll say a .223(5.56).

In that case you could add in

Else
    Call ammo type
    Call damage location
    BpS = Damage location + ammo type.

And just have a random number generator applied to both in the ranges you feel are moderate.

Ammo Type and Scaling Damage
I will not be making ammo type affect the wound. I also won't be changing any damage scaling.

Damage Location and Wounds
I am making wounds be set to a body part (Head, Torso, Arms, Legs). Every wound has its own bleeding rate, so I can use damage information and location to set different bleeding rates for different situations. I am trying to mock some of the ace3 advanced medical information (here). Each wound will have its own description to make it easier to determine treatment.


What I'm saying is that you can call the damaging ammo type and use it as a variable for your BpS.

IE: Instead of a chest shot always equaling 5 (example number), It could be a range 1-3 with ammo type determining any + modifiers.

Chest Shot Hard Coded = 5 BpS

Chest Shot Variable Coded = 1-3 + Ammo modifier 0-3

That way one chest shot might be more or less serious than another, as opposed to each of the two patients having the exact same seriousness assuming they both were shot in the same location the same number of times.

Logically, getting hit by a .22 will have less impact on blood loss and injury size than a .50.

Example of how to call it.

Set a case statement that covers what modifiers, if any, are applied per type of ammo.

Case .22 = 0
Case .50 = + between 1-3.

You don't have to go with it, but it would make your system less concrete and predictable.

This has nothing to do with damage tables or scaling as it applies to weapons.  Only as it applies to your Blood Loss Rates.
(Aug 8, 2019, 06:35 PM)Jokhah Wrote: [ -> ]

What I'm saying is that you can call the damaging ammo type and use it as a variable for your BpS.

IE: Instead of a chest shot always equaling 5 (example number), It could be a range 1-3 with ammo type determining any + modifiers.

Chest Shot Hard Coded = 5 BpS

Chest Shot Variable Coded = 1-3 + Ammo modifier 0-3

That way one chest shot might be more or less serious than another, as opposed to each of the two patients having the exact same seriousness assuming they both were shot in the same location the same number of times.

Logically, getting hit by a .22 will have less impact on blood loss and injury size than a .50.

Example of how to call it.

Set a case statement that covers what modifiers, if any, are applied per type of ammo.

Case .22 = 0
Case .50 = + between 1-3.

You don't have to go with it, but it would make your system less concrete and predictable.

This has nothing to do with damage tables or scaling as it applies to weapons.  Only as it applies to your Blood Loss Rates.

This might be implemented but to an extent. Ammo types are unique between different weapon addons. So one addon's .44 ammo type could just be one character off from another addon's .44 ammo type and not be registered as that type of ammo; consequently, it would create inconsistency between weapons and possibly create frustration for users of the addon.
I have decided to split this project between two addons. The first having the ideas of the document first written up (with improvements). The majority of the server side systems are done. Client side work (User Interfaces), entities, and SWEPs are still being worked on. I suspect this will take me the rest of August. The thread will be updated shortly with a modified idea document which includes the project's current progress. 

The second addon will take more time as it will be way more advanced. I am using certain bits of free time to continue research and write down ideas. I plan on having at least realistic vitals which includes breathing, heart rate, blood pressure, blood oxygen saturation, temperature, and glucose level. Wounds are planned to be way more advanced with fractures being implemented. I want to have medicine that will affect the body and vitals in a realistic manner. I for sure want to implement some sort of pain mechanic which will have certain effects on vision and movement. None of this is set in stone, I don't know how much of this is possible without breaking the game, but I have very high hopes for it.
New menu https://imgur.com/0W7FOTK

https://imgur.com/mdTKgkx

Guv

(Aug 15, 2019, 05:56 AM)Monkey Wrote: [ -> ]New menu https://imgur.com/0W7FOTK

https://imgur.com/mdTKgkx

looks good
https://imgur.com/a/2PjSF2c

More pictures of the user interface for the addon. 


I have a question. Would you want to be able to use SWEPs (if possible) or just use the medical menu?
Pages: 1 2