2 new beta widgets, NoDuplicateOrders + SmartNanos

2 new beta widgets, NoDuplicateOrders + SmartNanos

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

Moderator: Moderators

User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

2 new beta widgets, NoDuplicateOrders + SmartNanos

Post by TheFatController »

Smart Nanos 1.3
(TheFatController)
Image
- I made this because I like the automatic nano turret behavior of patrol but not wasting half my metal on an allies badly placed guardian.
- This widget makes nano turrets automatically reclaim and repair nearby units but not assist building unless told to.
Features:
- Auto reclaim enemies
- Reclaim metal features before energy features
- Reclaims wrecks/features at greater range than CMD.PATROL
- Repairs lowest HP units first
- Does not autorepair units you are reclaiming or mex-upgrading

Change Log
1.1 - Now reclaims energy features first if you're stalling
1.2 - Nanoturrets are nolonger all updated at once = much less effect on gameplay / fps.
1.3 - Now uses GiveOrderToUnitMap where possible to save command spam
1.3 - Now only autoreclaims if you need the resource available

http://pw3n.net/widgets/unit_smart_nanos.lua


No Duplicate Orders 1.1b
(TheFatController)
- Telling a unit to attack the same thing it's already attacking drops DPS slightly due to the slight pause generated by each command.
- Telling a builder to repair something it's already building can cause it to stop building for a second or so.
- This widget fixes that by blocking duplicate BUILD, REPAIR, ATTACK orders letting you freely drag across your armies and command them without losing those precious milliseconds!

Change Log
1.1 - Now cancels the remaining queue after the duplicate order
1.1b - Fixed widget not working for certain units (CA arm solar)

http://pw3n.net/widgets/cmd_no_duplicate_orders.lua


NOTE - Please paste errors here or report any odd behavior and any info you think might help.
Last edited by TheFatController on 22 Apr 2008, 02:05, edited 4 times in total.
User avatar
Abaddon
Posts: 41
Joined: 13 Apr 2008, 18:36

Re: 2 new beta widgets, NoDuplicateOrders + SmartNanos

Post by Abaddon »

Does first wiget conflicts with ImmobileBuilder?
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Re: 2 new beta widgets, NoDuplicateOrders + SmartNanos

Post by LordMatt »

For the first widget, what about "reclaim whatever you have less % full storage of," rather than "always metal before energy." The second widget also sounds interesting.
User avatar
det
Moderator
Posts: 737
Joined: 26 Nov 2005, 11:22

Re: 2 new beta widgets, NoDuplicateOrders + SmartNanos

Post by det »

Very cool widget ideas.

A couple suggestions:

The NoDuplicateOrders widget should cancel the remaining queue after the duplicate order. For example, let's suppose I have a con bot queued to make 10 llts. If I click build on the first incomplete llt, it should cancel the next 9 instead of completely disreguarding the duplicate order. I often do this to cancel a long queue without forgeting the current construction. It really annoys me that it will make me lose time due to repack/unpacking animations. Your widget would be a godsend here. It should have this behaviour with attack and repair as well.

Would it be possible to make the SmartNanos widget automatically assist your own constructions, but not allied? Even if it doesn't conflict with immoblie builders (does it?), it would behave nicer if integrated with your widget because it can prioritize repair/reclaim/assist/build depending on the situation.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: 2 new beta widgets, NoDuplicateOrders + SmartNanos

Post by TheFatController »

Abaddon wrote:Does first wiget conflicts with ImmobileBuilder?
It doesn't conflict but immobilebuilder will take priority over all commands, IE SmartNanos will only command a nanoturret that's set to Patrol if its not doing anything else and will insert the command before the Patrol order so it doesn't cancel it.

However as ImmobileBuilder only sets them to patrol once at the start, if you command a Nano and forget to set it to patrol again SmartNanos will start commanding it afterwards.
LordMatt wrote:For the first widget, what about "reclaim whatever you have less % full storage of," rather than "always metal before energy." The second widget also sounds interesting.
Good idea, i'll have the next version switch to energy if you're stalling (under 33% or so)
det wrote:The NoDuplicateOrders widget should cancel the remaining queue after the duplicate order.
Oops, yes it should. I'll have it do that next version.
det wrote:Would it be possible to make the SmartNanos widget automatically assist your own constructions, but not allied? Even if it doesn't conflict with immoblie builders (does it?), it would behave nicer if integrated with your widget because it can prioritize repair/reclaim/assist/build depending on the situation.
It could, I'll see how that works out in testing for next version, potentially using the Maneuver/Roam settings to specify how helpful they are with assisting buildings.
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Re: 2 new beta widgets, NoDuplicateOrders + SmartNanos

Post by Acidd_UK »

det wrote:Would it be possible to make the SmartNanos widget automatically assist your own constructions, but not allied? Even if it doesn't conflict with immoblie builders (does it?), it would behave nicer if integrated with your widget because it can prioritize repair/reclaim/assist/build depending on the situation.
It could, I'll see how that works out in testing for next version, potentially using the Maneuver/Roam settings to specify how helpful they are with assisting buildings.[/quote]

