View topic - NanoButtons Gadget - new version 1.1



All times are UTC + 1 hour


Post new topic Reply to topic  [ 51 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: 09 Oct 2007, 18:20 
User avatar

Joined: 12 Jul 2007, 17:55
All new buttons visible and enabled:
Image

Changelog 1.0 -> 1.1
- new Attack ON/OFF button
- buttons can be hidden
- AIs have all options set to ON by default
- Repeat is back
- cancels Guard order if unit is out of range
- much faster (nano updates are spread among 32 frames instead of 1)

Changes to UI:
This gadget hides maneuver, patrol, fight and repeat buttons and adds four new ones:
Attack ON/OFF - Attacks units with lowest maxHP first.
Repair ON/OFF - Repairs most damaged units first
Reclaim ON/OFF - Reclaims most expensive corpses/features first (eg: commander).
Assist ON/OFF - Auto-assists both factories and new buildings :-)

Features:
- 4 new buttons - described above
- Inteligent priority management - described above
- does not override your commands - nano is controled only if idle
- Repair and reclaim are ON by default - nano turret is a turret and turrets operate automatically. Try it - it's really cool. Besides repairing and reclaiming cost you nothing (unlike assisting). This can be changed easily by modifying defaultRepair = ON to OFF.
- doesn't reclaim allied dragon teeths etc.
- cpu friendly

Recommended settings:
Repair - ON and visible. Unfortunately there's no way to prevent nanos from repairing units that are being reclaimed. Otherwise there'd be no reason to leave it visible.
Reclaim - ON and visible.
Assist - OFF and visible.
Attack - OFF and hidden. I think this should be left to players skill.

Pro tip:
Hold shift when clicking on a button to switch all buttons with one click.

Edit: The bad:
Auto-repair repairs units being reclaimed. I was unable to find any suitable call-out. It's possible to do but it would have an impact on performance. Unless trepan comes into this thread and says something like "lua has been able to do so for a very long time" I can't do anything about it.

Notes:
- It's simply cool :-)
- If you're not a modder and just want to test it see this thread for help on using gadgets.

Download:
http://www.unknown-files.net/3700/NanoButtonsGadget_11/


Last edited by BigHead on 22 Oct 2007, 18:26, edited 8 times in total.

Top
 Offline Profile  
 
 Post subject:
PostPosted: 09 Oct 2007, 18:34 
Moderator
User avatar

Joined: 02 Jan 2007, 16:18
Location: Bremen, Germany
What's so bad about the ImmobileBuilder widget that comes with Spring?

Maybe it could prioritize better but that's all I can think of..


Top
 Offline Profile  
 
 Post subject:
PostPosted: 09 Oct 2007, 18:39 
User avatar

Joined: 12 Jul 2007, 17:55
I don't remember me saying it's bad. This gadget wasn't created to replace that widget. It's purpose is to remove commands that have no sense for a static non-combat unit and replace them with a single button which does what you would expect it to do.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 09 Oct 2007, 18:44 
Moderator
User avatar

Joined: 02 Jan 2007, 16:18
Location: Bremen, Germany
Ah, I see.. So this is another step towards your more user-friendly Spring? You have my full support then ;)..

Btw, would it be okay, if I integrate some stuff of your help system into IceUI? I don't really know if it's possible but my initial goal with IceUI was that all GUI stuff would be handled by it so that the player doesn't have to cope with different window systems.. I know, though, that IceUI isn't ready for that yet..


Top
 Offline Profile  
 
 Post subject:
PostPosted: 09 Oct 2007, 18:47 
User avatar

Joined: 12 Jul 2007, 17:55
Of course you can. You might want to play with the drawFrame() function to make the widget follow your window preferences.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 09 Oct 2007, 18:52 
Moderator

Joined: 22 Aug 2006, 15:19
ideally nanos shouldn't repair stuff that's being reclaimed, guess you could do this too while you're at it. that's one thing immobilebuilders doesn't cover and it sucks when auto-upgrading mexes.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 09 Oct 2007, 18:59 
User avatar

Joined: 12 Jul 2007, 17:55
Now I understand why people got confused. The name of the gadget suggests that nano towers will automatically relaim/repair stuff ... I'll change it :)

imbaczek: I'm not sure if that can be done without a performance impact but I'll try.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 09 Oct 2007, 19:26 
User avatar

Joined: 23 Aug 2005, 21:02
imbaczek wrote:
ideally nanos shouldn't repair stuff that's being reclaimed, guess you could do this too while you're at it. that's one thing immobilebuilders doesn't cover and it sucks when auto-upgrading mexes.

I think that's more of an engine issue than one for a Lua widget/gadget to handle.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 09 Oct 2007, 19:34 
User avatar

Joined: 12 Jul 2007, 17:55
TechnoTone wrote:
I think that's more of an engine issue than one for a Lua widget/gadget to handle.

Good point, maybe it's the patrol command that needs improving. Unit under the patrol command shouldn't repair units being reclaimed generally.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 09 Oct 2007, 19:38 
User avatar

Joined: 02 May 2005, 02:56
Location: Canada
Hidden function of a nano-tower's patrol function is that if you give it a patrol order it will automatically repair/reclaimgarbage/help anything in range... at least it used to be...

If you're messing with the interface already having "Auto-Repair" "Auto-Reclaim" "Auto-Assist Build" and "Auto attempt to reclaim enemies in range" as toggles would be teh awsomes... also getting it to reject build orders that are out of range automatically would be keen.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 09 Oct 2007, 19:48 
User avatar

