Disable construction near enemies/fire

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

mudcrabempire
Fast Inserter
Fast Inserter
Posts: 110
Joined: Sun Oct 28, 2018 2:44 pm
Contact:

Disable construction near enemies/fire

Post by mudcrabempire »

As the title says, I would like an option to disable robot-based construction/repair for entities that have enemies/fire nearby.

Construction robots have 100 hp and no reasonable resistances or dodging protocols. Sure, 85% fire resistance, but spending several seconds construction in a fully fueled pool with damage upgrades will still burn those 100 hp very fast (and attract further robots to repair each other, flying into the fire, getting damaged, attracting further robots, ...). They are just not meant for warzones. And in some setups they will simply fly out and die in droves until they're all gone. It's sad, useless, pointless and a waste.

All I want is for them to wait until the enemies are dead and the flames have died down and then they are free to do what they are best at: building and repairing.

sparr
Smart Inserter
Smart Inserter
Posts: 1417
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Disable construction near enemies/fire

Post by sparr »

Detect attacks by measuring ammo/power consumption by your defenses. Disable roboport coverage in areas under attack.

Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Disable construction near enemies/fire

Post by Qon »

sparr wrote: ↑
Mon Aug 24, 2020 8:10 pm
Disable roboport coverage in areas under attack.
Roboports can't have their energy buffer read so you can't turn them off quickly with power switches. You could extract robots, but that means you have to do it for the entire connected segment of the wall. It's not easy. Or do you have a way to do it?
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Disable construction near enemies/fire

Post by ssilk »

Many possibilities:
- research robot speed
- avoid building roboports so near to the border
- provide repair packs only when not under attack (ok, not satisfying)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Koub
Global Moderator
Global Moderator
Posts: 7727
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Disable construction near enemies/fire

Post by Koub »

ssilk wrote: ↑
Thu Aug 27, 2020 4:06 am
Many possibilities:
- research robot speed
Unless you're able to achieve robots that are fast enough that they can come in, repair, and leave between two damage ticks, this won't be enough. And I'm pretty sure it's impossible.
ssilk wrote: ↑
Thu Aug 27, 2020 4:06 am
- avoid building roboports so near to the border
The faster the robots, the further the roboport would need to be, up to the point where, for your robots to be safe, you'd need the defensive wall to be outside of the roboport area coverage.

