Com Counter Display - Page 2

Com Counter Display

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

Moderator: Moderators

User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Com Counter Display

Post by Jazcash »

Not finished, just thought I'd post my progress. Some of it may work, some may not, this is because it's very hard to test everything when you can only do it in public games.

Would appreciate it a lot if people could try this one out and report any bugs (with infolog if appropriate) here.

Edit: Made a silly typo in the rezzing code, I'll put up another version at the end of the day with one or two other fixes.
Attachments
ComCounter.zip
(3.91 KiB) Downloaded 15 times
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: Com Counter Display

Post by jamerlan »

Jazcash, awesome!

Maybe you can upload it to github and place a link to it in widget metadata (inside a widget)?

So everyone will be able to understand where to send patches etc?
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Com Counter Display

Post by Jazcash »

jamerlan wrote:Jazcash, awesome!

Maybe you can upload it to github and place a link to it in widget metadata (inside a widget)?

So everyone will be able to understand where to send patches etc?
Aw, for a minute then I mis-read and thought you meant have a widget file which grabs code from an external, online file which would mean you'd never have to download a new version of the widget 'cause it'd just update to the latest version online automatically, but alas, you just meant for other people to contribute :(
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Com Counter Display

Post by Jazcash »

Jazcash wrote:a widget file which grabs code from an external, online file which would mean you'd never have to download a new version of the widget 'cause it'd just update to the latest version online automatically
Image
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: Com Counter Display

Post by jamerlan »

yeah! Spring needs a cross-platform widget manager! (shows widgets and updates etc)

vbs created such tool for windows and it's very useful! But I am linux user)) so I miss it SO MUCH!
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Re: Com Counter Display

Post by very_bad_soldier »

That widget manager is supposed to run on linux using Mono. Its quite a while ago since I tested it but it should still work.
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: Com Counter Display

Post by jamerlan »

Link to widget manager: http://springrts.com/phpbb/viewtopic.php?f=23&t=25908

for me it does not work:
http://pastebin.com/RMaMrAHk

looks like Fedora don't have some required libs. And I did not find any easy way to install it. Tried to install rpm from Mandrivia and it crashes)) So.. maybe it will work under ubuntu. I don't know
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Re: Com Counter Display

Post by very_bad_soldier »

I tried with Ubuntu back then, yeah.

Hm, seems to be an Fedora issue. Googling "libluezilla fedora" shows some other people having that problem too.
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Com Counter Display

Post by Jazcash »

Widget is largely finished now. I've ironed out all the bugs I've been able to test, however, I haven't been able to test every situation so report any bugs you find in this thread :-) Think it's suitable to be called version 1 now.

Also, it's now on the Widget Database so I won't be posting any new releases in this thread.

Merry Christmas!
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: Com Counter Display

Post by jamerlan »

Great! I see that everyone uses your widget already :-))
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Com Counter Display

Post by Jazcash »

jamerlan wrote:Great! I see that everyone uses your widget already :-))
Vbs just let me have ownership of the old one that no longer works so I inherited its download count :twisted:
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Re: Com Counter Display

Post by very_bad_soldier »

I actually had to reset the download count cause it screwed up the download per day value since you deleted the old version. :wink:
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Com Counter Display

Post by Jazcash »

very_bad_soldier wrote:I actually had to reset the download count cause it screwed up the download per day value since you deleted the old version. :wink:
That's fine, I wanted to know how many people had actually downloaded my version anyway :-)
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Re: Com Counter Display

Post by very_bad_soldier »

I downloaded it!
klapmongool
Posts: 843
Joined: 13 Aug 2007, 13:19

Re: Com Counter Display

Post by klapmongool »

So I have been using it and I have noticed some bugs. In de replay attached you'll see it miscounting. It seems to go wrong at the combomb at the bridge. It counts it double. So at the, almost, last comm it marks it as last.

Also in 1v1 I have noticed it can mark comms with the wrong playernames, namely those of specs.
Attachments
20121228_172854_FolsomDamDeluxeV3_91.sdf
(650.54 KiB) Downloaded 11 times
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Com Counter Display

Post by Jazcash »

klapmongool wrote:So I have been using it and I have noticed some bugs. In de replay attached you'll see it miscounting. It seems to go wrong at the combomb at the bridge. It counts it double. So at the, almost, last comm it marks it as last.

Also in 1v1 I have noticed it can mark comms with the wrong playernames, namely those of specs.
Thanks for this, looks like it counts the heap as a separate com death when a wreck turns to a heap. Not sure when I'll get time to fix this bug, but I will get it fixed at some point. Also, it should disable itself in 1v1 games now if you update.
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: Com Counter Display

Post by BrainDamage »

since this widget performed poorly for me, especially when spectating, and had several misdetections, I rewrote it almost completely:

several changes:
  • uses display lists so massive speed up in rendering and nearly no cpu usage for that
  • it doesn't iterate multiple times all units every frame ...
  • now that the counting mechanism is reliable it uses the same mechanism when playing and speccing
  • all messages are local, so you won't annoy your allies with your widget, if they want com alerts, they should grab it as well
  • you'll get alerts for com being reclaimed/rezzed/damaged but only out of los
current slight problems: atm it iterates trough all features twice per frame ( as jazcash's version did ) because ba doesn't expose the FeatureCreated and FeatureDestroyed calli-ins, it seems the next release will and i'll be able to remove that pointless loop

PS. if anyone knows how to check who resurrected a wreck out of LOS in a reliable way, i could make it work well even in FFA
gui_comCounter.lua
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Com Counter Display

Post by Jazcash »

BrainDamage wrote:since this widget performed poorly for me, especially when spectating, and had several misdetections, I rewrote it almost completely:

several changes:
  • uses display lists so massive speed up in rendering and nearly no cpu usage for that
  • it doesn't iterate multiple times all units every frame ...
  • now that the counting mechanism is reliable it uses the same mechanism when playing and speccing
  • all messages are local, so you won't annoy your allies with your widget, if they want com alerts, they should grab it as well
  • you'll get alerts for com being reclaimed/rezzed/damaged but only out of los
current slight problems: atm it iterates trough all features twice per frame ( as jazcash's version did ) because ba doesn't expose the FeatureCreated and FeatureDestroyed calli-ins, it seems the next release will and i'll be able to remove that pointless loop

PS. if anyone knows how to check who resurrected a wreck out of LOS in a reliable way, i could make it work well even in FFA
gui_comCounter.lua
Awesome! I was planning to fix and update this at some point but got sidetracked so this is great ^_^

And yeah, I did originally plan to use the FeatureCreated and FeatureDestroyed call-ins but they weren't working for some reason so I checked the BA call-ins and they weren't even listed so I added them (Badly, ended up missing a comma and screwing up another call-in xD).
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: Com Counter Display

Post by jamerlan »

How widget knows who self-d his com? For example, on DSD widget spoils who is techer. And that is AWESOME :-D
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Com Counter Display

Post by Jools »

Just make a gadget that feeds every player's number of commanders (can be more than 1), and a widget that listen to it. Much easier.
Post Reply

Return to “Lua Scripts”