ReQ: fix nanos-lua and mini-window

ReQ: fix nanos-lua and mini-window

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

Moderator: Moderators

Post Reply
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

ReQ: fix nanos-lua and mini-window

Post 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
User avatar
Pendrokar
Posts: 658
Joined: 30 May 2007, 10:45

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

Post by Pendrokar »

manolo_ wrote: commandos 1 or settlers 2
You forgot OpenTTD. You can have many mini-windows there!
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

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

Post 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.
User avatar
Tribulexrenamed
Posts: 775
Joined: 22 Apr 2008, 19:06

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

Post 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.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

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

Post by imbaczek »

better idea: make a mod-specific widget that does it and overrides the generic widget.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

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

Post 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.
User avatar
ginekolog
Posts: 837
Joined: 27 Feb 2006, 13:49

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

Post 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.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

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

Post 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?)
User avatar
Tribulexrenamed
Posts: 775
Joined: 22 Apr 2008, 19:06

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

Post 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.
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

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

Post 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
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

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

Post 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.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

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

Post 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 ...)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

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

Post 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.
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

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

Post 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
Post Reply

Return to “Lua Scripts”