The only idea I could come with in vanilla would be a laser turret based detection of the combat, with a power switch that would turn the roboport off during combat. (the way the "no drain laser turret based defense" I've seen somewhere).

I'd rather see the "every entity can be read and controlled with citcuits" suggestion be added, it would become trivial to control roboport coverage when attacks are detected on nearby structures.
Koub - Please consider English is not my native language.

Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Disable construction near enemies/fire

Post by Qon »

Koub wrote: ↑
Thu Aug 27, 2020 6:38 am
The only idea I could come with in vanilla would be a laser turret based detection of the combat, with a power switch that would turn the roboport off during combat. (the way the "no drain laser turret based defense" I've seen somewhere).
Yea that thread is amazing.

But roboport drain is 50kW with a 100MJ buffer. That's 2000 seconds or 33.33 minutes. And they need to recharge to about 40% to activate again after they have been drained completely to 0 to deactivate them. So even by using the vanilla enemy detector, you can't rely on drain to turn roboports off. They stay on until robots use them to charge. It's a cool idea but does work in practise :(

Koub wrote: ↑
Thu Aug 27, 2020 6:38 am
I'd rather see the "every entity can be read and controlled with citcuits" suggestion be added, it would become trivial to control roboport coverage when attacks are detected on nearby structures.
That's a good suggestion though.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser

Koub
Global Moderator
Global Moderator
Posts: 7727
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Disable construction near enemies/fire

Post by Koub »

Qon wrote: ↑
Thu Aug 27, 2020 10:41 am
Koub wrote: ↑
Thu Aug 27, 2020 6:38 am
The only idea I could come with in vanilla would be a laser turret based detection of the combat, with a power switch that would turn the roboport off during combat. (the way the "no drain laser turret based defense" I've seen somewhere).
Yea that thread is amazing.

But roboport drain is 50kW with a 100MJ buffer. That's 2000 seconds or 33.33 minutes. And they need to recharge to about 40% to activate again after they have been drained completely to 0 to deactivate them. So even by using the vanilla enemy detector, you can't rely on drain to turn roboports off. They stay on until robots use them to charge. It's a cool idea but does work in practise :(
I hadn't thought of the roboport buffer, indeed.
Then I can imagine a contraption that :
- takes all repair packs out of the roboport in real time
- activates an inserter that inserts repari packs into the roboport after a x seconds timer only when activity is detected on the defense perimeter section and attacks stops.

Ah and ensure there are no repair packs elsewhere in the logistic network (so keep the logistic networks separated for each section).

That's awfully complicated, I'm aware of it, but it **could** work, couldn't it ?
Koub - Please consider English is not my native language.

Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Disable construction near enemies/fire

Post by Qon »

Koub wrote: ↑
Thu Aug 27, 2020 12:47 pm
Ah and ensure there are no repair packs elsewhere in the logistic network (so keep the logistic networks separated for each section).

That's awfully complicated, I'm aware of it, but it **could** work, couldn't it ?
Yes should work without any big problems. Like as second wave arriving as soon as you send out repair packs. But those are acceptable losses and better than having your defenses not being replaced and repaired.

This could also be used for mine replacements too, since placing them in front of a native means they get destroyed before arming.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser

netmand
Filter Inserter
Filter Inserter
Posts: 302
Joined: Wed Feb 22, 2017 1:20 am
Contact:

Re: Disable construction near enemies/fire

Post by netmand »

I find it hilarious when you lay landmines in a construction zone with a cache of landmines nearby. The construction bots replant new mines as soon as they've blown up so a large wave of enemies causes construction bots to re-lay landmines after they've been overrun. It's not a healthy environment for the poor 'lil troopers.

Currently I deal with this sort of thing in two ways:
1) I place roboports far enough away to cause a dispatch to take long enough for the defenses to absorb the attack before the construction bots arrive on the scene.
2) When I can't do that i.e. frontier/front line outposts I add construction bots to the supply list so they get restocked like ammo, oil, steam, etc. As bots die they are replaced with new ones from supply.

I can see why you'd want to be able to disable construction near enemies, especially since you can do this with your personal roboport. But instead I think it might be best to program construction bots to have a sense of self-preservation; To have them avoid enemies instead of charging blindly into them just because they have something to replace or something to repair.

mudcrabempire
Fast Inserter
Fast Inserter
Posts: 110
Joined: Sun Oct 28, 2018 2:44 pm
Contact:

Re: Disable construction near enemies/fire

Post by mudcrabempire »

netmand wrote: ↑
Thu Aug 27, 2020 3:52 pm
I can see why you'd want to be able to disable construction near enemies, especially since you can do this with your personal roboport. But instead I think it might be best to program construction bots to have a sense of self-preservation; To have them avoid enemies instead of charging blindly into them just because they have something to replace or something to repair.
Yeah, all I care about is that the robots don't die in droves. How exactly you do the mechanics I leave to the ones who have to code it. I kinda figured disabling construction would be easier on the FPS than adding self-preservation routines to robots but what do I know.

Well, I know that build/repair jobs make requests to the robot network for someone to do them (think I read it in an FFF?), so I figured a small "if chunk.being_attacked: don't send request" might do the trick. And chunk.being_attacked could be related to the event when biters are near your defenses and start to charge? I'm pretty sure there's and event there? And then just put it on a timer or something.

In all due likelihood that will cause a ridiculous chain of bugs and misbehavior that will take ages to fix :P.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Disable construction near enemies/fire

Post by ssilk »

mudcrabempire wrote: ↑
Fri Aug 28, 2020 6:14 pm
Yeah, all I care about is that the robots don't die in droves.


Maybe use the repair turret mod?
https://mods.factorio.com/mod/Repair_Turret

I really like it, because it exactly does that.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Koub
Global Moderator
Global Moderator
Posts: 7727
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Disable construction near enemies/fire

Post by Koub »

ssilk wrote: ↑
Sat Aug 29, 2020 6:55 am
mudcrabempire wrote: ↑
Fri Aug 28, 2020 6:14 pm
Yeah, all I care about is that the robots don't die in droves.


Maybe use the repair turret mod?
https://mods.factorio.com/mod/Repair_Turret

I really like it, because it exactly does that.
It doesn't seem to replace destroyed walls, used mines, and such, does it ? It seems to be a good mod, but still a workaround for something needed in the game, while impossible (like treating the symptoms instead of the root cause).
Koub - Please consider English is not my native language.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Disable construction near enemies/fire

Post by ssilk »

It needs some research, but then it works like if you beam the needed items directly out of your chests to the ghost. I really like it, because it speeds up construction quite a lot.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

User avatar
MartenM
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Jan 20, 2015 4:06 pm
Contact:

Robot repairs / builds disable on attacks - Save (construction) robots from their doomed fate!

Post by MartenM »

TL;DR
Stop robots from committing suicide. It's sad!

What?
There are multiple solutions to the problem. It mainly bowls down to being able to disable building and repairing in a given roboport area.

1:
Option one would just to have checkboxes in a roboport that can be set.
Repairs and buildings will be blocked if an area is actively being damaged/attacked.
- Could be configured in a roboport for its coverage, sometimes it needs to do the repairs in its surroundings and you wouldn't want this behaviour.
- Could be a toggle for repairs and rebuilds combined or separated.

2:
Another option could involve the circuit network:
- Allow detection of 'damage' / 'attacks' to be read from a roboport (only from the area it covers).
- Allow insertion of signals in the roboport that block repairs/building in the area it covers.

- Alternative for roboport detection: Use radars to detect enemies /biters / spitters!

This last option might just introduce a lot of boilerplate, but could maybe be extended for other uses too?

Why ?
When building a perimeter wall it's smart to set up roboports with repair packs. This helps the wall repair itself which is great.

Now obviously when the biters attack, the wall gets either damaged or broken. The construction robots are swift and rush to the scene, to then die while repairing...

Now this is not a huge issue, the robots are quickly replenished. However, it does cause a lot of 'entity has been destroyed' warnings.
Additionally, they are robots! Sure they or the roboports should be smarter?

There are ways to make this issue less prevalent, more defences, and roboports far away, but they all feel dull. They combat the symptom, not the underlying issue.

I tried searching to see if this could be achieved with mods, but the interfaces of roboports and repairs seem to lack the functionality to introduce this feature.




PS: I don't post here often, I read the guidelines and searched for topics, if I missed it be sure to let me know : )
Last edited by MartenM on Sat Jan 06, 2024 10:26 pm, edited 5 times in total.

pleegwat
Filter Inserter
Filter Inserter
Posts: 278
Joined: Fri May 19, 2017 7:31 pm
Contact:

Re: Robot repairs / builds disable on attacks - Save (construction) robots from their doomed fate!

Post by pleegwat »

Somehow I feel the solution to this should involve the circuit network.

User avatar
MartenM
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Jan 20, 2015 4:06 pm
Contact:

Re: Robot repairs / builds disable on attacks - Save (construction) robots from their doomed fate!

Post by MartenM »

pleegwat wrote: ↑
Sat Jan 06, 2024 9:36 pm
Somehow I feel the solution to this should involve the circuit network.
If it would be possible to detect 'an attack' in a given area of a roboport this could maybe be done using circuits properly. However this would mean you have to take out the repair packs from the roboport, which is a bit cumbersome too.

If it would be possible to feed roboports a certain control signal (block repairs, block building) that could maybe be a more interesting solution.
Currently roboports are read only.

Edit: Added a second suggestion that uses the circuit network.

pleegwat
Filter Inserter
Filter Inserter
Posts: 278
Joined: Fri May 19, 2017 7:31 pm
Contact:

Re: Robot repairs / builds disable on attacks - Save (construction) robots from their doomed fate!

Post by pleegwat »

I'd expect detecting (of biters) to be on the radar, not on the roboport. Probably only in the inner/permanent scan range?

User avatar
MartenM
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Jan 20, 2015 4:06 pm
Contact:

Re: Robot repairs / builds disable on attacks - Save (construction) robots from their doomed fate!

Post by MartenM »

pleegwat wrote: ↑
Sat Jan 06, 2024 10:18 pm
I'd expect detecting (of biters) to be on the radar, not on the roboport. Probably only in the inner/permanent scan range?
I hadn't thought of that. That would be an interesting solution as well!

Illiander42
Filter Inserter
Filter Inserter
Posts: 514
Joined: Mon Feb 05, 2018 10:01 am
Contact:

Re: Robot repairs / builds disable on attacks - Save (construction) robots from their doomed fate!

Post by Illiander42 »

MartenM wrote: ↑
Sat Jan 06, 2024 9:37 pm
pleegwat wrote: ↑
Sat Jan 06, 2024 9:36 pm
Somehow I feel the solution to this should involve the circuit network.
If it would be possible to detect 'an attack' in a given area of a roboport this could maybe be done using circuits properly. However this would mean you have to take out the repair packs from the roboport, which is a bit cumbersome too.
It is possible (but very, very clumbersome) to detect when turrets fire currently.

User avatar
MartenM
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Jan 20, 2015 4:06 pm
Contact:

Re: Robot repairs / builds disable on attacks - Save (construction) robots from their doomed fate!

Post by MartenM »

Illiander42 wrote: ↑
Sun Jan 07, 2024 4:01 am
MartenM wrote: ↑
Sat Jan 06, 2024 9:37 pm
pleegwat wrote: ↑
Sat Jan 06, 2024 9:36 pm
Somehow I feel the solution to this should involve the circuit network.
If it would be possible to detect 'an attack' in a given area of a roboport this could maybe be done using circuits properly. However this would mean you have to take out the repair packs from the roboport, which is a bit cumbersome too.
It is possible (but very, very clumbersome) to detect when turrets fire currently.
A lot is possible, but most solutions feel tacky and more like hacks or are just not practical at all.
Not really at the quality level of an engineer who launches a rocket.

Post Reply

Return to β€œIdeas and Suggestions”