Page 1 of 1

New widget: OnlyFightersPatrol

Posted: 23 Apr 2008, 11:10
by dizekat
Widget:
http://dmytry.no-ip.org/unit_only_fighters_patrol.lua
Description:
Only fighters go on air factory's patrol route after leaving factory. Improves fps in late game.

What does it do:
When you're spamming fighters, bombers, radar/sonar planes, and so on with factory set on repeat, and with factory command queue to patrol your airspace, only fighters will go on patrol route, other airplanes(except builders) are stopped.
Scout and radar/sonar planes on patrol are extremely CPU intensive (about 10x more than fighters, for me), so it does improve fps quite a bit.

Widget doesn't do anything when queue does not contain "patrol". (also it detects patrol even if it is not first command in queue)

Builders (construction airplanes):
Widget does not modify command queue of builders, for compatibility with FactoryGuard and similar widgets which send builders to do something. If you want it to stop builders too, change stop_builders=false to stop_builders=true

In some mods it could have problems with "fighters" which are actually dive bombers. You can edit script and add names of fighters which you don't want to go on patrol (same as done for "Liche")

I have idea for more advanced widget that would let you set different command queues for different kinds of units at factory.

Re: New widget: OnlyFightersPatrol

Posted: 24 Apr 2008, 05:14
by Tribulexrenamed
Mate, would you mind if i made a few modifications to yor script?

Re: New widget: OnlyFightersPatrol

Posted: 24 Apr 2008, 10:10
by dizekat
no, ofc i wouldnt mind... its meant to be customized by people for their needs... e.g. if someone wants his gunships to go on patrol aswell, its trivial change. (however, gunships (t2 and t1 alike) on patrol arent useful IMO, 1..2 flaks getting under patrol route can kill them one by one... you always have to micro gunships anyway to kill ground AA first) But unless you enjoy very low fps games, dont release widget that sets both radars and fighters on patrol

Re: New widget: OnlyFightersPatrol

Posted: 25 Apr 2008, 02:25
by Tribulexrenamed
Just making sure. :wink:

However, on second thought, I want to start from scratch. What I want to do is set up a custom patrol route with draggable waypoints on the map. I dont know how exactly this would work with GUIs etc, but I think its worth it to figure it out. Then, all fighters from all factories would be given those patrol orders, and other orders from the factories would be followed by all other units. Does this make sense?

Re: New widget: OnlyFightersPatrol

Posted: 25 Apr 2008, 08:47
by dizekat
Well i thought about making different factory command queues for different unit types. The problem is user interface, how user would select for which unit the route is made. Needs some modification to the BALayout script, or which script handles unit icons. Maybe something+click on build icon, then make queue as usual.
Paths with draggable waypoints are good idea, "outlive" RTS (old style starcraft-ish RTS) has it. You can make path, then send units to it.

Re: New widget: OnlyFightersPatrol

Posted: 26 Apr 2008, 19:26
by Beherith
Superb. Love the widget. But it still makes my arm t2 radar planes patrol.

Re: New widget: OnlyFightersPatrol

Posted: 26 Apr 2008, 19:34
by aegis
Tribulex wrote:Just making sure. :wink:

What I want to do is set up a custom patrol route with draggable waypoints on the map.
There is already a waypoint dragging widget.

Re: New widget: OnlyFightersPatrol

Posted: 26 Apr 2008, 21:51
by LordMatt
It was made by Ray. IIRC it had some bugs and doesn't work with current spring version.

Re: New widget: OnlyFightersPatrol

Posted: 26 Apr 2008, 21:58
by Kloot
Mine still does.

Re: New widget: OnlyFightersPatrol

Posted: 26 Apr 2008, 23:55
by Tribulexrenamed
I know there is a draggable waypoints widget. I have it and its mostly useless in my opinion. Custom commands for each unit was actually an idea of a friend of mine, and it is one of the goals of the gui project that I have taken on. Also, the ba layout is just a layout, and its not where changes should be made. I am using Iceui, which has an excellent framework that supports different click actions with modifiers. After the tooltip is done, we will recreate the control panel using Iceui, and then work from that point. This is the point at which this project becomes more than graphical enhancement.
Beherith wrote:Superb. Love the widget. But it still makes my arm t2 radar planes patrol.
Modify the script in the same way that dizekat has done for the Liche.

Re: New widget: OnlyFightersPatrol

Posted: 07 Jun 2008, 13:54
by CautionToTheWind
The link doesn't work. Are you hosting this on your computer? Turn it on, please :)

Re: New widget: OnlyFightersPatrol

Posted: 07 Jul 2008, 17:32
by ginekolog
link is dead.. next time its better to post on jobol site

Re: New widget: OnlyFightersPatrol

Posted: 12 Jul 2008, 15:16
by dizekat
Sorry for non-availability.

Uploaded to stable site:
http://dmytry.pandromeda.com/tmp/lua_fo ... patrol.lua