Commit Graph

40 Commits

Author SHA1 Message Date
Brett
eeba8a8dbf
Medical - Add Alternative Survival Chance (#8192)
Co-authored-by: TyroneMF <TyroneMF@hotmail.com>
Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
Co-authored-by: Kyle Mckay <5459452+kymckay@users.noreply.github.com>
2021-04-15 11:54:00 +02:00
mharis001
a7bd05ddd3
Medical - Add fracture chance setting (#7396) 2020-02-22 21:31:14 +01:00
PabstMirror
4eeac9f649
Medical - Death from sum of trauma (#7195)
* Medical - Death from sum of trauma

* fixes

* Update fnc_determineIfFatal.sqf
2019-10-08 10:45:09 -05:00
PabstMirror
a71879ccea
Medical - Increase severity of falling damage and Improve non-selectionSpecific wounds (#7214)
* Medical - Increase severity of falling damage

* Improve non-selectionSpecific wounds

* Use macros for hitpoint indexes
2019-10-08 10:44:49 -05:00
PabstMirror
f04b26b93e
Medical - Finish splint/fracture (#7045)
* Medical - Finish splint/fracture

- Add replacement items

* Add splint models

* Add fracture sound effects

* Add treatment interaction icon
2019-06-22 16:47:35 -05:00
mharis001
08a7d2706e Add wounds var macros (#7058) 2019-06-22 13:36:27 -05:00
SilentSpike
8483a4bcdc Medical - Fix severity of wound bleeding and adjust cardiac output calculations (#7010)
* Fix severity of wound bleeding

I'm simplifying the nastiness calculations so that the wound config
specifies the worst wound and we scale it between 25% to 100% based
on the wound damage and number of wounds recieved.

Similarly I've updated the wound configs to more reasonable maximum
bleeding values based on the fact that they're percentages of cardiac
output being bled.

* Limit variance of pain modifier

This is to avoid unexpectedly high pain for small wounds or unexpectedly
small pain for large wounds

* Make more wounds increase chance for nastiness

Rather than guarantee

* Adjust worst damage scaling

This handles torso wounds better as they're typically around 0.3-0.6 for
6.5mm shots which makes them roughly medium sized.

* Fix cardiac output calculation

Previously the calculation didn't make sense as it wasn't outputting
a value in l/s. This method of calculation makes more logical sense and
provides a point of reference for what the bleeding values actually
represent (percentage of the blood being pumped that is lost - which now
has an actual volumetric value).

* Fix blood pressure after change to cardiac output

* Fix heartrate skyrocketing between 5l and 4l blood

Pretty sure someone accidnentally got these conditions the wrong way
around. This way blood pressure will first drop and then heart rate will
later go up to compensate.

* Fix comment typo

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>
2019-06-10 11:23:21 -05:00
mharis001
44050df98b Medical Treatment - Modernize and Cleanup (#6933)
* Modernize and cleanup medical_treatment

* One line for each old public function

* Fix litterCleanupDelay name

* Improve adjustment calcs / wound blood loss / medications

fix func descriptions

Calc wound blood loss on events

reorder includes so scritpmacroMed has global effect

trivial optimization for getCardiacOutput

Fix var

Fix wounds not reopening (nil _category)

Fix surgical kit inherting canBandage conditional

debug hitpoints

Update ACE_Medical_Treatment_Actions.hpp

Use woundBleeding for IS_BLEEDING macro

rework medication vars

comments

Reset var in init / fullHeal

Update addons/medical_treatment/functions/fnc_onMedicationUsage.sqf

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>

* Change wound data array

Drop unique id and merge classId and category

* Splinting and treatment and gui

* Add arm fractures and aim effects

* localizations and event

* fix

* fix merge for renamed files

* Fixes and code review changes

* Move medical logs clearing to treatment

* More cleanup work

* cleanup

* Apply suggestions from code review

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>

* formating, rename bone images

* Fix args for setDead call in actionPlaceInBodyBag

* Apply suggestions from code review

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>

* disable calls to extension

* Update fnc_onMedicationUsage.sqf

* Medical - Skip unneeded setVars on initUnit (#6949)

*  Medical - Transfer state machine state on locality (#6950)

* Medical - Transfer state machine state on locality

* Fix feedback isUnconscious var

* Exclude AI

* Make UAV excludes consistant, formating

* Update fnc_treatmentFullHealLocal.sqf

* reset fractures on respawn

* Fix merge

* Add PAK time coefficient setting

* Fix medication

* Add ace_medical_replacementItems config array

* checkItems performance improvement

* Treatment - cap max animation speed (#6995)

* Treatment - cap max animation speed

and add lock to prevent AF from reseting anim

* Update fnc_getBandageTime.sqf

* Use local version of setAnimSpeedCoef

* Revert "Use local version of setAnimSpeedCoef"

This reverts commit 36c22a9047.

* Move replacementItems compiling to preInit

* Improve replacementItems compiling

* Cleanup splint functions, use macros for fractures

* Rename splintCondition to canSplint

* Add cprCreatesPulse setting

* Cleanup remaining functions

* Capitalize stringtable entry names

* getStitchTime function and fix treatment locations

* Update addons/medical_treatment/functions/fnc_getHealTime.sqf

Co-Authored-By: SilentSpike <silentspike100+Github@gmail.com>
2019-06-03 10:31:46 -05:00
PabstMirror
e56cc0d74e
Limping / Splint Treatment (#6947)
* Improve adjustment calcs / wound blood loss / medications

fix func descriptions

Calc wound blood loss on events

reorder includes so scritpmacroMed has global effect

trivial optimization for getCardiacOutput

Fix var

Fix wounds not reopening (nil _category)

Fix surgical kit inherting canBandage conditional

debug hitpoints

Update ACE_Medical_Treatment_Actions.hpp

Use woundBleeding for IS_BLEEDING macro

rework medication vars

comments

Reset var in init / fullHeal

Update addons/medical_treatment/functions/fnc_onMedicationUsage.sqf

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>

* Change wound data array

Drop unique id and merge classId and category

* Splinting and treatment and gui

* Add arm fractures and aim effects

* localizations and event

* fix

* cleanup

* Apply suggestions from code review

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>

* formating, rename bone images

* Apply suggestions from code review

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>

* disable calls to extension

* Update fnc_onMedicationUsage.sqf

* Medical - Skip unneeded setVars on initUnit (#6949)

*  Medical - Transfer state machine state on locality (#6950)

* Medical - Transfer state machine state on locality

* Fix feedback isUnconscious var

* Exclude AI

* Make UAV excludes consistant, formating

* Update fnc_treatmentFullHealLocal.sqf

* reset fractures on respawn
2019-05-11 23:13:59 -05:00
PabstMirror
847d2d4179
Medical - Improve adjustment calcs / wound blood loss / medications (#6910)
* Improve adjustment calcs / wound blood loss / medications

fix func descriptions

Calc wound blood loss on events

reorder includes so scritpmacroMed has global effect

trivial optimization for getCardiacOutput

Fix var

Fix wounds not reopening (nil _category)

Fix surgical kit inherting canBandage conditional

debug hitpoints

Update ACE_Medical_Treatment_Actions.hpp

Use woundBleeding for IS_BLEEDING macro

rework medication vars

comments

Reset var in init / fullHeal

Update addons/medical_treatment/functions/fnc_onMedicationUsage.sqf

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>

* Update addons/medical_treatment/functions/fnc_onMedicationUsage.sqf

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>
2019-04-27 14:12:11 -05:00
PabstMirror
f2b9bf3a17 Update headers 2019-03-30 11:07:54 -05:00
Rutger "RedBery" Meijering
15036d7fd8 Fixes to unconsciousness and damageTypes systems (#6589)
* Fixes BleedingCoef having impact on bloodloss KO
Fixes incorrect var in setUnconscious

* Changes method for checking if typeOfDamage is valid
Adds check for if typeOfDamage is valid to extension version of woundsHandler

* Changes collision wound location select to a weighted system to make it more lethal at faster collisions
Adds collision and drowning damage types to config (drowning has no related wounds to prevent wounds being added while drowning).

* Fixes unneeded space

* Fixes minor mistake (body damage chance should go from 1 to 0 without ever becoming negative)
2019-03-21 19:33:51 +01:00
Magnetar
89927a8b94 Missing privates. Lazy evaluation. 2019-03-17 21:26:15 +01:00
SilentSpike
9e5c4a7ed9
Move medical settings into their respective components (#6493)
* Transfer medical AI to CBA setting
* Neuter the old settings module

I've left the entry in CfgVehicles so that it doesn't cause errors on
older missions, but it's just a dumb logic now and does nothing.

* Remove medic setting
* Move increaseTraining setting
* Move fnc_adjustPainlevel to medical_status
* Move pain and bleed coefficients to medical_status
* Move advanced bandages to medical_treatment
* Move advanced medication to medical_treatment
* Move advanced diagnose to medical_treatment
* Move wound reopening and screams settings
* Move damage threshold settings
* Move showPain setting
* Move statemachine settings
* Move pain visualisation setting
* Move all treatment usage settings
* Move self IV setting
* Move remaining settings
* Sort treatment setting string categories
2018-08-06 17:08:43 +01:00
Dedmen Miller
6bd8542eed Move #includes before function headers (#6484) 2018-07-30 10:22:14 +01:00
SilentSpike
2ea7c349ca
Add possibility for lethal organ damage (#6277)
* Change fatal injury to emulate lethal organ damage
2018-07-29 21:19:04 +01:00
Thomas Kooi
604fa0e4cb
Fix some script errors on medical rewrite (#6450) 2018-07-18 22:50:03 +02:00
SilentSpike
34eb5553ea
Move scream and moan sounds to medical feedback (#6438)
* Move scream and moan sounds to medical feedback
* Move vanilla feedback overrides to medical feedback
* Update all function calls
* Use events to avoid a dependency
2018-07-18 19:21:27 +01:00
SilentSpike
4466f9e785
Strip medical component (#6442)
* Move litter to `treatment`
* Move eden object attributes to `treatment`
* Move treatment items to `treatment`
* Move bodybag handling to `treatment`
* Move state conditions to `statemachine`
* Move radio addon handling to `feedback`
* Move medical macros to `engine`
* Move medical extension to `damage`
* Fix texture and material paths after move
* Remove duplicate medical menu config
* Remove old faction class
* Remove a bunch of old code
2018-07-18 19:13:25 +01:00
Thomas Kooi
c9c8d25017 Move vitals loop statemachine events into switch statement (#6443)
- Induce cardiac arrest if unit blood volume drops below half
2018-07-18 11:09:09 +01:00
Glowbal
9d2e76e67a More component name fixes and small clean up 2018-07-15 16:24:04 +02:00
SilentSpike
1dc934e1b1 Use macros for unit variables
Improves the way medical is storing variables in object space by having
a common list of variables names as macros. Makes the code a bit cleaner
and ensured consistency across components. Also a handy reference for
when working on medical to see what values are all stored.
2018-05-11 15:28:25 +01:00
SilentSpike
e0503129f0 Use blood bolume status macros 2018-05-10 17:44:02 +01:00
PabstMirror
382028e662 Fix updating body part visuals (#5141) 2017-06-08 13:50:38 -05:00
PabstMirror
25a28778cb Tweak randomness for wound bleeding and pain (#5113)
* Tweak randomness for wound bleeding and pain

* Scale damage to bodyPartDamage on multi part wounds
2017-06-05 11:51:53 -05:00
PabstMirror
6464883852 misc cleanup, 1 sec min delay for vital loop 2017-04-22 10:57:32 -05:00
ulteq
e817e13cfd Only call 'handleIncapacitation' when it makes sense
* Minor injuries should not trigger incapacitation
2016-12-14 21:02:24 +01:00
ulteq
a2b964a993 Fixed bandage config lookup 2016-12-14 18:04:56 +01:00
ulteq
0a81baf498 Better and simpler bleeding rate calculation 2016-12-09 14:11:07 +01:00
ulteq
31bc54ff33 Further improved the wound merging logic 2016-12-09 10:55:24 +01:00
ulteq
3b82510751 Merge new wounds into existing wounds whenever possible
* Todo: separate 'amountOf' into two variables (wound count and bandage percentage)
2016-12-08 12:59:30 +01:00
ulteq
78bfc0c26d Simplified damage storage 2016-12-08 11:38:43 +01:00
ulteq
7d6edd6c41 Brought the SQF variant of the woundsHandler back (for linux servers) 2016-12-06 10:59:29 +01:00
ulteq
a5ce5b4a34 Medical Rewrite - Continued (#4744) 2016-12-05 21:34:20 +01:00
commy2
1ea2a72f20 don't play scream by addPain function 2016-10-11 19:29:44 +02:00
commy2
2ad7c4c4ea add addPain function, cap pain 2016-10-10 16:44:03 +02:00
commy2
4bc1c1db56 handle blood visuals 2016-10-07 04:21:01 +02:00
commy2
5613ec5d5a treatment functions and unconsciousness rework 2016-10-06 00:54:57 +02:00
commy2
20d00d7cd9 make units scream when they're hit 2016-09-27 21:21:44 +02:00
commy2
5e35204811 woundHandler(SQF), fixes, improvements, more consistent variable naming 2016-09-27 17:29:49 +02:00