Skip to content
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

Closed
wants to merge 14 commits into from

Conversation

kymckay
Copy link
Member

@kymckay kymckay commented Apr 20, 2018

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).

@kymckay kymckay added the kind/bug-fix Release Notes: **FIXED:** label Apr 20, 2018
@kymckay kymckay added this to the Medical Rewrite milestone Apr 20, 2018
@kymckay

This comment has been minimized.

@kymckay

This comment has been minimized.

@kymckay

This comment has been minimized.

@kymckay

This comment has been minimized.

@kymckay
Copy link
Member Author

kymckay commented Apr 20, 2018

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.

@kymckay
Copy link
Member Author

kymckay commented Apr 21, 2018

Here's how it now looks with a tourniquet applied:

2018-04-21_20-46-10

and without:

2018-04-21_20-47-22

I kind of don't like the discrepancy between the icon and the body image here when a tourniquet is present, but it's how it was behaving beforehand too.

@kymckay
Copy link
Member Author

kymckay commented Apr 22, 2018

Okay so looking further into this:

  1. It seems that in the rewrite the body image colours were updated so that limbs went from pale to dark red based on the blood loss they had. If there was no blood loss, they then went from pale to dark orange based on the damage (previously this was done with blue - which was changed to show a limb with tourniquet applied).
  2. The new behaviour in this PR (based on ShackTac's implementation) changes the interaction icons and limbs to step through yellow, orange, red as the blood loss increases. This definitely looks better for the icons and personally I like to have the consistency with this on the body image (it is confusing to convey the same information in two different ways based on where you're looking).
  3. However, this now means that damage isn't displayed on the body image once blood loss is stopped (and keeping the orange would be confusing because of the blood loss changes).

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.

@kymckay kymckay changed the title Fix medical interaction menu bleeding colours Improve medical body image/interaction colouring Apr 22, 2018
@kymckay kymckay added the kind/enhancement Release Notes: **IMPROVED:** label Apr 23, 2018
@Drofseh
Copy link
Contributor

Drofseh commented Apr 23, 2018

I'm more concerned with blood loss than with damage, and I think colour consistency with the interaction icons is very important.

If there is going to be an overlay icon (which I think is a good idea) I'd rather it showed damage while the limb was coloured for blood loss.

Or maybe do it like Escape from Tarkov and have coloured bars for damage.
I wouldn't use numbers like Tarkov does though.

@jonpas
Copy link
Member

jonpas commented Apr 23, 2018

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.

@kymckay
Copy link
Member Author

kymckay commented Apr 23, 2018

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 = [
Copy link
Member

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?

Copy link
Member Author

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

@Drofseh
Copy link
Contributor

Drofseh commented Apr 23, 2018

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?
Is that changed in the rewrite?

@kymckay
Copy link
Member Author

kymckay commented Apr 23, 2018

The final result:

2018-04-23_20-59-32

As you can see one leg is damaged but not bleeding, while the other was bleeding. Both have a tourniquet applied to show how the colour looks.

@@ -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);
Copy link
Member

@TheMagnetar TheMagnetar Apr 24, 2018

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well spotted, thanks 👍

@kymckay
Copy link
Member Author

kymckay commented Apr 24, 2018

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.

@kymckay
Copy link
Member Author

kymckay commented Apr 24, 2018

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 [0,1] when actually it seems to just keep going up (a single pistol shot seems to instantly make a limb the highest level of blue).

kymckay added 7 commits July 18, 2018 20:12
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.
@kymckay kymckay force-pushed the medical-rw-icon-color branch from 5eb6a38 to 8f80eac Compare July 18, 2018 19:52
@kymckay kymckay requested a review from thojkooi August 4, 2018 09:15
@mharis001 mharis001 mentioned this pull request Feb 22, 2019
7 tasks
@mharis001
Copy link
Member

Included in #6831 .

@mharis001 mharis001 closed this Mar 24, 2019
@mharis001 mharis001 deleted the medical-rw-icon-color branch March 24, 2019 23:32
@PabstMirror PabstMirror modified the milestones: Medical Rewrite, 3.13.0, 3.13.0-temp3 Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:** kind/enhancement Release Notes: **IMPROVED:**
Projects
Development

Successfully merging this pull request may close these issues.

6 participants