-
Notifications
You must be signed in to change notification settings - Fork 735
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
Improve medical body image/interaction colouring #6288
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This is now in a state where everything is consistent and the interaction icons turn red when the body image icons start to turn to a dark red (at 0.5 blood loss). However, this may not reflect what is actually a potentially lethal blood loss - in which case we need to adjust the icon threshold and the body image calculations. |
Okay so looking further into this:
So the question is, do we revert the body image colour changes (and accept inconsistency with the interaction icons)? Or, is there another colour we would want to to show damage? Another option is to adopt ShackTac's method of showing a tourniquet and apply a little overlaying icon on the limb and reverting to blue to show damage. |
That makes a lot of sense, since tourniquet is on the limb image as well, comme ter with bleeding. And if damage is a bar this also directly conveys its damage. |
Currently I think I'm going to add the tourniquet image provided by ShackTac and then make it behave like the current release version where once blood loss is stopped the damage is shown in blue. That way it's consistent with older versions and there's no issue with colour overlap. The bar is not a bad idea, I just feel that it's too accurate in comparison. Plus you don't really care about damage until the blood loss is stopped anyway, so no need to show both at once. |
private _frBL = 0 max (_bloodLoss / BLOOD_LOSS_RED_THRESHOLD) min 1; | ||
private _colorInt = ceil ((_frBL * (BLOOD_LOSS_TOTAL_COLORS - 1))); | ||
|
||
_colorSelection = [ |
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.
Should this array of colors be 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.
I'm going to tidy a bunch of stuff up once the functionality is finalised
Yah, I don't really care about seeing damage at all tbh, well, unless treatment for damage is significantly different in the rewrite. Right now in 3.12.2 you either require a PAK or you have to have bandages heal damage turned on right? |
addons/medical_menu/CfgVehicles.hpp
Outdated
@@ -48,7 +48,7 @@ class CfgVehicles { | |||
displayName = ECSTRING(medical,Actions_Medical); | |||
runOnHover = 1; | |||
exceptions[] = {"isNotInside", "isNotSitting"}; | |||
statement = QUOTE([ARR_3(_target,1,0)] call EFUNC(medical,displayPatientInformation)); | |||
statement = QUOTE([ARR_3(_target,1,0)] call EFUNC(medical_ui,displayPatientInformation)); | |||
condition = "true"; | |||
icon = QPATHTOEF(medical,UI\icons\medical_cross.paa); |
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 binary file (medical_cross.paa) is removed in this PR but the code still references it
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.
Well spotted, thanks 👍
If #6290 gets merged in future we can just use a single basic cross icon and update the colour of it. Then we only need multiple of the tourniquet icons since they retain the white outer ring. |
One thing I'm not totally sure about is at what level of a damage a selection should reach the bluest blue. Currently it's set to 0.8 (here), but that's just because I mistakenly thought damage was in the range |
The issue is actually the other way round, the factor of 20 would instantly make bodyparts red on taking a wound.
This replaces the old method of colouring the interaction menu icons and body image selections with a new method that has 10 distinct color steps (matching across the icons and the body image).
This re-adds visualisation for colouring based on damage. The case where a limb has a tourniquet will hopefully be handled by an overlayed icon.
5eb6a38
to
8f80eac
Compare
Included in #6831 . |
This makes the blood loss calculation used for the interaction menu icons match the calculation used for the body image.
Closes #4347
Edit: This has since become an implementation of the method used by ShackTac to colour the icons and body image selections. It fixes the issue and adds some granularity to the interaction icons. It does change the behaviour slightly of the body image colouring (now matches the icons from yellow through to red instead of pink through to red).
The new icons follow a "white, yellow, red" colour scale with 10 steps, Bezier interpolation and Correct lightness gradient.
Edit 2: This also now includes a tourniquet icon overlay (rather than colouring the limb blue - which is being used to now show damage again since orange is taken by blood loss).