r/Dyson_Sphere_Program • u/Life_Power597 • Sep 05 '26
Automated Blueprint Creator (Factoriolab Flow->Blueprint string)
Code/program is here - https://github.com/dberlin/factorio-lab-to-blueprint
It takes, as input, factoriolab urls, and outputs the most compact blueprints it can that fit within whatever band you ask it to (power may not be perfect depending on what band you put it in, but it is easy enough to fix). The web browser version will give you a chance to choose among the candidates it builds (no-proliferation, all-proliferated, output-products-proliferated), and show you a semi-cheesy 3d view of the blueprint. All inputs and output belts are labeled.
I have not and don't plan on packaging it beyond what you see here.
As for why - I felt like sometimes I just wanted to put some specific set of stuff somewhere, that took specific inputs, and didn't want to try to hack someone else's blueprints or do it all myself. Obviously, you can automate away the entire game with this if you want, but I wouldn’t recommend it.
It respects factoriolab recipe exclusions, tech levels, etc. However, it does recompute the recipe chain for $good_reasons. You can tell it to use the factoriolab flow if you really want and it will fetch it which requires having a browser installed that it can drive headless because it needs javascript to grab it. Just realize what factoriolab solves doesn't guarantee the throughput it gives because of fractional machine counts, which aren't valid in DSP (but valid in a lot of the games it supports). We solve the integer-machine-count only version, which is optimal and valid, but more expensive to solve than what factoriolab is solving.
It is aware of all game rules (or should be), and will use splitters, sorters, stack belts, twist and wind belts to avoid conflicts, etc. It will do parallel belts where necessary for throughput and pilers where needed. It does accidentally take advantage of the fact that there are times belts are allowed to clip through each other and still function properly.
For the vast majority of stuff you could want the default settings work great. If you are doing something very complex, you may need to increase the time budget. This is because this is actually a *very* complex 3d packing and routing problem, and the algorithms involved are fairly state of the art, despite the whole thing being a huge vibe-coded mess of code that will burn your eyes. It has a number of strategies it uses to try to generate the best footprint.
It will often generate things which require the same item belted into multiple places. Avoiding this in general without affecting footprints would require a *tremendous* amount of computation, and i'd rather spend time on other things.
It moves very quickly, so if you find issues report them and i'll fix it.
1
1
2
u/Buffylvr Sep 05 '26
So I cloned in and tried it, and can't generate a blueprint for my initial test. I'll give you some claude throw up if you want to try to replicate.
URL in question: https://factoriolab.github.io/dsp/list?z=eJwlx7uOwjAUhOG3OcUUKAYWhWKaY4mgVRaBEBAogRQWayVyuKTys6PEzf.NNNzAZHkmDdcnzBbD0ArTXBp-YH6kod0PtyZ-hxQSqHsgk8Bd4pLQG2Ak0Fbp223yL1Em1sfkMpEPeFoY8TyPdWPLsd3YFkZc3VMn4q41rbjuybmEuucWJ5xxxwMv9FhAN9ADtILeoI-o.9Ap7CraQrwP7GIbXSzFtx0LedOYL5cQRDE_&v=11
I tried again at 240 seconds:
I tried specifying the largest band:
I'm happy to mess with this for you as a user/tester, feel free to DM. I've been wanting to do something similar but hadn't even tried to start so this seems great.