#Com autorepair units while idle (FIXED)
1 messages · Page 1 of 1 (latest)
Put your commander on repeat and give it a repair command in a circle
It will auto repair any units that enter the area
No widget needed 😎
Ya, but you gotta set a new circle every time you move somewhere, and it will not match the buildradius of the commander
I have a rough outline of a widget that does this. I put ZERO guarantees on this though
Ty! will test how this does in a skirmish
Added some nil checks to prevent some nil stuff found during testing. Also, is the build radius a cylinder or sphere? should GetUnitsInSphere be used in place of GetUnitsInCylinder?
probably a better way to do all the nil checks but I just threw in what worked
build radius is a cylinder.
It does lead to some tricks like building LLTs way up on cliff sides
good to know. Widget seems to work pretty well and as intended; will try it out in some future games.
stress tested it with a ball of lazarus and maces + com hugging a self-d'd energy converter and didn't seem to cause many issues
I think I also rigged up the gadget to auto reclaim enemies if they are nearby, and rigged it up to auto-relaim features nearby.
So there is one edge case of idle builders reclaiming a wreck you may want to rez. But you can add some kind of is_resurrectable check if you want
I'd say one annoying bug with the mod is that it repeatedly makes a sound effect whenever some units are selected; think it has to do with reissuing orders repeatedly
tried to use this one, kept overriding my commands >> (kept hearing the repair sound go off while issuing orders)
I was just spectating, and saw your commander blinking like a Christmas light 😛
yeah I had to turn it off mid game
Same here, had to turn it off
should probably put a disclaimer; this one was never finished and will probably be made obsolete once/if api changes are put in to restrict automation
Com autorepair units while idle (ABANDONED; USE AT OWN RISK)
I've fixed all the issues, and added some new functionality.
- takes into account unit sizes which extends repair radius a bit
- units will not chase enemies when reclaiming them
- units will prioritize repairing even if already reclaiming
- an option to forbid reclaiming resurrectable wrecks
- a variable for allowing certain units to move in order to repair
thanks, will rename post to indicate it's active again
Com autorepair units while idle (FIXED)
so this automates only repair or also reclaiming on idle? basically it works like fight command without moving con? ( I mean con won't chase some allied units just to continue repairing them?)
yeah kind of makes your commander, and other constructors/rezbots, into nano turrets. if a unit is damaged in their build radius they will repair it, if an enemy enters the radius, they will reclaim it, and if there is salvage on the ground they will reclaim that. There is a variable at the top if you dont want the constructors to move at all, but I've been experimenting with letting them move a bit if a damaged unit is out of their build range
I dont let the commander move at all though, too risky on the front line
so it will also autoassist building just like nanos? does this widget break ctrl+b select idle cons then?
not sure if it will assist building something
but as long as they are still idle, you can use a hotkey to select it. If they are repairing something, then they arent idle anymore
Next version respects cloak command
1 problem with this widget is it makes rez bots auto-reclaim instead of rez by default
also autorepair seems to have like 2x range of buildrange, while reclaim only works within buildrange
I tried the new version out last night, still had issues were the repair was overriding manual orders
what order for example?
can't remember tbh, could have been move or build or idk
just remember it kept stopping my orders
you can have it not reclaim ressruectable units with the variable at the top of the file
i checked it does not stop orders when building when nearby there is wreck or low hp unit
but only by rez bots?
comm should ignore ressurectable as well if it is set
also there is quirky thing: when there is nearby unhealthy unit and another builder is building something then idle builder will assist building; while if there was no unhealthy unit nearby it wouldnt ever assist building
it ignores units being built when doing the check, if you want it to assist building you can remove buildProgress == 1
when there is an unhealthy unit in range, it issues an area repair command which will assist buildings. kind of quirky indeed
yea this works, idk maybe thats even better CHEAT 😄
yea tested this=false and it makes everyone ignore ressurectable; my intention was that rez bot auto rez, while cons auto reclaim; so it doesnt work like that
ressurecting takes energy, so it seems like it would be more of a conscious decision to do. repairing things in range is always the obvious correct action to perform
it can be replicated by just using the repeat command, but I find it annoyingly clunky, why not fix that UX problem?
i dont understand you; anyway i tried it in real game and assisting building seemed moving units too much against my future plans so i turned it off; so with default settings its pretty op especially on front position; not sure if this should be legal :/
it feels a bit like OP marines and medics in starcraft1 except here it also auto reclaims your army wrecks so that you can insta rebuild 😄
Interesting widget! I've tried it out to see if I can provide any feedback. The primary thing I've spotted is this:
If I find my commander auto-reclaiming something and I decide to shift-queue some commands for after he's done with that... if I *then * hit the 'N' key to skip the reclaiming and go to the next item in his command queue, he does not stop reclaiming and ignores the instruction until he's finished reclaiming aaaall the things he has in mind/radius (like a bunch of large trees for example). Without the widget, the reclaim command can be skipped like any other command of course.
All I can do in that moment is bin the entire order queue I've just entered and force him to stop eating things with a new primary (un-queued) command, and then create the whole order queue again from scratch.
Hope all that makes sense and I'm v happy to provide exact steps if there's any difficulty replicating the above. Thanks for your work on the widget; it would potentially be very handy (provided it isn't decided to be too much automation from a game design perspective, which I could definitely understand also). Cheers!
Thanks for the feedback! Even without the widget, I cannot get the commander to skip to the next queued command if he is given an area reclaim command instead of a specific reclaim target. Does it skip for you if given an area reclaim command?
Oh crumbs, yes you're entirely correct; I've just tried and without the widget being involved at all - I can only skip object-specific reclaim, but for area-reclaim, hitting skip temporarily halts the reclaim progress before resuming (and if you instead hold the skip button down it does eventually skip past the area-reclaim... and most/all of the queued commands for after the reclaim). Sounds like I have feedback for the base game instead! 😄
Second feedback: perhaps the commander could stop auto-reclaiming metal when the player is already overflowing metal (and the same for energy reclaim also)?
good idea, will add that for sure
You could also consider not auto-reclaiming your own commanders body. I left 1% metal on the commander to rez later, but a construction bot got too close and proactively ate the last 1% of him so that he could no longer be resurrected.