fokidk.blogg.se

Factorio recursive blueprints
Factorio recursive blueprints







  1. FACTORIO RECURSIVE BLUEPRINTS HOW TO
  2. FACTORIO RECURSIVE BLUEPRINTS PORTABLE

Chances are you can do it in Python with Draftsman, regardless of what Factorio-related thing you’re actually doing. Written in Python, this makes it exceptionally easy to install, simple to use, and gives the user access to the entirety of Python’s vast packaging index. If you can do it in-game, you can do it with Draftsman, allowing you to focus on the one problem you’re actually trying to solve. All types of entities are supported, from splitters to stack inserters. Draftsman attempts to solve all of the shortcomings of existing Factorio blueprint implementations: The package allows you to create and design blueprints programmatically, to aid in the development of tedious and repetitive blueprints that would be untenable to create by hand, much like the problem I ran into described above. I went through dozens of different combinations of tile orders before settling on this one.ĭraftsman is a Python module for creating, modifying, importing, and exporting all manner of Factorio blueprint strings. It used a template system and it took less than a week to completely finish. I made a prototype script in an afternoon that did exactly what I needed and it worked perfectly. I was going to have to follow in the footsteps of all before me, and develop my own implementation from scratch.

FACTORIO RECURSIVE BLUEPRINTS HOW TO

  • Documentation for a lot of these modules was sparse and sporadic, which turns off users like me who want to know what the module is capable of before investing any time into learning how to use it.įundamentally unsatisfied with the options, I resigned myself to my fate.
  • Many of them were written for versions of Factorio that are now severely out of date.
  • This meant that each one had to write their own implementations for the same operations, instead of just having someone write the implementation they need and making it available to others.
  • They lacked a unified language many were written in Lua, some in Python, another in JavaScript, one in C++, etc.
  • FACTORIO RECURSIVE BLUEPRINTS PORTABLE

  • Many implementations were highly specific to the domain they were written for a combinator computer compiler script was not going to be portable for many other purposes than compiling code for a specific combinator computer.
  • factorio recursive blueprints

    Something troubled me about the solutions that were available though: They all had problems! With all these examples, I was hoping that I could find some similarities with one of them and use that as a baseline for my solution to avoid “retreading” the same ground. Even a cursory search will turn up numerous examples of this used in practice: factorio-blueprint NPM module by demipixel, justarandomgeek’s compiler for his massive combinator computer, a generic combinator instruction language by Jobarion, image-to-blueprint converters, etc. Factorio’s blueprint string import function can take any correctly formatted string all I had to do was create this text string to my specification with the data I wanted and I could just paste it where needed. It can stomach this task far better than I ever could, and can do it way faster as well. The solution? Get a computer to do it for me. Needless to say, it was going to be painful to set tens of values, let alone hundreds, or the thousands the machine was capable of storing. I now had to split, bitwise AND, bitwise right-shift, and populate not one signal, but two, in two different specific locations, making sure that they both had the correct value and signal type. ROMs are normally tedious to create, manually encoding each signal you want by hand, one at a time, but this design was even more involved. The ROM is very dense, but it functions on a system where each value is split into and stored as two 16-bit numbers, which are then recombined on output. That’s no problem, though: We just create a scrap world, switch to the editor and start playing around! The only trouble was that I had actually never used combinators before, and I was planning on using them for the actual decision-making. I already had an outline of the logic, and how the factory would keep track of itself, as well as lofty ideas on impressive things that I could make it do. After seeing a number of impressive examples, I was inspired to have a go at the problem. Motivations, technical details, and a few fun projects realized with it - all that, and more, this week! Draftsman redruin1Ī couple months ago, I decided that I wanted to try my hand at making a self-expanding factory in Factorio.

    factorio recursive blueprints

    Sure, there have been other projects trying to build a library for generating blueprints for the game, but this one tries to be the new gold standard. To that end, redruin1 presents his newest invention: Factorio Draftsman.

    factorio recursive blueprints

    For this week’s issue of Alt-F4, we return to the roots of being a spiritual successor to the FFF by going deep on a technical topic.









    Factorio recursive blueprints