Page 2 of 5

Posted: 17 Aug 2007, 23:20
by Neddie
It should only be shown when the two differ, logically...

Posted: 23 Aug 2007, 19:23
by jK
new version :idea:

Posted: 23 Aug 2007, 19:35
by BrainDamage
file broken, here it tries to download "download.php" instead of the widget

EDIT: now works

Posted: 23 Aug 2007, 23:27
by Tobi
I can not use this widget (latest version) because it take 10 to 20 seconds to initialize here, which often times me out during loading.

If, in Initialize, I comment this out, it loads instantly:

Code: Select all

  if (UnitDefs[1].height == nil) then
    for udid, ud in ipairs(UnitDefs) do
      ud.height = Spring.GetUnitDefDimensions(udid).height+20
    end
  end
I take it this triggers Spring to load all unit models.

Any chance you could make it lazy load these heights so it initializes within reasonable time?

(This is on Win XP Prof SP2 on an AMD 3200+ @ 2 GHz, 1G RAM, 7600 GT)

EDIT: tested with XTA v9 mod on Bluebend map.

Posted: 23 Aug 2007, 23:44
by Argh
Moreover, can't modders put height specifications into 3DO models now? I could have sworn that was possible.

Posted: 23 Aug 2007, 23:49
by jK
I already surround it with "if (UnitDefs[1].height == nil)", so it is only executed once (multiple widgets need this code). I don't like lazy loads, but I already thought about to spread the work on multiple gameframes. And you aren't the first, who complained about timeouts/long loading times, but 10-20secs are WOW, normally it should take 2-3secs.

Btw, in the next Spring release the loaded variable should be directly provided by the engine, so we wouldn't need that code anymore >_>

PS: the newest release should be bug free <_<

Posted: 24 Aug 2007, 02:14
by Argh
Cool, I will be testing it shortly.

Hrmm... question...

If two Widgets exist (oh, say... if I bundled my mod with this Widget)... and I changed something (oh, say, I made the length of the delay more than 5 seconds)... what will happen?

Crash? Two Widgets both running the same code, simultaneously? Will my Widget take precedence over a user's version?

Posted: 24 Aug 2007, 02:15
by MelTraX
I'm pretty sure the users widget will just overwrite the mod widget with the same name..

Posted: 24 Aug 2007, 02:17
by Argh
That's better than a crash, and it requires a user to have installed their own Widget, to boot, which I suspect most don't. I can live with that.

Posted: 24 Aug 2007, 03:14
by Argh
<tries it>

Hmm. It works for me, and I think it's fine, even with the stuff that isn't strictly necessary. Not bad at all. A little bit bigger than is maybe ideal, but if that is the only thing I can find to whine about, then it must be pretty good ;)

Only real trouble is that I need to re-adjust all the heights of my S3Os, to keep it well above the units... and that causes it to clip into my NanoBlobs-style teamcolor dots. Which, as we all know, I'm not terribly attached to.

I don't suppose that I could get an alpha, teamcolored icon, just above the rest of this? Just a very small square one- nothing very large- it'd replace the teamcolor dots.

Then I'd be pretty much feature-complete, for what I'd like players to see, between this and other stuff that's already available, and I'd be all done with the teamcolor thing, unless I change my mind and add it to the S3Os... or get the dynamic-icon thingy, which I have described so vaguely that I'm not surprised there's been no interest.

<ducks objects thrown by grumpy coders> Sorry... just... uh, that one thing? It'd mean I could cut a fairly high-poly Piece out've every model, among other benefits...

Posted: 31 Aug 2007, 00:01
by Pendrokar
Request: Can you make a bar for features/wrecages that show the remaining resources in % that are being reclaimed and if reclaiming has stopped in the middle of it then the bar should slowly hide(% var stays)?
It's good that there are no features or wrecages that have both M and E in em!

Posted: 31 Aug 2007, 00:50
by REVENGE
Pendrokar wrote:It's good that there are no features or wrecages that have both M and E in em!
What?

Look at the fortification walls in BA for wreckage, and the bigass rock in the middle of Sypor for a feature.

Posted: 31 Aug 2007, 01:06
by jK
Sorry, but this would slow down the widget as hell, already the health bars of fortification walls were a problem (I speeded it up now).
Also into my mind it is more an engine issue, because imo the wreckage model should bind to the ress and health of the wreckage (atm it is bind to health only).

Posted: 02 Sep 2007, 21:44
by LordMatt
The version on UF still gives the error:

Code: Select all

Failed to load: unit_healthbars.lua  (Include() could not load 'LuaUI/headers/billboard.lua'
)
in infolog.txt

Edit: Change "include('headers/billboard.lua')" to "include('Headers/billboard.lua')" for proper linux case compatability.

Posted: 07 Sep 2007, 10:01
by ginekolog
this widget screwed up original health bars, even with disabled widget i could not see original health bars, so i had do delete it.

Its alsto a bit slow on mass of units... but on fast pc its very good.

Posted: 07 Sep 2007, 15:07
by Pendrokar
ginekolog wrote:this widget screwed up original health bars, even with disabled widget i could not see original health bars, so i had do delete it.

Its alsto a bit slow on mass of units... but on fast pc its very good.
disable and F9?

Posted: 07 Sep 2007, 20:47
by jK
ginekolog wrote:this widget screwed up original health bars, even with disabled widget i could not see original health bars, so i had do delete it.

Its alsto a bit slow on mass of units... but on fast pc its very good.
It doesn't screw your original healthbars. Spring 75b2 has a typo, it doesn't initialize a value (which should be zero), so if your ram has something different than a zero at that position, you can't see any healthbars and some widgets don't work. The healthbars widget has a fix, so you always see the healthbars (even if the orig. don't work) and it was my first impulse to write this widget (I only get in <20% of all matches the orig. healthbars). So it is a fix for ppl who has this problem.

And the slow down with mass of units should be around ~15-20% (tested with 440 corsol), and it shouldn't slow down if there are less units on the screen.

Posted: 09 Sep 2007, 01:49
by AF
That and the widgets prettier and shows more data

Posted: 10 Sep 2007, 19:33
by TheFatController
Is it possible to make the % text hide-able, I'm happy with just the graphical bars and really not too concerned what the numerical percent of health etc. is, so it would be a nice optional speed increase :)

Posted: 11 Sep 2007, 10:45
by TechnoTone
You can remove the text on the bars by changing line 35:

Code: Select all

local drawBarTitles = true
to

Code: Select all

local drawBarTitles = false

To remove the % values you'd have to change line 401:

Code: Select all

glDrawFuncAtUnit(unitID, true, DrawUnitInfos, unitID, height, true, canStockpile, reloadTime, primaryWeapon)
to

Code: Select all

glDrawFuncAtUnit(unitID, true, DrawUnitInfos, unitID, height, false, canStockpile, reloadTime, primaryWeapon)
and line 416:

Code: Select all

DrawFeatureInfos(featureID, 70, true, wx,wy,wz)
to

Code: Select all

DrawFeatureInfos(featureID, 70, false, wx,wy,wz)