Commit Graph

84 Commits

Author SHA1 Message Date
Grim
fff66bc27c
Medical - Make Peripheral Resistance affect blood loss (#8420)
Co-authored-by: Salluci <69561145+Salluci@users.noreply.github.com>
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2024-08-11 20:29:11 -03:00
johnb432
9f2ee9fb6f
Common - Add setDead API (#10045)
* Added `setDead` API

* Update XEH_PREP.hpp

* Update fnc_setDead.sqf

* Update addons/common/functions/fnc_disableUserInput.sqf

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

* Update fnc_setDead.sqf

* Added warning for non-local units

---------

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2024-05-31 13:07:50 -07:00
Grim
6a2f3a21f2
Medical - Fix broken AI ragdolls if AI unconsciousness is disabled (#9917)
Co-authored-by: jonpas <jonpas33@gmail.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2024-04-06 22:20:51 -03:00
BrettMayson
f3f7f2c492
Medical Status - API to modify getBloodLoss (#9926)
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2024-04-06 22:18:07 -03:00
BrettMayson
19e0064730
Medical - Fix typo caridac to cardiac (#9900) 2024-04-02 21:07:03 -03:00
BrettMayson
67fa53fd2c
General - Events for Mods (#9813)
* full heal local

* update body image

* log list

* better _enable in categories

* update injury list

* cardiac output internal variable

* typo

* remove duplicate event

* rename event

* add docs

* Update docs/wiki/framework/events-framework.md

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

---------

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2024-03-04 15:08:12 -06:00
BrettMayson
1649422cbd
Medical Vitals - Add SPO2 (#9360)
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
Co-authored-by: LinkIsGrim <salluci.lovi@gmail.com>
2024-02-07 17:50:18 -03:00
Grim
ae532c72f7
Medical - Prevent uncon AI from talking (#9776) 2024-02-07 12:56:24 -03:00
PabstMirror
7e255bf05b
Tools - Fix header arg types (#9752)
Fix header arg types
2024-01-22 16:33:30 -06:00
johnb432
38684890eb
Medical - Disable AI twitching when unconscious (#9708)
Disable AI twitching when unconscious
2024-01-02 18:49:39 -03:00
jonpas
742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00
Broström.A | Evul
eaea6f29b8
Medical - Add setting to drop weapon on unconsciousness (#8433)
* added chance of dropping weapon on unconsciousness

* Moved throwWeapon to common

* Fixed spelling error

* wording changes

* typo

* fix usgae in burn reaction

* Update addons/medical_status/stringtable.xml

* Update addons/medical_status/functions/fnc_setUnconsciousState.sqf

* Update addons/medical_status/stringtable.xml

* move condition

* derp

---------

Co-authored-by: BrettMayson <brett@mayson.io>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2023-09-09 02:17:24 -04:00
Grim
dbd5fbaf31
Medical - Add internal variable for wake-up timer and stable blood volume (#9374)
* Medical - Allow changing SPONTANEOUS_WAKE_UP_INTERVAL via var

* add variable for minimum blood volume

* change variable name

* update pain comment

---------

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-09 00:15:43 -04:00
Grim
36f34ec551
Medical - Add 'Open (Backpack)' action to dead units (#9239)
* add open bag interaction

* only add actions to uncon/dead

* improve assembly backpack check

* Fixes

* Removed test code

* move to postInit

* fix locality

* locality edge case

* Fix double actions on dead units

* improve comment

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>

---------

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-03 21:48:09 -04:00
johnb432
682ae05f59
Medical Status - Remove status effects upon death/featureCamera (#9301)
* Update fnc_handleKilled.sqf

* move to function

* Removed skipSetHidden

* Revert "Removed skipSetHidden"

This reverts commit 452c5216a7.

* Update addons/medical_status/XEH_postInit.sqf

* add comment, force git to run actions

---------

Co-authored-by: LinkIsGrim <salluci.lovi@gmail.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2023-08-18 13:16:20 -04:00
Kyle Mckay
e47e18001f
Docs - Update my display name everywhere (#9330)
* Update display name in team

* Update display name everywhere

* order

https://youtu.be/VYycQTm2HrM

---------

Co-authored-by: BrettMayson <brett@mayson.io>
2023-08-17 12:02:17 +02:00
Kyle Mckay
02365609b5
Medical - Change medical to use hashmaps for wound storage (#8926)
* Refactor medical to use hashmaps for wound storage

- We most frequently want to access wounds by body part, so this makes
  that a constant time lookup.
- The body part index is no longer stored in every wound since it's
  inherent in the wound storage.
- Using body part names as the keys of the hashmap to improve code
  clarity (no more magic numbers).

closes #6468

* Add deserilization migration from old wound arrays

Will migrate from old form array wound storage to the new hashmap
strucutre during deserlization. This is relevant for communities piping
medical state out to a database or similar between sessions.

* fix issue with suture stitching

* change version number in comment

---------

Co-authored-by: Salluci <salluci.lovi@gmail.com>
2023-06-24 08:11:56 +03:00
jonpas
76e1aafb33
Use function documentation script (#6897)
Co-authored-by: Björn Dahlgren <bjorn@dahlgren.io>
2023-04-30 23:03:35 +02:00
BaerMitUmlaut
60cc8fbe88
Fix respawn when letting AI take over playable units (#9145) 2023-02-23 23:28:06 -06:00
Tim Beswick
27c5464654
Common - Add separate blockSpeaking status for acre direct (#8904)
* Add separate blockSPeaking status for acre direct

* Move TFAR code to new blockSpeaking handler

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2022-05-08 13:20:15 -05:00
GhostIsSpooky
9209fedcf7
Medical Statemachine - Improve edge case death handling (#8788)
* fix #8772

* add WARNING for dead/null units

* fix macro

* improve warnings

* handle scripted death without warnings

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2022-03-07 12:28:51 -06:00
GhostIsSpooky
f7f497f0ac
Medical Status - Add isDamageAllowed check to setDead (#8803)
* add delay & logs

* add remote support

* isDamageAllowed check

* add internal comment to setDead event

* remove remote setDead EH

* remove unnecessary changes

* Add comments and move check below the event
2022-02-06 17:36:28 +01:00
GhostIsSpooky
a9296f66d5
Medical - Update setDead to use setHitpointDamage instigator param (#8397)
* Redoing this

* Revert "Redoing this"

This reverts commit 80ff709676.

* Do this properly

* Update fnc_handleKilled.sqf

* use setDead function directly

* Handle scripted camera

* redo #8387

I'm dumb.

* try this

* if construct outside of ctrlSetEventHandler

Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>

* tweak disableUserInput / handleKilled

Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2021-11-15 09:31:56 -06:00
GhostIsSpooky
0a203fdde4
Medical Feedback - Stop effects on featureCamera (#8373)
Co-authored-by: Kyle Mckay <5459452+kymckay@users.noreply.github.com>
2021-10-10 16:24:10 +02:00
Salluci
48912be73c
Captives - Disallow ACRE/TFAR radio usage on surrender/handcuff (#8388)
* Block radio on captive/surrendered/unconscious via status effect

* missing semicolon

* Don't broadcast setVar if radio addon doesn't exist

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2021-09-25 11:16:15 -05:00
BaerMitUmlaut
88bbb0dd69
Medical - Add functions to serialize / deserialize the medical state of a unit (#7944) 2021-07-23 15:49:04 +02:00
BaerMitUmlaut
d27122fa16
Medical Status - Fix unconscious AI aiming at enemies (#7977)
* Fix unconscious AI aiming at enemies

* Improve handling when locality changes

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2020-11-08 16:27:10 -06:00
commy2
15b4b98e5b
Medical Status - Fix double execution of killed event (#7561)
* fix double execution of killed event

* revert the execNextFrame change

* make second execution run with null

* make second execution run with null
2020-02-29 16:09:00 -06:00
PabstMirror
c44360bd19
Medical - Unlock air controls when going uncon (#7533)
* Medical - Unlock air controlls when going uncon

* remove unneeded parentheses

* Update addons/medical_status/functions/fnc_setUnconsciousState.sqf

Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>

Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>
2020-02-19 10:05:05 -06:00
SilentSpike
d1c03cec1a
Only force enable input when player is killed (#7510) 2020-02-05 23:09:58 +00:00
Whigital
cdf02f629e
Only set unconscious upon entering CA (#7503)
Hopefully fix players being able to self interact when transitioning from cardiac arrest -> unconscious
2020-02-04 11:17:25 +00:00
Whigital
3be84e946b
[medical_status] Enable user input between death and respawn (#7502)
Fix being unable to use any menus created while dead
2020-02-04 11:15:45 +00:00
PabstMirror
9ac543aacc
Medical - Rename private version of setUnconscious (#7237) 2019-10-12 09:47:57 -05:00
PabstMirror
d6507cf119
Medical - epiBoostsSpontaneousWakeUp (#7076)
* Medical - epiBoostsSpontaneousWakeUp

* Update initSettings.sqf

* Move setting, add strings

* Update initSettings.sqf

* Update addons/medical/stringtable.xml

Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>
2019-09-28 16:11:32 -05:00
mharis001
ec9e6c088b Medical - Only stitch wounds on not bleeding body parts (#7044)
* Only stitch wounds on not bleeding body parts
2019-09-28 21:48:19 +01:00
PabstMirror
edd5c44853
Medical - Improve loading/unloading of unconc patients (#7109)
* Medical - Improve loading/unloading of unconc patients

* Update fnc_loadPersonLocal.sqf

* Multi-line

* Formating

* Update fnc_loadUnit.sqf
2019-09-05 15:56:53 -05:00
PabstMirror
d6c39e661f
Medical StateMachine - Tweak dead state handling (#7061)
* Medical StateMachine - Tweak dead state handling

- Don't call setDammage inside HandleDamage EH
- Add death reason on entering death state

* add a getVar disable in case this causes problems

* Cleanup

* cleanup

* Update addons/medical_statemachine/functions/fnc_enteredStateDeath.sqf

Co-Authored-By: Ferran Obon <magnetar5891@gmail.com>
2019-09-05 15:56:14 -05:00
PabstMirror
f5782fd1ff
Medical - Various debugging and fix cpr anim speed (#7122)
* Medical - Various debugging and fix cpr anim speed

* Update fnc_setCardiacArrest.sqf
2019-08-06 08:10:33 -05:00
mharis001
b2f4b8ea20 Medical - Cleanup settings (#7057)
* Cleanup medical settings

* Fix extra [

* Allow giving IV/blood to self by default

* Medical Blood - Settings improvements and cleanup (#7069)

* Add more blood settings and cleanup

* Fix include before header

* Update addons/medical_blood/functions/fnc_init.sqf

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

* Disable debug

* Cleanup moved settings

* Fix remaining setting descriptions
2019-06-28 11:50:11 -05:00
PabstMirror
de13ab0f47
Medical - Rework CPR and Bleeding in cardiac arrest (#7060)
* Medical - Rework CPR and Bleeding in cardiac arrest

* remove cprCreatesPulse, add cprSuccessChance

* hide cpr for basic diagnose

* Update addons/medical_statemachine/functions/fnc_enteredStateCardiacArrest.sqf

Co-Authored-By: SilentSpike <silentspike100+Github@gmail.com>
2019-06-27 19:01:20 -05:00
SilentSpike
56cb638aff Stop AI firing at unconscious units (#7074)
This just reimplemented the behaviour from #5864

I believe we though using `setUnconscious` command would make this
unnecessary, but testing seems to show that's not the case
2019-06-27 17:11:51 -05:00
mharis001
08a7d2706e Add wounds var macros (#7058) 2019-06-22 13:36:27 -05:00
PabstMirror
2fc11d38e0
Medical - Fix unconsicous problems with minWaitingTime and fullHealLocal (#7030)
* Medical - Fix setUnconsicous minWaitingTime

* Fix fullHeallocal restoring unconscious with unstable vitals
2019-06-11 19:25:05 -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
0d7709673a
Medical Feedback - Fix DISABLE_VANILLA_DAMAGE_EFFECTS (#6966)
* Medical Feedback - Fix DISABLE_VANILLA_DAMAGE_EFFECTS

* Keep compatibilty with old ace_medical_lastDamageSource var name
2019-04-27 14:04:31 -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