Opened 11 years ago

Last modified 15 months ago

#2162 new enhancement

Group health

Reported by: Josef Kufner Owned by:
Priority: Should Have Milestone: Backlog
Component: UI – In-game Keywords:
Cc: Patch: Phab:D4289

Description

When group has focus, there is bar showing overall health of the group. It would be nice to see this "summary health bar" also on the shortcut icon (numbers 0-9) at the left edge of the screen.

Attachments (3)

group_health_patch_v2.patch (30.3 KB ) - added by Michael 10 years ago.
Added function.
group_health_patch_v2.2.patch (30.0 KB ) - added by Michael 10 years ago.
resolved confict with current SVN version.
2162 - Rebased.patch (17.5 KB ) - added by Stan 8 years ago.
Rebased the original patch by boeseraupe.

Download all attachments as: .zip

Change History (25)

comment:1 by historic_bruno, 11 years ago

I would like something similar on the hero button.

comment:2 by Michael, 10 years ago

Owner: set to Michael

comment:3 by Michael, 10 years ago

I'm working on this one.

comment:4 by sanderd17, 10 years ago

If you do this, also take a look at the discussion here: #1902

You could take two tickets at once.

Last edited 10 years ago by leper (previous) (diff)

in reply to:  4 comment:5 by Michael, 10 years ago

Replying to sanderd17:

If you do this, also take a look at the discussion here: #1902

I made a first patch for that.

by Michael, 10 years ago

Attachment: group_health_patch_v2.patch added

Added function.

comment:6 by Michael, 10 years ago

What the patch does:

  • adds health bar to groups which shows the current health status of your group (green)
  • adds members bar to groups which shows how many members of your group are still alive (orange)
  • adds attack color fade when group is attacked
  • adds a little death icon when a member of the group dies which disappears after some time

What could be improved:

I think performance would be better if the OnHealthChanged Method in UnitAI would be used to update the health of a group. In that case it would be great, if a component could trigger an update of the GUI (f.e. groupStatusChanged(groupId)) but I think with the current code this is not possible.

Last edited 10 years ago by Michael (previous) (diff)

comment:7 by Michael, 10 years ago

Keywords: patch review health group added
Milestone: BacklogAlpha 16
Summary: Group health[PATCH] Group health

by Michael, 10 years ago

resolved confict with current SVN version.

comment:8 by Michael, 10 years ago

Keywords: wip added
Summary: [PATCH] Group health[WIP PATCH] Group health

comment:9 by sanderd17, 10 years ago

Milestone: Alpha 16Alpha 17

comment:10 by Itms, 10 years ago

Hello boeseRaupe, sorry for taking so long reviewing the patches, especially this one.

I see you added a 'wip' keyword here some time ago, is there any progress? For my part I couldn't apply your patch due to changes in the code.

Let us know! And thanks for your work so far.

in reply to:  10 comment:11 by Michael, 10 years ago

Replying to Itms:

Hello boeseRaupe, sorry for taking so long reviewing the patches, especially this one.

I see you added a 'wip' keyword here some time ago, is there any progress? For my part I couldn't apply your patch due to changes in the code.

Let us know! And thanks for your work so far.

At the moment I have no time to do anything...:( Hence no progress. ;)

comment:12 by Michael, 10 years ago

Keywords: wip removed

comment:13 by Michael, 10 years ago

Summary: [WIP PATCH] Group health[PATCH] Group health

comment:14 by Itms, 10 years ago

Keywords: review health group removed
Milestone: Alpha 17Backlog

No problem, good luck for all your other tasks! :)

by Stan, 8 years ago

Attachment: 2162 - Rebased.patch added

Rebased the original patch by boeseraupe.

comment:15 by Stan, 8 years ago

Keywords: review added
Milestone: BacklogAlpha 20

comment:16 by elexis, 8 years ago

Keywords: review removed
Milestone: Alpha 20Backlog

I like the idea, but the patch is outdated and needs to be rebased again. Also some minor style issues:

  • unneeded comments, comments should also start with capital letters
  • Maybe it is possible to implement the same functionality without a dirty variable
  • DeathCycle sounds weird, how about saving the deathTime and have it zero if the units are not dead?
  • groupDeathShowIconTicks should be given in seconds or milliseconds
  • If you create a new object and set properties after it, use
    {
       "prop1": value1,
       ...
    }
    
  • Likely some unneeded variables, I can try to simplify if someone provides an otherwise updated patch.

comment:17 by Imarok, 5 years ago

Component: UI & SimulationIn-game UI

Move tickets to In-game UI as UI & Simulation got some sub components.

comment:18 by Freagarach, 3 years ago

Keywords: simple added; patch removed
Milestone: BacklogAlpha 26
Owner: Michael removed
Summary: [PATCH] Group healthGroup health

Patch is heavily outdated, but the idea is nice enough to be tried for A26.

comment:19 by Langbart, 2 years ago

Keywords: simple removed
Owner: set to Langbart
Patch: Phab:D4289

comment:20 by Langbart, 2 years ago

Owner: Langbart removed

comment:21 by Freagarach, 2 years ago

Milestone: Alpha 26Alpha 27

comment:22 by Freagarach, 15 months ago

Milestone: Alpha 27Backlog

Pushing back.

Note: See TracTickets for help on using tickets.