Update "Unit Stats" by Niobium from 2009?

Update "Unit Stats" by Niobium from 2009?

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

Moderator: Moderators

Post Reply
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Update "Unit Stats" by Niobium from 2009?

Post by dansan »

It's a super nice widget (gui_unit_stats.lua) that shows unit stats when hovering over any unit and pressing space. See attached screenshots. I use it in BA and TechA, I think it also works in EvoRTS.

The problem is, that the text doesn't seem to wrap... or something... at least in the dmg-line there is always a problem. For units with multiple weapons it gets worse.

Is there anyone who is willing to fix it? I'd be super happy. Maybe integrate it into some game?
Attachments
gui_unit_stats.lua
(10.54 KiB) Downloaded 18 times
screen00023.png
(449.13 KiB) Downloaded 1 time
screen00022.png
(398.95 KiB) Downloaded 1 time
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Update "Unit Stats" by Niobium from 2009?

Post by Anarchid »

Both Evo and ZK ship what amounts to essentially a nicer, chili-based version of this.

Try Space+click on any unit for a sample.

I assume it would be easier to work from there instead.
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: Update "Unit Stats" by Niobium from 2009?

Post by dansan »

I see... that could go into BAR then :)
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Update "Unit Stats" by Niobium from 2009?

Post by Silentwings »

The reason BA/BAR doesn't contain this is because several of the numbers it reports are simply constant lifted from unitdefs, when in reality their effects are non-constant and sometimes highly context dependent. There is a plan to integrate a "better", lightweight equivalent of it into the BAR UI.
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: Update "Unit Stats" by Niobium from 2009?

Post by dansan »

Nixtux fixed this version for me - thank you :)
Attachments
gui_unit_stats.lua
(10.96 KiB) Downloaded 16 times
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: Update "Unit Stats" by Niobium from 2009?

Post by jamerlan »

everyone have hes own version :-)
I fixed "my" version:
http://pastebin.com/VX9b3XU8

---- v1.4 changes
--[teh]decay - dont trigger widget in "chat" mode
Post Reply

Return to “Lua Scripts”