Page 1 of 2
Unit Auto Repair Widget
Posted: 29 Dec 2008, 01:53
by thesleepless
ok, just made a Unit Auto Repair Widget
http://spring.jobjol.nl/show_file.php?id=1654
any unit with repair ability in the vicinity of a damaged unit will repair it, even if it's moving, but not if it's building something.
Known Issues
If the repair unit is set to repeat it'll repeat the repair order forever, not sure how to fix this... I need to remove the order somehow after the repair is completed.
Selection of which unit to repair is currently just based on distance, it should probably be based on the value and health of the damaged unit
But this means you can send con/repair units with your main attack force and they'll repair any combat units that get damaged as they go
It'd be nice to be able to add an AutoRepair toggle button for the unit, is this easy to do?
Re: Unit Auto Repair Widget
Posted: 29 Dec 2008, 02:51
by overkill
oh wow, why hasnt this been made before? thanks mate.
Re: Unit Auto Repair Widget
Posted: 29 Dec 2008, 06:34
by Hacked
this is great, the toggle would be ideal but this works just fine
this kind of functionality should be built in, but meh
Re: Unit Auto Repair Widget
Posted: 29 Dec 2008, 08:10
by thesleepless
fixed a little bug which was causing it to kill itself when units died
Re: Unit Auto Repair Widget
Posted: 30 Jan 2009, 20:45
by CarRepairer
I'd like to stick this into CA. It would complement the retreat widget since I can take out the functionality that makes cons repeat+arearepair when placed in a retreat zone (which was annoying at times). Nice work.
Re: Unit Auto Repair Widget
Posted: 31 Jan 2009, 03:07
by thesleepless
cool, go for it, i've noticed it dies during gameplay sometimes but haven't had time to debug it properly, but welcome to use and mod however you see fit
Re: Unit Auto Repair Widget
Posted: 01 Feb 2009, 03:35
by CarRepairer
thesleepless wrote:cool, go for it, i've noticed it dies during gameplay sometimes but haven't had time to debug it properly, but welcome to use and mod however you see fit
Don't worry, I'll debug it for you as I play and you can keep pulling it out of CA.
Fix #1:
http://trac.caspring.org/changeset/3884
Re: Unit Auto Repair Widget
Posted: 01 Feb 2009, 03:41
by lurker
Car, you weren't on for me to yell at you earlier. This thing needs to not give orders to nanos. Especially orders out of reach.
Re: Unit Auto Repair Widget
Posted: 01 Feb 2009, 03:42
by Ashnal
It needs to ignore nanos completely, we have smart nanos for that.
Re: Unit Auto Repair Widget
Posted: 01 Feb 2009, 06:56
by Hacked
+1
it causes nanos on patrol to repair units/reclaim wrecks 50 miles away from them
Re: Unit Auto Repair Widget
Posted: 01 Feb 2009, 08:15
by Ashnal
I fixed it in the CA version, it ignores nanos now
Re: Unit Auto Repair Widget
Posted: 01 Feb 2009, 11:27
by Beherith
How is this better than setting my cons to repeat on + area repair?
Re: Unit Auto Repair Widget
Posted: 01 Feb 2009, 11:34
by lurker
Area repair doesn't work so hot on cons mixed into battle groups.
Re: Unit Auto Repair Widget
Posted: 01 Feb 2009, 11:35
by Hoi
The widget sees everything, and does everything very fast, you don't

Re: Unit Auto Repair Widget
Posted: 01 Feb 2009, 17:29
by thesleepless
lurker wrote:Area repair doesn't work so hot on cons mixed into battle groups.
hmm this is what i originally designed it to do, what's the problem?
Re: Unit Auto Repair Widget
Posted: 01 Feb 2009, 17:42
by Hacked
i think he was defending your widget saying that ordinary area repair isnt efficient
Re: Unit Auto Repair Widget
Posted: 01 Feb 2009, 18:57
by very_bad_soldier
Widget is nice but I often have problems with builders stopping their normal build-task to repair some nearby units. Is this intended? I thought only idle builders would be affected by this widget?
Re: Unit Auto Repair Widget
Posted: 02 Feb 2009, 02:25
by CarRepairer
very_bad_soldier wrote:Widget is nice but I often have problems with builders stopping their normal build-task to repair some nearby units. Is this intended? I thought only idle builders would be affected by this widget?
That shouldn't be, I assume. There will be kinks to work out.
Re: Unit Auto Repair Widget
Posted: 03 Feb 2009, 02:48
by hunterw
very_bad_soldier wrote:Widget is nice but I often have problems with builders stopping their normal build-task to repair some nearby units. Is this intended? I thought only idle builders would be affected by this widget?
This. Love the widget and will still use it despite this, but fix please!!
Re: Unit Auto Repair Widget
Posted: 03 Feb 2009, 16:37
by CarRepairer
I'll fix it tonight.