This is the one reason stopping me from using this widget, I find a few nanos helping out build my base is useful...
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: 2 new beta widgets, NoDuplicateOrders + SmartNanos

Post by TheFatController »

det wrote:The NoDuplicateOrders widget should cancel the remaining queue after the duplicate order.
Just fixed this for 1.1 off out now!
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: 2 new beta widgets, NoDuplicateOrders + SmartNanos

Post by TheFatController »

Bump for SmartNanos 1.3

1.1 - Now reclaims energy features first if you're stalling
1.2 - Nanoturrets are nolonger all updated at once = much less effect on gameplay / fps.
1.3 - Now uses GiveOrderToUnitMap where possible to save command spam
1.3 - Now only autoreclaims if you need the resource available
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Re: 2 new beta widgets, NoDuplicateOrders + SmartNanos

Post by LordMatt »

Would it be possible to have the option to build assist your stuff if nearby resource are exhausted/not needed and no units need repairs. That would be better than having the nanos idling (and appropriate for nanos near your factory).
User avatar
DoubleNeg
Posts: 24
Joined: 31 Jan 2006, 07:58

Re: 2 new beta widgets, NoDuplicateOrders + SmartNanos

Post by DoubleNeg »

More great widgets by fat, love it.
User avatar
ginekolog
Posts: 837
Joined: 27 Feb 2006, 13:49

Re: 2 new beta widgets, NoDuplicateOrders + SmartNanos

Post by ginekolog »

LordMatt wrote:Would it be possible to have the option to build assist your stuff if nearby resource are exhausted/not needed and no units need repairs. That would be better than having the nanos idling (and appropriate for nanos near your factory).
+ 1

Nanos must assist facs and buldings if nothing better is to do. Factory assist is primary reason to have nanos in first place.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: 2 new beta widgets, NoDuplicateOrders + SmartNanos

Post by TheFatController »

Well I suppose I'll add the following rule:

IF nanos have nothing to due AND nanos are set to "roam"
THEN put nanos on "Patrol"

So they will do all the reclaimy stuff first but when they're out of orders from the widget the game's patrol function can have them assist.. but only if you choose to by putting them on roam.

I'm not keen on the idea of nanos auto assisting anything cause my economy is one thing I like to micro manage myself :)
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: 2 new beta widgets, NoDuplicateOrders + SmartNanos

Post by REVENGE »

Good stuff, I appreciate your work Fat. :P
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Re: 2 new beta widgets, NoDuplicateOrders + SmartNanos

Post by LordMatt »

TheFatController wrote:Well I suppose I'll add the following rule:

IF nanos have nothing to due AND nanos are set to "roam"
THEN put nanos on "Patrol"

So they will do all the reclaimy stuff first but when they're out of orders from the widget the game's patrol function can have them assist.. but only if you choose to by putting them on roam.

I'm not keen on the idea of nanos auto assisting anything cause my economy is one thing I like to micro manage myself :)
Well, can you make that optional (i.e. release the default how you want it, but allow someone to go in there in change a variable from 0 to 1 or something like that to enable the current behavior with the patrols widget? Otherwise someone needs to write a widget to put nanos on roam if I were to use your widget.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: 2 new beta widgets, NoDuplicateOrders + SmartNanos

Post by TheFatController »

Immobilebuilders does that.

The main issue is that I did put in building code complete with a config and all sorts but for only 20 nano turrets it was sending up to 1000 commands a minute with 1 nearby factory on repeat.. that's just unacceptable in any team game.

I could optimize but the potential for extra commands is still large and Patrol takes care of it automatically.
klapmongool
Posts: 843
Joined: 13 Aug 2007, 13:19

Re: 2 new beta widgets, NoDuplicateOrders + SmartNanos

Post by klapmongool »

TheFatController wrote: I'm not keen on the idea of nanos auto assisting anything cause my economy is one thing I like to micro manage myself :)
ah lol, i thought it was defective... Would love the smartnano functions working well together with the immobile tho. Cause atm the immobile will make them assist that nasty guardian you hate so much before smartnano's will prevent them from assisting.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: 2 new beta widgets, NoDuplicateOrders + SmartNanos

Post by TheFatController »

It can't realistically do that without conflicting with people's expectations (Smartnanos doesn't command units that already have orders), what I normally do is order all nano turrets to STOP when I come under attack and let Smartnanos takeover then re-command them to build when i'm safe.

I suppose I could add a panic feature that would stop them for 10 seconds then resume what they were doing or something, but i'm fine with the manual method
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: 2 new beta widgets, NoDuplicateOrders + SmartNanos

Post by Google_Frog »

Can you make them auto capture enemies too?
User avatar
Hoi
Posts: 2917
Joined: 13 May 2008, 16:51

Re: 2 new beta widgets, NoDuplicateOrders + SmartNanos

Post by Hoi »

nano's cannot capture as far as i know :wink:
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: 2 new beta widgets, NoDuplicateOrders + SmartNanos

Post by Google_Frog »

Hoi wrote:BA nano's cannot capture as far as i know :wink:
Fixed
Post Reply

Return to “Lua Scripts”