Joined: 12 Jul 2007, 17:55
Quote:
Hidden function of a nano-tower's patrol function is that if you give it a patrol order it will automatically repair/reclaimgarbage/help anything in range... at least it used to be...
... and exactly that function will be used by this gadget. I meant other functions than the patrol one when I asked :)

I can see the use for having 3 sepparate "Auto-Repair" "Auto-Reclaim" and "Auto-Assist Build" buttons I'm just not sure if I really want them :)

"Auto attempt to reclaim enemies in range" - This needs a broader discussion. I personally think that it shouldn't be automatized.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 09 Oct 2007, 20:12 
Redacted
User avatar

Joined: 08 Jan 2007, 06:13
Location: Don't be silly. If there's no machine heaven, where do all the toasters go?
A question about the immobilebuilders widget. Am I right in thinking that it allows you to insert orders with shift only because one of the patrol points is exactly on the unit? Because if I reset a nanoturret's order queuem unless I zoom way in and precisely place a patrol point right on top of it, it will never get past the patrol command to other commands again. And I really think that should be changed if I have it right. If it seems so I'll look for the relevant code later.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 09 Oct 2007, 20:24 
User avatar

Joined: 23 Aug 2005, 21:02
lurker - the ImmobileBuilders widget gives them a patrol point slightly north-east of their current position. I don't know about shift-clicking to insert orders, I just give my own order then shift-click a patrol order if I want to tell them what to do.

BigHead - I sometimes use the Repeat command to force them to repair or reclaim an area repeatedly. Perhaps you could do a similar thing to implement the toggles that SinbadEV mentions by switching on repeat and then adding a queue with the enabled actions over the area of the nano-tower. For this to work though you'd need to know the nano-range - is that retrievable from LUA? If you could do this it would be pretty sweet!


Top
 Offline Profile  
 
 Post subject:
PostPosted: 09 Oct 2007, 20:34 
User avatar

Joined: 12 Jul 2007, 17:55
Quote:
If you could do this it would be pretty sweet!

It's possible - unitDef.buildDistance


Top
 Offline Profile  
 
 Post subject:
PostPosted: 09 Oct 2007, 20:35 
Redacted
User avatar

Joined: 08 Jan 2007, 06:13
Location: Don't be silly. If there's no machine heaven, where do all the toasters go?
TechnoTone wrote:
lurker - the ImmobileBuilders widget gives them a patrol point slightly north-east of their current position.

The only time I have ever been able to replicate the behavior of the widget is with a patrol point on the exact coordinates of the nanoturret, and a second off of it. Yes it does place one away from it, but is that all it does? If so, why is it so hard for me to get the behavior I want?


Top
 Offline Profile  
 
 Post subject:
PostPosted: 09 Oct 2007, 20:37 
User avatar

Joined: 23 Aug 2005, 21:02
Here's the relevant code:

Code:
local function SetupUnit(unitID)
  -- set immobile builders (nanotowers) to the ROAM movestate,
  -- and give them a PATROL order (does not matter where, afaict)
  local x, y, z = Spring.GetUnitPosition(unitID)
  Spring.GiveOrderToUnit(unitID, CMD.STOP, {}, {})
  Spring.GiveOrderToUnit(unitID, CMD.MOVE_STATE, { 2 }, {})
  Spring.GiveOrderToUnit(unitID, CMD.PATROL, { x + 25, y, z - 25 }, {})
end


Top
 Offline Profile  
 
 Post subject:
PostPosted: 09 Oct 2007, 20:42 
Redacted
User avatar

Joined: 08 Jan 2007, 06:13
Location: Don't be silly. If there's no machine heaven, where do all the toasters go?
TechnoTone wrote:
Here's the relevant code:

Code:
local function SetupUnit(unitID)
  -- set immobile builders (nanotowers) to the ROAM movestate,
  -- and give them a PATROL order (does not matter where, afaict)
  local x, y, z = Spring.GetUnitPosition(unitID)
  Spring.GiveOrderToUnit(unitID, CMD.STOP, {}, {})
  Spring.GiveOrderToUnit(unitID, CMD.MOVE_STATE, { 2 }, {})
  Spring.GiveOrderToUnit(unitID, CMD.PATROL, { x + 25, y, z - 25 }, {})
end

WTF


Top
 Offline Profile  
 
 Post subject:
PostPosted: 09 Oct 2007, 20:47 
User avatar

Joined: 12 Jul 2007, 17:55
Please use private messages or start a new thread for offtopic chat :)


Top
 Offline Profile  
 
 Post subject:
PostPosted: 09 Oct 2007, 23:13 
Moderator
User avatar

Joined: 15 May 2005, 03:26
Location: St Louis
MelTraX wrote:
Ah, I see.. So this is another step towards your more user-friendly Spring? You have my full support then ;)..

Btw, would it be okay, if I integrate some stuff of your help system into IceUI? I don't really know if it's possible but my initial goal with IceUI was that all GUI stuff would be handled by it so that the player doesn't have to cope with different window systems.. I know, though, that IceUI isn't ready for that yet..

MelTraX please make it optional, I like to have all of the buttons that have some functionality for the unit (I can think of using repeat for a nanotower sometime) available.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 14 Oct 2007, 19:28 
User avatar

Joined: 12 Jul 2007, 17:55
It's released. Click!


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 51 posts ]  Go to page 1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: Bing [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.