Page 1 of 2

REQ: Wind Speed

Posted: 18 Jan 2010, 17:49
by Jazcash
Could somebody make a small and simple widget which displays the current wind speed? Would be much appreciated so then I know when to go in for the pow pow with mai Com.

Re: REQ: Wind Speed

Posted: 18 Jan 2010, 17:59
by bobthedinosaur
EDIT: I wish I knew what I was talking about.

Re: REQ: Wind Speed

Posted: 18 Jan 2010, 18:12
by Beherith
Spring.GetWind

( ) -> number dirX, number dirY, number dirZ,
number strength, number normDirX, number normDirY, number normDirZ

Re: REQ: Wind Speed

Posted: 18 Jan 2010, 18:12
by manolo_
do u mean the current energy output made by a windmill (if yes look at iceui and windcheck ) or the windspeed (?)

Re: REQ: Wind Speed

Posted: 18 Jan 2010, 18:34
by Jazcash
manolo_ wrote:do u mean the current energy output made by a windmill (if yes look at iceui and windcheck ) or the windspeed (?)
That's the average guess at the game start. I want a widget which shows the windspeed all the through the game updating in time with the windmills.

Re: REQ: Wind Speed

Posted: 18 Jan 2010, 19:47
by Pako
If it's worth doing it's worth overdoing.

name = "Wind Helper",
desc =
Shows wind info and when to build wind.
The next wind vector turning point displays the immediate wind forecast.
Forecast text tells the forecast from integrated winds.
(current economy and wind mean affects what to build but not the forecasts)

The next spring version will break this widget.

Image
Image

Re: REQ: Wind Speed

Posted: 18 Jan 2010, 19:51
by Jazcash
Very nice, I like it. Although, my GUI is chunked up already with stuff so I'd appreciate just the figure of current windspeed with maybe a pic of a windmill next to it to indicate what it is.

If you want to make it more cool an all, making it moveable, resizeable and recolourable would be awesome :lol:

Re: REQ: Wind Speed

Posted: 18 Jan 2010, 20:06
by manolo_
upload it to widgetdb (marked as hidden)

Re: REQ: Wind Speed

Posted: 18 Jan 2010, 21:53
by JohannesH
If you dont want to clog the interface an option is to just group 1 windmill to somewhere like 8-0, then checking it is just 1 keypress away. And its easy to ctrl-z from there to see your overall windmill count which is useful too.

Re: REQ: Wind Speed

Posted: 18 Jan 2010, 21:58
by Pako
Of course it must be moveable, resizeable and recolourable, why didn't I think of that.

(recolour by scrolling over the resize button)

Re: REQ: Wind Speed

Posted: 18 Jan 2010, 22:23
by Jazcash
Again, a simple version with just the wind speed would be more fitting for me. Here, I even made an icon for you'z :P

Image

Re: REQ: Wind Speed

Posted: 18 Jan 2010, 22:27
by KaiserJ
8) cool.

i often wished for this but imagined it too trivial to ask for.

Re: REQ: Wind Speed

Posted: 18 Jan 2010, 23:43
by Pako
JAZCASH wrote:Again, a simple version with just the wind speed would be more fitting for me. Here, I even made an icon for you'z :P

Image
Just add following code to any widget that doesn't have widget:DrawScreen() function.

Code: Select all

function widget:DrawScreen()
gl.Color(1,1,1,1)
gl.Texture('LuaUI/Images/Windmill.png')
gl.TexRect(100,100,111,111)
gl.Texture(false)
local _,  _,  _,  wind = Spring.GetWind()
gl.Text(wind, 100, 100, 14, "ao")
end

Re: REQ: Wind Speed

Posted: 19 Jan 2010, 00:22
by Jazcash
Pako wrote:
JAZCASH wrote:Again, a simple version with just the wind speed would be more fitting for me. Here, I even made an icon for you'z :P

Image
Just add following code to any widget that doesn't have widget:DrawScreen() function.

Code: Select all

function widget:DrawScreen()
gl.Color(1,1,1,1)
gl.Texture('LuaUI/Images/Windmill.png')
gl.TexRect(100,100,111,111)
gl.Texture(false)
local _,  _,  _,  wind = Spring.GetWind()
gl.Text(wind, 100, 100, 14, "ao")
end
Exactly what I wanted but with one decimal place instead of 13 or so :P Also, the windmill icon to the left of the text instead of above it would be epic winrar. Thanks for such win :-)

Re: REQ: Wind Speed

Posted: 19 Jan 2010, 00:38
by lurker
I'm sure you can manage to adjust the locations yourself. To make it one decimal place, change the text line's 'wind' to 'string.format("%.1f",wind)'.

Re: REQ: Wind Speed

Posted: 19 Jan 2010, 16:02
by Spawn_Retard
Pako wrote:If it's worth doing it's worth overdoing.

name = "Wind Helper",
desc = "Shows wind info and when to build wind.
The next wind vector turning point displays the immediate wind forecast.
Forecast text tells the forecast from integrated winds.\n(current economy and wind mean affects what to build but not the forecasts)",
Image
This widget is sex.

Re: REQ: Wind Speed

Posted: 19 Jan 2010, 17:25
by smoth
it is not going to BREAK anything, you just need to adjust your equation.

Re: REQ: Wind Speed

Posted: 20 Jan 2010, 19:22
by Spawn_Retard
Pako wrote:If it's worth doing it's worth overdoing.

name = "Wind Helper",
desc =
Shows wind info and when to build wind.
The next wind vector turning point displays the immediate wind forecast.
Forecast text tells the forecast from integrated winds.
(current economy and wind mean affects what to build but not the forecasts)

The next spring version will break this widget.

Image
Image
please fix it so it wont break!

your widget is goddly.

Re: REQ: Wind Speed

Posted: 21 Jan 2010, 00:03
by Pako
Spawn_Retard wrote: please fix it so it wont break!

your widget is goddly.
I'll see how the winds are blowing in few months from now and maybe fix then(I'm not sure how BA will accept so major change and developers aren't very sensitive for fixing things either).

Immediate wind forecast will be broken anyway because the wind change vector will be curved so the turning point would be too hard to detect.

Re: REQ: Wind Speed

Posted: 21 Jan 2010, 00:11
by Jazcash
Some graphical effects of wind would be nice. Like particles blowing into wind direction or maybe plasma blown by 0.009%.