Page 1 of 1

ReQ: fix nanos-lua and mini-window

Posted: 05 Nov 2008, 20:47
by manolo_
hi,

1.)
since 0.77bx was released, the nanos wont "patrol" after i built them, so could the nano-widget be fixed (so nanos are on patrol after they were built)

2.)
im not sure if its possible under lua (or spring in general), but could sb make a lua for a 2nd ingame-screen. ill explain: in commandos 1 or settlers 2 was it possible to spec a certain place/unit in a mini-window, so u play on the main-window but could also do something on this mini-window

Re: ReQ: fix nanos-lua and mini-window

Posted: 05 Nov 2008, 21:43
by Pendrokar
manolo_ wrote: commandos 1 or settlers 2
You forgot OpenTTD. You can have many mini-windows there!

Re: ReQ: fix nanos-lua and mini-window

Posted: 07 Nov 2008, 17:29
by KDR_11k
The nano widget needs another fix, it sets factories in many mods on patrol, making the units clump inside and block the factory.

Re: ReQ: fix nanos-lua and mini-window

Posted: 09 Nov 2008, 16:04
by Tribulexrenamed
KDR_11k wrote:The nano widget needs another fix, it sets factories in many mods on patrol, making the units clump inside and block the factory.
Yeah lol. Also it completely fails on NOTA. Detect if the unit is a commander before putting it on patrol.

Re: ReQ: fix nanos-lua and mini-window

Posted: 11 Nov 2008, 13:43
by imbaczek
better idea: make a mod-specific widget that does it and overrides the generic widget.

Re: ReQ: fix nanos-lua and mini-window

Posted: 11 Nov 2008, 17:40
by Argh
better idea: make a mod-specific widget that does it and overrides the generic widget.
As has already been discussed, whatever's in the user folder in LuaUI overrides whatever's in the mod. Completely crappy situation, in terms of this kind of thing.

Re: ReQ: fix nanos-lua and mini-window

Posted: 11 Nov 2008, 20:22
by ginekolog
I repaired this widget.
name = "ImmobileBuilder",
desc = "Sets immobile builders to ROAM, with a PATROL command",
author = "trepan",
date = "Jan 8, 2007",

Just set:

local idleFrames = 0


This means that once u stop nano turret or commander in nota, it wont repatrol again.

I use this widget in all games and works flawlesly even in combo with smartnanos. When i stop nanoturrets, smartnano takes over.

If widget owner could update this and put on Widget downloader would be great.

Re: ReQ: fix nanos-lua and mini-window

Posted: 11 Nov 2008, 21:55
by imbaczek
Argh wrote:As has already been discussed, whatever's in the user folder in LuaUI overrides whatever's in the mod. Completely crappy situation, in terms of this kind of thing.
But a blessing when you want to fix a widget without releasing a new version of your mod. Anyway, it should be doable with a widget named differently which acts in a hostile manner towards the default one. (Can a widget unload a different widget? It should be able to, the widget handler does this, right?)

Re: ReQ: fix nanos-lua and mini-window

Posted: 12 Nov 2008, 03:46
by Tribulexrenamed
I never got smart nanos to do anything useful. More specifically, my nanos do nothing at all. SO i like the nanos taking their patrol commands back up. All i have to do is press s. The important thing is really the units it recognizes, and not asking them to patroll in the first place.

Re: ReQ: fix nanos-lua and mini-window

Posted: 12 Nov 2008, 08:30
by manolo_
tbh i want them to patrol after i built them (less micro), also when i play ba and u make a rectangle of nanos it would be nice

in the past the nanos did that with the smart-nano-lua, but now they wont do it after they were built

Re: ReQ: fix nanos-lua and mini-window

Posted: 12 Nov 2008, 11:25
by Argh
Can a widget unload a different widget?
No, so far as I can tell. The command to WidgetHandler only takes self-referencing parameters.
It should be able to, the widget handler does this, right?
Should and can are two entirely different things. I talked about all of this months ago, and trepan was too convinced that I was stupid... and too lazy to test his "solution" vs. P.U.R.E., which would have been pretty convincing. I can't use his "solution", which is a mod-side lockout of Widgets, because that would:

A. Break map-side Widgets.
B. Break all Widgets in World Builder.

Why? Because VFS doesn't differentiate between trusted files (anything in our games or maps we're playing, or anything that they call as dependencies) and untrusted files (whatever players feel like putting into their LuaUI folder).

So no- I can't do a blacklist for Widgets that incompatible or are cheats. I can't do a whitelist, either. It's really aggravating.

Re: ReQ: fix nanos-lua and mini-window

Posted: 12 Nov 2008, 12:38
by jK
Argh wrote:
Can a widget unload a different widget?
No, so far as I can tell. The command to WidgetHandler only takes self-referencing parameters.
It should be able to, the widget handler does this, right?
Should and can are two entirely different things. I talked about all of this months ago, and trepan was too convinced that I was stupid... and too lazy to test his "solution" vs. P.U.R.E., which would have been pretty convincing. I can't use his "solution", which is a mod-side lockout of Widgets, because that would:

A. Break map-side Widgets.
B. Break all Widgets in World Builder.

Why? Because VFS doesn't differentiate between trusted files (anything in our games or maps we're playing, or anything that they call as dependencies) and untrusted files (whatever players feel like putting into their LuaUI folder).

So no- I can't do a blacklist for Widgets that incompatible or are cheats. I can't do a whitelist, either. It's really aggravating.
Please stop making the engine responsible for your own incompetence ...

(it is possible to block widgets on modside and it is possible for a widget to unload a different widget ...)

Re: ReQ: fix nanos-lua and mini-window

Posted: 12 Nov 2008, 18:16
by Argh
Then explain HOW, with P.U.R.E. and World Builder and map Widgets, because I tried to port the CA code, followed the directions that were given... and it just plain doesn't work.

So far as I can tell, you haven't really figured out how to do this, and until somebody explains, very clearly, how this can be done, I simply do not believe you. This is yet-another classic example of you telling me something is true, when you haven't actually tested it. Tell me you have it working with P.U.R.E. and World Builder and a map with active Widgets before you tell me anything else.

Re: ReQ: fix nanos-lua and mini-window

Posted: 16 Nov 2008, 20:16
by manolo_
lurker modified the unit_immobile_buider.lua that way that i will work for just nanos now (set them to patrol)

link: http://pastebin.ca/1257914