Feature #1291

Scale crosshair health depending on maximum current health

Added by Calinou about 1 month ago. Updated 10 days ago.

Status:Fixed% Done:

100%

Priority:LowSpent time:-
Assignee:-
Category:Mod CGAME
Target version:2.77
OS: Arch:

Description

Currently, the "crosshair color by health" feature will use constant values to color the crosshair (red = 25 HP, white = 100 HP). It would make more sense to make this value a percentage of the maximum health, so that it works better when playing classes with more HP. When getting hit, I often realize it’s too late to heal because it takes a bit for the crosshair to actually change color when you get hit.

For example, if you’re a medic with a maximum of 156 HP, the crosshair will be red until 39 HP (25% of the maximum health), then it will go through its usual red-yellow-white transition until the maximum value is reached (156 HP).

Associated revisions

Revision 90aadd58
Added by Spyhawk about 1 month ago

cgame: sync fireteam health color with healthbar, refs #1291

Revision a6189bcb
Added by Spyhawk about 1 month ago

cgame: health color adjustment for better gradient, refs #1291

History

#1 Updated by Spyhawk about 1 month ago

  • Category set to Mod CGAME
  • Target version set to 2.78

#2 Updated by Spyhawk about 1 month ago

When getting hit, I often realize it’s too late to heal because it takes a bit for the crosshair to actually change color when you get hit.

In short, the red colour appears at a too low value. Your proposed solution doesn’t solve this issue for other classes, just for medic. Wouldn’t changing the threshold to the same value for everyone be better?
Using a percentage doesn’t make sense to me here, as you’d want to have the same indicator color for the same health level across the game.

  • ensure value are similar as in FT window. (done, with the exception of using green when above 100).

#3 Updated by Calinou about 1 month ago

Your proposed solution doesn’t solve this issue for other classes, just for medic. Wouldn’t changing the threshold to the same value for everyone be better?

I believe this would also help solve the issue with other classes (though not as much as with the medic, as they have less health by definition). It might be just me, but one could see the medic as a "more resistant" class, which is why I think a percentage makes sense (there are some differences here and there, I know).

Also, if we use constant values, we might not be able to solve this issue fully, because one might start with a low maximum health if they play a non-medic class with no XP. For instance, if we set the "white" threshold to 125 HP, then players spawning with 100 HP would have a slightly yellow crosshair which could never turn white (until they gain enough XP).

Still, I think using higher constant values for crosshair color thresholds would be an improvement over the current situation.

#4 Updated by Spyhawk about 1 month ago

I guess my point above was to get specific color for specific health left. Max HP can greatly vary as you’ve seen, even in a single class due to the team medic bonus.
The indicator purpose is to let know the player when health level is critical - we don’t really care about knowing if it is 120 or 140 HP, but we do when it’s low. Having such value that varies constantly across game/class sounds like a bad idea. It should be something players could rely on, rather than having to compute it in their head.
What’s needed is to have a warning at, let say for example, 3 SMG shots left before player is downed (so it would be 18*3 = 54 HP) - just an example, we could use 2 SMG shots left for red f.e.

#5 Updated by Spyhawk about 1 month ago

  • Target version changed from 2.78 to 2.77

#6 Updated by Spyhawk 19 days ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 50

#7 Updated by Spyhawk 14 days ago

The lower value is now set to 33 - or a third of the available base health. It’s now synchronized with fireteam data. Unless there is more input given, I’d consider the implementation "good enough".

#8 Updated by Spyhawk 10 days ago

  • Status changed from Feedback to Fixed
  • % Done changed from 50 to 100

Closing now. Please comment/reopen if additional work is required.

Also available in: Atom PDF