Recursive Blueprints

by DaveMcW

Automate blueprints to build a self-expanding factory.

Content
11 months ago
0.13 - 1.1
26.4K
Blueprints

i Scanning for unloaded chunks

2 years ago

Hey,

I really love playing with your mod. Automating the automation is a lot of fun :-)

I am currently working on a self expanding factory and noticed that when it expands faster than the chunks explored by radars do, some blueprints get deployed in areas that are not explored yet. Or rather they are not deployed, as placing the blueprints does not create the chunks.

My suggestion would be that the resource scanner also returns a number of "missing" chunks in the scanned region (maybe as "black" signal or as negative radars or something like that), so my factory could make this a pause condition and check again a bit later if the region was explored by now.

Also, aside of that main suggestion scanning for own buildings or ghosts would be a nice-to-have too, but I don't know how complicated it would be to implement that.

Best regards and keep up the good work!

2 years ago

Good idea, version 1.2.4 now scans for uncharted chunks.

In theory, you should be able to design your factory so that it never collides with its own buildings. But I can see how it would be useful for a sub-factory to detect buildings. What kind of output would you like if buildings/ghosts are detected?

2 years ago

Works like a charm, thank you :)

Yes, in theory I am able to do so, but there are situations where it makes things just a lot easier when I can scan for buildings. For a self-expanding / wandering defense lines for example I could use the signals to check which part is already built and deconstructed, without relying on item numbers in the logistics network.

I am not sure about what output signals would be ideal, to be honest. A simple solution would be to just have all static Entities and Ghosts on signals E and G or on custom signals like LTN uses.
A very flexible solution would be to have them split by type on the red and green output signal (so for example miners on the red signal are built miners and on green are ghost miners). This would complicate questions like "Are there any ghosts" though, since just adding everything with one combinator would also include the resources. And this would also be confusing as to why the two signals are different.
The next best solution I came up with would be dedicated Entity- and Ghost-scanners aside of the Resource scanner, but I can see this blowing up the mod for something that is rarely ever used.

So, after all these considerations, I think the first, simple solution would be most fitting with what the mod currently is and support the normal use case the best.

Best regards! :)

2 years ago

Hey, I gave it another thought;
I think the scanning for ghosts will almost exclusively be used for checking if a deployed blueprint finished. So I would suggest the blueprint deployer having a little toggle (just like inserters etc. have), that allows a little feedback whenever a blueprint is deployed. This feedback would be the number of ghosts placed (green) and the number of ghosts that could not be placed because something was in the way (red). Update and deconstruction planners would give the number of updated and deconstructed entities as green. To check if a given blueprint finished, it would just have to be deployed again in a loop.
Also, with the ghosts moved to the deployer, I think the scanner could really return a signal by non-ghost entity type, as it would not have to be split on red / green signal for ghost / non-ghost anymore, as I suggested earlier.

Best regards!

New response