#Com autorepair units while idle (FIXED)

1 messages · Page 1 of 1 (latest)

frozen portal
#

It would be nice to have the commander autorepair units in range on the frontline while it's sitting there idle(like a con turret). Not sure about the implications of such a widget, but at first glance it doesn't seem like it would cause too many issues.

wheat iris
#

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 😎

hollow falcon
#

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

frozen portal
frozen portal
#

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

hollow falcon
#

build radius is a cylinder.
It does lead to some tricks like building LLTs way up on cliff sides

frozen portal
#

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

hollow falcon
#

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

frozen portal
#

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

coarse python
#

tried to use this one, kept overriding my commands >> (kept hearing the repair sound go off while issuing orders)

hollow falcon
coarse python
#

yeah I had to turn it off mid game

south shard
#

Same here, had to turn it off

frozen portal
#

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)

fiery lodge
#

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
frozen portal
#

Com autorepair units while idle (FIXED)

runic dew
#

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?)

fiery lodge
#

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

runic dew
fiery lodge
#

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

fiery lodge
runic dew
#

also autorepair seems to have like 2x range of buildrange, while reclaim only works within buildrange

coarse python
#

I tried the new version out last night, still had issues were the repair was overriding manual orders

coarse python
#

can't remember tbh, could have been move or build or idk

#

just remember it kept stopping my orders

fiery lodge
runic dew
#

i checked it does not stop orders when building when nearby there is wreck or low hp unit

fiery lodge
#

comm should ignore ressurectable as well if it is set

runic dew
#

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

fiery lodge
#

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

runic dew
runic dew
fiery lodge
#

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

fiery lodge
runic dew
#

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 😄

coarse parcel
#

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!

fiery lodge
#

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?

coarse parcel
#

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)?

fiery lodge
#

good idea, will add that for sure

coarse parcel
#

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.

fiery lodge
#

has a modification to this one in there that wont eat the commander