Page 1 of 2
Simple auto group
Posted: 25 Mar 2007, 04:08
by Licho
Auto Group
========
http://widgets.licho.eu/unit_auto_group.lua
- This simple widget automatically puts your newly built units into groups based on unit type.
To setup auto group, select units and press ctrl+alt+0-9. New units of types selected will be automatically added to group with that number.
That way you can simply make auto group 1 with assault units, group 2 with artilery, group 3 with fighters and scouts etc..
Transport assist tweak
===============
http://widgets.licho.eu/unit_transport_assist.lua
- I modified this widget (originally by Ray) which transports units from factory to factory's waypoint.
- transports are now using area unload to prevent stucks
- all units that are about to be picked by any transport will be stopped (to prevent endless chases)
- workers are no longer transported (to make plugin compatible with factory guard)
Posted: 25 Mar 2007, 05:15
by trepan
FYI:
The SVN lua interface provides SetUnitGroup(), which removes
the necessity of using the Spring.SelectUnitsByValues() call. That
select call cancels multipart commands (such as move fronts).
Posted: 25 Mar 2007, 05:35
by Licho
Ahh, thats nice, I will upgrade it as soon as spring is released :)
Posted: 25 Mar 2007, 16:06
by BrainDamage
nice edit on the transport_assister widget
i've found 2 probs with it:
1- the transport is idle, i build few units in a row, the building speed is faster than the speed for the transport to pick them, after the transport picked them all, it will come back guarding to the factory instead of unloading them, but if afterwards, i build only 1 tank, the transport will pick it up and go to the drop point and unload them all
2- the transport is flying over the drop point, i build few more units; the transport will unload only 1 unit, then it will come back picking the new units and go back to the drop point and unload them all (only if there are no new units to pick)
Posted: 25 Mar 2007, 20:13
by Tim-the-maniac
Yeah the modified transport assister widget doesnt seem to work anymore
Posted: 25 Mar 2007, 21:05
by Licho
This is how original transport assist works for me too
I will try to modify it .. in fact I wanted to fix those bugs and improve it so that units dont wait for transport endlessly - they should be free to go if they are waiting longer than a minute.
And transport should skip units that are already more than some distance from original factory.
Posted: 25 Mar 2007, 23:08
by BrainDamage
to check when/if the transport must que the load_units command before or after the unload how about this condition:
if actual distance of the transporter to the dropping point is less than 1/4 of of the total distance, then add to the top of the que the loading order
if the distance is longer, then add to the bottom (before the guard command)
Posted: 25 Mar 2007, 23:20
by Licho
Problem is - how to determine whether transport is not full (and can accept queue orders before guard) and when it's full and must unload first?
Posted: 26 Mar 2007, 21:23
by stilicho
The auto group widget is very useful. Thanks.
Posted: 13 May 2007, 20:15
by 1v0ry_k1ng
would it be possible to make the autogroup remember unit type groups between games? so you can assign a group to a unit type for every game?
Posted: 13 May 2007, 21:53
by Licho
Sure, I can add that.
Posted: 15 May 2007, 01:38
by Licho
Redownload the widget from the original link. It now persist grouping settings.
Posted: 15 May 2007, 11:14
by 1v0ry_k1ng
awesome! thanks :)
Posted: 21 May 2007, 21:00
by KDR_11k
The saved unit groups are strange, for different mods they behave completely strange and group units I never told it to.
Posted: 17 Jul 2007, 12:01
by Licho
Widget updated for spring 75
Posted: 17 Jul 2007, 18:27
by CautionToTheWind
Did you finish your fixes in Transport assist?
Posted: 18 Jul 2007, 00:03
by Licho
Not yet
Posted: 18 Jul 2007, 03:40
by stilicho
The new version of the Auto Group widget doesn't work for me.
From infolog.txt
Creating sky
Spring 0.75b1
Reloaded ctrlpanel with: LuaUI/ctrlpanel.txt
LuaUI: bound F11 to the widget selector
LuaUI: bound CTRL+F11 to tweak mode
Failed to load: unit_auto_group.lua (Include() could not load 'LuaUI/Headers/spring.h.lua'
)
LuaUI v0.2
Player no name joined as 0
Am I missing a file in the Headers directory, and if so, where can I get it?
Posted: 20 Jul 2007, 19:46
by stilicho
I fixed my problem by reinstalling Spring 74b3 and copying the missing file from it's LuaUI\Headers folder.
Posted: 21 Jul 2007, 17:57
by very_bad_soldier
Yes, same here. It seems that the files
LuaUI\Headers\opengl.h.lua
LuaUI\Headers\spring.h.lua
are missing. I couldn't use any custom lua widgets without them.
EDIT:
spring.h.lua is essential, but opengl.h.lua was also missing. I don't know if it is needed too.
BTW:
Thanks for the widgets, they are great!