Quantum Fabricator

by Tename

Makes construction bots and malls mostly obsolete by automatically crafting and building ghosts for you. Will handle most things construction bots are doing, like deconstruction, upgrades, placing/removing tiles, inserting modules and repairs.

Utilities
3 days ago
2.0
1.99K
Logistics Circuit network Manufacturing Storage Blueprints Cheats
Owner:
Tename
Source:
https://github.com/refulgence/quantum...
Homepage:
N/A
License:
MIT
Created:
a month ago
Latest Version:
2.5.1 (3 days ago)
Factorio version:
2.0
Downloaded by:
1.99K users

"Do you even know what the word 'quantum' means?"

"It's like a sci-fi synonym for magic, right?"

"Exactly!"

Quantum Fabricator


As the short description says, this mod basically replaces both construction bots and malls - it will craft, build and deconstruct things (if you can afford the material costs). To aid with storing various building materials it will also provide a "cloud" storage function. And to tie it all together there is a nice GUI that shows things like currently craftable buildings and how much stuff is stored.

Overall the mod removes some of the biggest annoyances I have with the game. It's so powerful it can be considered cheating, but it makes you pay for building materials so I say it's okay enough for now. Additional costs might get introduced later.

Now for a overly long description of the mod's features:


The Constructor

Pretty much everything construction bots do, but usually better:
- Construction. All placed ghosts will be automatically built at a rate of 180 entities per second. Of course you'll still need to supply the materials.
- Deconstruction. All entities marked for deconstruction will be automatically destroyed at a rate of 180 entities per second. This includes things like trees, rocks and cliffs, which will be destroyed instantly. You'll get all items you'd expect to get. Cliff demolition will obviously require cliff explosives.
- Upgrade. All entities marked for upgrades will be automatically upgraded at a rate of 180 entities per second. And you got it: you'll need to provide the materials and you'll get the old buildings back.
- Item requests. If items are available and the building is asking for them (for example, modules), they will be inserted at a rate of about ~13 entities per second. This one cannot track newly created requests, read more at the bottom.
- Repair. Not during the combat, but few seconds after your entities stop taking damage (this means all entities on all surfaces) it will repair all buildings that were damaged. Naturally it will consume repair packs at about the same rate as bots (but slightly smaller).
- Reconstruction. Destroyed buildings will be automatically rebuilt after combat is over. This function requires destroyed entities leaving ghosts after death (in vanilla it's unlocked after researching construction bots, that's your reason to research it).
- Tile placement and deconstruction. Tile placing logic is slightly different, read more at the bottom.


The Fabricator

It handles crafting and decrafting of buildable items that are requested by the Constructor. I repeat, only buildings will get crafted/decrafted. Circuits, gears, pipes, etc you'll need to make by yourself.
- All buildings requested by the Constructor will be automatically and instantly crafted. Of course you'll still need to supply the materials.
- All deconstructed buildings will be automatically and instantly decrafted, refunding their full cost in materials.
- If multiple recipes for an item are available (vanilla example - pipes can be crafted either from plates or from molten iron), then the recipe will be chosen according to a hidden priority that should theoretically choose the most "basic" recipe. You can override the priority via GUI -> Preferences or even outright blacklist the recipe.

What it cannot do:
- It will not craft/decraft items that aren't buildings. I’ll stress it once more - all intermediates you'll need to craft normally, the Fabricator will only craft final buildings. Tiles won't be crafted either, since they aren't buildings. Tiles are a special case in general.


The Storage

A near bottomless additional storage for items required / provided by the Constructor and the Fabricator.
Note that this isn't a regular infinite storage. It exists mainly for the Constructor and the Fabricator, meaning while it's really easy to put items there, it's not that fast and easy to get them back.
- All items requested by the Constructor and the Fabricator will be first checked in the Storage and then in the inventory of a player who placed the order.
- Deconstruction: all buildings, building ingredients and modules will go directly to the Storage, everything else (such as ammo, fuel, ingredients for intermediaries...) will first attempt to get inserted in the inventory of a player who placed the order, and if it's full it will get sent in the Storage.
- All items can be freely removed from the Storage via it GUI at a rate of 1 stack per click. To remove items automatically you'll need to build one of new buildings.

Currently the Storage doesn't simulate spoilables, they'll be fresh forever. I might implement this feature later.


New buildings

The mod provides two new buildings to help interacting with the Storage. Used to be three, but then 2.0 removed set_signal and the alternative is slow, so yeah, you won't get to have the contents of your storage as circuit signals anymore. (but if someone knows a way to implement it in a non-laggy way I'll be happy to add it)

Digitizing chest
  • Unlocked at logistic science.
  • All items and fluids placed inside will be sent to the Storage.
  • You can limit the intake by sending L signal to a chest via circuits, the value of the signal will determine the stopping point. Alternatively, you can use it GUI.
