Page 1 of 1

Combined 'small' objects for faster building with robots?

Posted: Thu Mar 14, 2019 9:29 am
by mrudat
I was thinking about how to make construction robots work faster than they currently do when placing fiddly small things, like filling in a lake with landfill, or building the great wall around your factory, or even placing the trans-factorio belt line.

A construction robot is entirely capable of building an entity that requires n of the same item (up to stack size; past stack size, it will still build, but won't consume all of the items). Vanilla curved rail segments consume 5 rail segments, and is the only vanilla example that I'm aware of.

Have a script that watches for construction/destruction orders, and have it replace the individual entities with a giant rectangular entity that when placed/removed, is then replaced with the entities you intended to build. This would require production possibly hundreds of intermediate entities, but since they can't be built directly, there should be no visible change to players.

It would both allow a construction robot (with a stack size of 10, lets say) to place 10 wall segments at once, without also having a single wall segment with (relatively speaking) stupidly high hit points, that just happens to be 10m long.

I think something like the following might work:

watch for construction/deconstruction orders; flag that chunk for further consideration.

for each chunk that's been flagged (might occur over multiple ticks), attempt to figure out the smallest number of big entities that will complete the orders (limited by stack size and cargo capacity of the construction robots).

some time later, after the group entity has been built, replace it with the component entities.

With the correct definition, you don't need to do anything for deconstruction as you can return a stack of any one item when an entity is mined.

Edit: tyop

Re: Combined 'small' objects for faster building with robots?

Posted: Sat Mar 23, 2019 2:38 pm
by L0771
I like this idea, i have some ideas, but my english is limited to translator, can you explain me more on discord?
https://discord.gg/6VVxuVH

Thanks

EDIT:
Something like this?
Image

Image

EDIT2:
https://mods.factorio.com/mod/Cursed-BCR

Re: Combined 'small' objects for faster building with robots?

Posted: Sun Apr 28, 2019 2:15 am
by mrudat
That's just what I was looking for, even if the mechanism is nowhere near as complicated as what I first suggested.