-
Notifications
You must be signed in to change notification settings - Fork 737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Medical - Add Additional Hitpoints to the medical system #10482
base: master
Are you sure you want to change the base?
Conversation
@@ -97,7 +97,7 @@ private _state = [_json] call CBA_fnc_parseJSON; | |||
[QEGVAR(medical,ivBags), nil], | |||
[QEGVAR(medical,triageLevel), 0], | |||
[QEGVAR(medical,triageCard), []], | |||
[QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0]] | |||
[QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0,0,0,0,0,0,0]] | |||
// Offset needs to be converted | |||
// [VAR_MEDICATIONS, []] | |||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function needs handling of previous format of bodyPartDamage array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For BWC? or is there something else I am oblivious to
@@ -124,7 +124,7 @@ if (random 1 <= _reopeningChance * GVAR(woundReopenChance)) then { | |||
// Re-add trauma and damage visuals | |||
if (GVAR(clearTrauma) == 2) then { | |||
private _injuryDamage = (_selectedInjury select 4) * _impact; | |||
private _bodyPartDamage = _target getVariable [QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0]]; | |||
private _bodyPartDamage = _target getVariable [QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0,0,0,0,0,0,0]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at how frequently the default state array of body parts damage is being used would be nice to move it to a macro.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ive attempted that, hopefully its correct
If the upper limbs are called upper the lower limbs should be called lower. |
MIA |
I don't hate this on principle but oh dear this can break in so many ways (both itself and BWC) |
Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
…nto Hitpoint-Rework
I know, its horrible for BWC, but its a very much needed update as KAM needs more granularity in terms of hitpoints (and overwrites are not great I had a differing path as well, but that would have had me make hitpoints for everything, down to the granularity of individual hands and joints, which would have been worse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surprisingly few changes necessary to make this work (though I'll admit I haven't looked at this under a microscope), which is good, but this is a big enough change this late into the lifecycle that I'd put it under a setting. Which you can't do, because hitpoints are tied too strongly into how the system works and was balanced.
This warrants similar testing as the wound handler rework and medical rewrite IMO.
Some other considerations:
Do you bleed twice as much for explosions now? (I have a feeling you do)
Is sway just twice as strong on the worst case too?
This is a pretty big change so we're going to be nitpicky. You're going to see "Requested Changes" a lot. Sorry, not sorry (please use hemtt), I still have an armor penetration PR that hasn't been reviewed because no one wants to touch medical.
private _bodyPartVisParams = [_unit, false, false, false, false]; // params array for EFUNC(medical_engine,updateBodyPartVisuals); | ||
|
||
// process wounds separately for each body part hit | ||
{ // forEach _allDamages | ||
_x params ["_damage", "_bodyPart"]; | ||
_bodyPart = toLowerANSI _bodyPart; | ||
|
||
if (_bodyPart == "head") then { | ||
private _isNeck = (random 1) < 0.1; // 15% chance for neck damage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems arbitrary. Can this not be handled via medical_engine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, as the hitbox for neck damage is unbelievably small, to the point its impossible to hit
Plus jaw/lower head damage still affects the neck area
|
||
if (_updateHead) then { | ||
[_unit, "head", (_bodyPartDamage select 0) > VISUAL_BODY_DAMAGE_THRESHOLD] call FUNC(damageBodyPart); | ||
[_unit, "head", ((_bodyPartDamage select 0) max (_bodyPartDamage select 1)) > VISUAL_BODY_DAMAGE_THRESHOLD] call FUNC(damageBodyPart); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will break KAM FYI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh i am aware, ill have to do my own refactor of KAM with these changes if they do get merged
#define HITPOINT_INDEX_NECK 1 | ||
#define HITPOINT_INDEX_CHEST 2 | ||
#define HITPOINT_INDEX_BODY 3 | ||
#define HITPOINT_INDEX_LARM 4 | ||
#define HITPOINT_INDEX_ULARM 5 | ||
#define HITPOINT_INDEX_RARM 6 | ||
#define HITPOINT_INDEX_URARM 7 | ||
#define HITPOINT_INDEX_LLEG 8 | ||
#define HITPOINT_INDEX_ULLEG 9 | ||
#define HITPOINT_INDEX_RLEG 10 | ||
#define HITPOINT_INDEX_URLEG 11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer if the new hitpoints were added on at the end, even if it seems less logical, less places to break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reason why it's like that is for update body image using a series of greater-than-checks
@@ -130,9 +136,9 @@ | |||
#define DEFAULT_BANDAGE_REOPENING_MIN_DELAY 120 | |||
#define DEFAULT_BANDAGE_REOPENING_MAX_DELAY 200 | |||
|
|||
#define DEFAULT_TOURNIQUET_VALUES [0,0,0,0,0,0] | |||
#define DEFAULT_TOURNIQUET_VALUES [0,0,0,0,0,0,0,0,0,0,0,0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need upper/lower limb tourniquets/splints? If either end of the limb is broken, you still can't use it, and a tourniquet on the upper limb will still cut off blood flow to the whole thing.
I get that this can be interesting for something like numbness/necrosis in the case of tourniquets, but there's no reason in baseline medical to not throw the tourniquet on the upper limb (assuming that works as expected).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its for compatibility with KAM, as tissue necrosis will be a thing soon plus we have IVs so a lower limb TQ wont occlude upper IV access
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
Yes, but there is another PR in the pipe that reworks wounds and their creation, so in the end it will be equivalent to how it was before
Yes, and I'm looking at making a change to that |
Current issues Explosions are kinda weird for damage, likes to leave parts of limbs untouched, might need the damage randomizer to be a flip flop instead, unless its all one EH and if so ill need to work at explosive damage
|
Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
…nto Hitpoint-Rework
Current issue, explosions are one call of woundshandlerbase per hitpoint, and splitting it isn't fruitful, |
When merged this pull request will:
ToDo
-GUI
IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.