Page 1 of 2

Vote for Lua widget of the month!

Posted: 25 Feb 2008, 04:00
by url_00
I think that we should have a vote for the best Lua widget/gadget of the month!

It can be old or new, but lets give some credit to the widgets the make our gaming easier!

I nominate See All Commands, version 1.0 (the old version), coded by tombom.

This widget, when on, lets you see everything that you and your allies have been ordered to do! Extremely helpful, I use this in every game!

Source:

Code: Select all

 
local team = Spring.GetMyTeamID()
local ally = (1>0)

function widget:GetInfo()
  return {
    name      = "ShowAllCommands",
    desc      = "Acts like CTRL-A SHIFT all the time",
    author    = "tombom",
    date      = "Jul 22, 2007",
    license   = "GNU GPL, v2 or later",
    layer     = 0,
    enabled   = false  --  loaded by default?
  }
end




function widget:DrawWorld()
 	local mx, my = Spring.GetMouseState()
  	local type, data = Spring.TraceScreenRay(mx, my)
	if (ally) then
		local allyList = Spring.GetTeamList()
		for i, v in pairs(allyList) do
			local units = Spring.GetTeamUnits(v)
    			for q, s in pairs(units) do
				if (q ~= nil) then
        				Spring.DrawUnitCommands(s)
				end
			end
		end
	elseif (team) then
		local units = Spring.GetTeamUnits(team)
    		for i, v in pairs(units) do
			if (i ~= nil) then
        			Spring.DrawUnitCommands(v)
			end
		end
	end
	if (type == 'unit') then
		Spring.DrawUnitCommands(data)
	end
end


function widget:TextCommand(command)
  if (string.find(command, 'team ') == 1) then
    team = tonumber(string.sub(command, 5))
  end
  if (string.find(command, 'viewally ') == 1) then
    ally = tonumber(string.sub(command, 9))
  end
end

Re: Vote for Lua widget of the month!

Posted: 25 Feb 2008, 09:19
by Google_Frog
I would have to say either see all commands or hp bars (but there may be widgets that I use and don't notice).

Re: Vote for Lua widget of the month!

Posted: 25 Feb 2008, 13:14
by ginekolog
1. adv MM AI
2. idle builders
3. defense range

Re: Vote for Lua widget of the month!

Posted: 25 Feb 2008, 15:32
by user
you mean the best widget or the most helpful widget?

Re: Vote for Lua widget of the month!

Posted: 25 Feb 2008, 15:33
by url_00
@user:
Or your favorite widget/best looking widget.
It doesn't really matter, just pick one.
(That's a hint btw.)

Re: Vote for Lua widget of the month!

Posted: 25 Feb 2008, 15:47
by user
alright:

1. my animated water widget(no shaders),
2. my rain widget(works for everyone!, no need for shaders)
3. my unit shadows widget(projected by the sun,scales around the unit, no shaders)
4. the unit trails, which was made by quantum, and i made it read data from the unit file, so it can be customized.
5. my incomplete widget that draws the collision shapes.
6. i will complete this list later.

so i have to choose only one?

Re: Vote for Lua widget of the month!

Posted: 25 Feb 2008, 15:51
by url_00
:shock:


















Where can I get your widgets?
You don't have to, just try.

Re: Vote for Lua widget of the month!

Posted: 25 Feb 2008, 16:12
by user
they will soon be out, it is taking a lot of time, because of some issues, like:

the animated water:

whats up with the projectiles?, they get draw behind the water.

the rain:

no clouds yet.

unit shadows:

everything is ok, almost done.

unit trails:

everything ok, almost done.

collision shapes:

lag.

here is a few more for my list:

6. that super old heightmap exporter, made by the fat controller,
i made it export slope maps, text files, and i found out how to fix its old problem, should get fixed soon.
7.there are more, but i think i posted enough.

it is hard to choose only one, i like all made by me.

Re: Vote for Lua widget of the month!

Posted: 26 Feb 2008, 01:46
by LordMatt
I vote IceUI.

Re: Vote for Lua widget of the month!

Posted: 26 Feb 2008, 01:52
by user
all vote in me, you really should vote in one of mine, i think i don't need to explain why.

Re: Vote for Lua widget of the month!

Posted: 26 Feb 2008, 06:22
by BlueTemplar
Btw, now that UF is down, where can we get all thosed lua widgets? I especially would like to find See All Commmands (ok, it's here), FPS Manager, Idle Builders (with icons).

Re: Vote for Lua widget of the month!

Posted: 26 Feb 2008, 07:08
by Google_Frog
Factory guard is really useful too.

Re: Vote for Lua widget of the month!

Posted: 26 Feb 2008, 08:55
by tombom
Most of the useful widgets are in CA. Just open the archive with 7zip or something and take them out.

I'm surprised to see anybody using my widget - nice to know somebody got some use out of it.

Re: Vote for Lua widget of the month!

Posted: 26 Feb 2008, 14:11
by url_00
tombom wrote:I'm surprised to see anybody using my widget - nice to know somebody got some use out of it.
I use it all the time!
In fact, when I installed .76b1, I felt lost without it. :cry:
I got pwnd by the KAI. >.<

Re: Vote for Lua widget of the month!

Posted: 26 Feb 2008, 19:24
by BlueTemplar
Also, it's great for spectators and replays!

Re: Vote for Lua widget of the month!

Posted: 26 Feb 2008, 20:36
by MightySheep
My favourite widget is the nano patrol one. it is definitly the most useful.

Re: Vote for Lua widget of the month!

Posted: 26 Feb 2008, 21:28
by user
i will be releasing the heightmap exporter probably today, it is working.

the heightmap exporter will be really usefull for making maps, or stealing somebody else heightmaps.

i am on the last part of it, converting the pgm image to png, which is really easy.

and all vote in me.

Re: Vote for Lua widget of the month!

Posted: 26 Feb 2008, 21:39
by TheFatController
Image

cmd_emotes.lua :mrgreen:

Re: Vote for Lua widget of the month!

Posted: 26 Feb 2008, 21:45
by user
nobody will vote in me?

i think everyone should vote in me

Re: Vote for Lua widget of the month!

Posted: 26 Feb 2008, 21:51
by user
in about 10 to 30 minutes i will release the heightmap exporter, so get ready to vote in me.