healthbars widget (v7) *Jan. 4 08*

healthbars widget (v7) *Jan. 4 08*

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

healthbars widget (v7) *Jan. 4 08*

Post by jK »

It has larger bars, is more eyecandy and has additional bars for:
  • emp
  • capture
  • resurection
  • STOCKPILE
  • buildprogress
  • shield
  • morph
  • weapon reload.
ImageImage

version 7:
*updated to spring 76b1 (MUCH faster now)
*added shield and morph bar
*removed bugfix for billboard bug (fixed in 76b1)

version 6.1:
*fixed overlay (wasn't displayed at all)

version 6.0:
*hide full health bars now
*added an overlay for stunned units

version 5.16:
*fixes

version 5.1:
*massive speedup (upto 40%!)

version 5:
*add reload bar
*hide health of units in progress, if their health corresponds to their build progress

version 4.x:
*fixed the height difference with the rank widget (not 100% solved)
*I found the bug in trepans billboard matrix, so i don't need the vertex shader anymore
*add a new secret bar (i am sure you will like it :mrgreen: )
*reduced the wreckage healthbars
*fixed stockpile texture
*add transparency
*add F9 toggle

Image
(version 7)
Last edited by jK on 04 Jan 2008, 20:41, edited 25 times in total.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Its absolutely amazing, best widget sinc ssliced bread!
bwansy
Posts: 385
Joined: 02 May 2006, 05:21

Post by bwansy »

This is one of the great yet trivial-to-make things that everyone had overlooked. Good job.
However, it doesn't display the build status of stockpile weapons and experience bar of each unit. The experience bar is not important, but stockpile weapon bar would be really helpful.
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

Me likey bouncy, me likey bouncy!
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

What is the overhead of this widget?
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

this is the definition of 'pure win'.
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

This widget wins multiple internets.
neddiedrow wrote:What is the overhead of this widget?
I did a quick test, there was no change in FPS or cpu usage with >100 units, changing between normal bars and the widget's.
MelTraX
Posts: 470
Joined: 02 Jan 2007, 16:18

Post by MelTraX »

This is really cool..

It doesn't quite align with the rank icons yet though.. Trepans ETA, your Healthbars and quatums rank icons should have the same position calculation.. Right now the health bars move relative to the rank icons.. I don't know which positioning is better though..

edit:
And maybe you can do some magic that all those bars hovering above a factory aren't on top of each other.. It has always been kinda hard to tell which bar belongs to the factory and which one to the unit being built..
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Post by jK »

the different level is cause the i use depthtest (like the default healthbars), so i need it to prevent unit interaction with it. btw i plan to integrate the to rank widget into the healthbars (to use a vertex shaders instead of the gl.Billboard).

and i have an idea to solve the issue with the factories but it don't really know how to use gl.PolygonOffset :(
it thought it would be nice if the healthbars of the factories are much deeper, but there they interact with the model, so i would need PolygonOffset.
Crampman
Posts: 117
Joined: 22 Dec 2005, 12:17

Post by Crampman »

Could it be possible to disable the healthbar of the unit being built, and add a 'build-progress-bar' to the factory ?
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Post by jK »

it is not that easy cause you can't differ (easily) between units/buildings which are build by a unit or a factory.
And btw, i want to be able to see the units health during building (i.e. somebody bombs your in progress krog etc.).
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

If I were to create the ETA AI in lua I would use this widget as a basis rather than an empty one.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

would it be possible to repositon the healthbar so it does not clash with the experience cheveron widgt?
I love this widget, only complaint is that the bars are a little too big so when you have lots of units your view is mostly lots of bars
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

actually I like it as it is.


However 2 suggestions:

Make the text in the bars less transparent
Make the whole bar+text more tansparent and smaller, but as the mouse comes nearer or the camera target or theyre selected, they get more opaque and bigger
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Post by jK »

1v0ry_k1ng wrote:I love this widget, only complaint is that the bars are a little too big so when you have lots of units your view is mostly lots of bars
you can change the size easily in the widget file. there is a var at the top of unit_healthbars.lua: barWidth
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

cheers jK
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Post by REVENGE »

Moar Win.
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

I think there's a bug in this, where sometimes, it displayes the healtherbar after the unti is dead - it the healthbar stay on the unit's wreck .I thought maybe this was something to do with rezzing or reclaiming, but I saw a pair of 'metal dust' wrecks, that were identical graphics and amount of m in them, but one of them had a healthbar!
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Post by jK »

this was a problem with <v4.03
now it should filter such bars out. if it still does in v4.1, please tell me :)

and btw hp!=metal of wreckage ;)
(sorry about all those small updates in v4, i was a bit careless :oops:)
MelTraX
Posts: 470
Joined: 02 Jan 2007, 16:18

Post by MelTraX »

What do you think about showing only the build bar while building as long as it is the same amount as the health?
Post Reply

Return to “Lua Scripts”