Dedigitizing reactor
  • Unlocked at chem science.
  • It can bring items and fluids from the Storage to the real world for a small price of many nuclear fuel cells.
  • Transfer rate is 4 items / 80 liquid per second. Can transfer both at the same time, which will double the costs. (Rates can be adjusted via map settings)
  • It won't work until heated to 5000 degrees. It will also passively cool down by 4 degrees per second and even faster while working. Like regular vanilla reactors it will get neightbour bonuses to heat production.
  • It's controlled by circuit signals: send item, fluid and optional quality signals (value doesn't matter) to bring these items back. Alternatively, you can use GUI.
  • It can also bring items from other surfaces, just send S signal with id of the surface you want to access (id of a given surface is shown in the Storage GUI title). For the balance reasons cross-surface dedigitization is 5 times more expensive and 2 times slower.
  • If Space Age is enabled it's moved behind Aquilo tech. Let's not trivialize interplanetary logistics.

GUI

The Fabricator GUI (the left side on the picture)

  • It shows all buildings it can craft, how many are craftable and their total cost, highlighting ingredients you are missing or close to running out of.
  • If Quality is enabled, you’ll be able to choose the quality of an item to place.
  • It's so big because it was designed for overhaul mods.
  • It also tells you the name of a planet you are currently on (in case you forget)

The Storage GUI (the right side on the picture)

  • It's togglable by an icon in the top right of the Fabricator GUI which is useful because late game it might impact performance.
  • It lists all available items in alphabetical order.
  • NOTE: since 2.4.0 there is no more tab groups in the Storage GUI.

The hotkey to open GUI is bound to V by default, which !conflicts! with vanilla hotkey for vertical mirroring. Change one or the other.

(if you want a taste of how the tooltips would look with PyAE recipes, here it is)


How it works with Space Age

Quality:

  • The Fabricator will craft buildings of desired quality if all ingredients of that quality are available (except fluids because fluids do not have quality). It will also decraft quality items into components of that quality.

Planets:

  • Each surface/planet has it own Storage inventory.
  • Only players physically present on the same surface with the Storage have their inventories considered for it.

Space Platforms:

  • Space Platforms do not have their own Storage. Instead they use Storage of the planet below (or none while traveling).
  • And by "use" I mean "not use", because Space Platforms do not actually use Storage. Instead, requested items (including the ones from "Auto request missing construction materials") will be instantly fabricated and magically transported to the hub inventory from the Storage.
  • The cost of said "magic" will have to be paid in rocket parts equal to the number of rocket parts it would actually take to transport them via conventional rockets.
  • Productivity bonuses of a rocket silo will apply. Which silo? Probably the most top left one.
  • No transfer would take place if the surface doesn't have a rocket silo present.

Everything else works the same way it works in vanilla.

Note that you can disable this behavior in settings if you think it breaks the game too much.


How it works in Multiplayer

No idea. It was not tested in multiplayer. It should theoretically work, but if I had a penny for every time my code that "should theoretically work" didn't actually worked...


The Issue of Item Requests

  • Copypasting/blueprinting buildings will just work, all available modules will be inserted and unfulfilled requests will be tracked.
  • Making new item requests by dropping module ghosts in module slots or using upgrade planner to do that will NOT just work. Either turn on a setting (found in GUI -> Preferences) to automatically search for new item requests (a bit taxing on the performance, but not by much) or update them manually with either a button in GUI -> Preferences or with a /qf_update_module_requests console command.

Tile placing logic

  • Only normal quality tile items are considered. Tiles don't have quality anyway, they all become normal once placed.
  • Overwriting mineable tiles with the new ones will NOT return tile items that got replaced. Deconstruct the old tiles first if you want them back. It's a bit annoying, but that's how it works.

Everything else works the same.

The issue of recipe status updates

  • Normally the recipes available in the Fabricator GUI are updated whenever you finish a research. But some mods may sneakily enable/disable recipes at seemingly random times and my mod cannot detect it by itself.
  • So, if you get a feeling that the Fabricator GUI isn't showing recipes for buildings you know you should have access to, you need to open the Fabricator GUI, click on a Preferences icon and push a button saying something about updating recipes. Alternatively you can just wait until your next research finishes and everything will be updated.

Known issues that may or may not get fixed:

  • It's possible to fabricate a building of any quality if it only ingredients are fluids (for example, pipes).
  • Things that are too heavy for rockets cannot be transferred to Space Platforms because the game doesn't let you select them in logistic filters.
  • Copypasting Digitizing chests and Dedigitizer reactors doesn't copy their settings (namely, intake limit / filters).
Issues that definitely won't get fixed:
  • Some entities that depend on other entities won't be built at 180/s rate. For example - elevated rails.
  • The Constructor thinks that all buildings require exactly 1 item to build, and so it will construct them out of exactly 1 item. This makes building curved rails slightly cheaper.
  • The Constructor thinks that each cliff segment requires an individual cliff explosive and so it will spend exactly 1 cliff explosive on each cliff segment. This makes destroying cliffs a lot more expensive than with bots or manually.
  • (Multiplayer only) Because of how it's implemented, ALL currently ongoing construction/deconstruction/upgrade orders will be attributed to the most recent player who placed ANY construction/deconstruction/upgrade order respectively. For example, if Player A orders deconstruction of a huge factory, and then Player B orders deconstruction of a few buildings while Player A's deconstruction is still in progress, then it will be Player B who gets all items that wouldn't be normally put in the Storage from both their owns and Player A’s deconstruction orders. It shouldn't matter most of the time.