Archean

Archean

31 ratings
Automatic Crafter
7
   
Award
Favorite
Favorited
Unfavorite
Blueprint: Machine, Computer
File Size
Posted
Updated
393.342 KB
Jun 30, 2024 @ 5:29am
Oct 5, 2024 @ 3:10am
13 Change Notes ( view )

Subscribe to download
Automatic Crafter

Description
Automatically crafts an item, and any items required to build it.

You can queue multiple items by pressing again, or using the x10 or x100 buttons.

Setup
Press V on the crafter and container you've already built.
- Set the name of the Crafter to "crafter" (all lower case)
- Set the name of the Container to "container" (all lower case)
- Name any connected gas tanks "tank_O2", "tank_H2", "tank_H2O", or just "tank_1"
- Connect data lines from this computer to the crafter, container and tanks

- Connect the container to both the input and output of the crafter. That way the crafter it can pull resources and store the crafted items in the container. (Use both outputs on the container or a correctly configured junction)

If you don't have separate O2 and H2 tanks, the code assumes the tank is filled with 50/50 of each.
(If you have any gas in the O2/H2-named tanks, any tank without O2/H2 in the name is ignored)

These names of the containers and tanks can be changed in the code:

var $inventories = ".a{container}.b{tank_O2}.c{tank_H2}" ;if you want, add for example .d{tankO2_2).e{tankH2_2}


UI
- You can click on any ingredient item to go to that item's crafting page.
- If an ingredient in a craft is green, you have all you need to make a single item.
- Blue indicates that the ingredient will be added to the queue. It's still possible that you won't have all the mined resources you need to complete it.
- Red indicates a mined resource that's too low to complete the craft. Add some more to the container.

-The Stop button cancels the current craft, and any queued items.

-The Queue View button shows the current items in the queue. This will be updated with more needed items as the craft progresses.

Automatic queue, maintain item level
If you add an item to the Favorites list. you can set the item to automatically craft more items until it reaches your specified level.
The auto queue is checked and orders items periodically when no other items are in the queue.
If you reset or reduce the auto level of an item, whatever is currently in the crafting queue is unaffected, so clear that manually if needed.

Sleep mode and power saving
The computer will go to sleep if it hasn't been used for 5 minutes. To wake it, just click the screen.
The time before sleep engages can be set in the "Settings & sleep" menu.

If you do a lot of auto/maintain crafting, set this to 15 or 30 minutes in order to allow all your auto crafts to top up your container after use, or disable sleep mode entirely.

If you connect a power relay named "crafter_relay" to the Crafter's High Voltage line, and connect the data cable to the computer, sleep mode will also turn off the Crafter to save power, and improve performance on the server.

While the computer is in sleep mode, it still draws power, but will do virtually no processing.

Errors
It's normal for a brief flashing "Error" message during a craft, as the missing ingredients get back filled.
If the error remains, it's likely that some mined resource is missing.

Re-use in other workshop items is OK
If you want to incorporate this into your own workshop items, please do. No need to ask for permission.
(If you build something cool, or improve upon it, feel free to tell me)

Source code
If you want the code, but don't want to spawn the blueprint, the repo is here:
https://github.com/archean-cookbook/snjo-automatic-crafter
34 Comments
PJOTER Dec 30, 2025 @ 2:59pm 
Hi.

I wanted to extend it to use multiple inventory containers.

in crafter.main.xc I replaced
else
$items = input_text($n,0)

with
else
var $invItems = input_text($n,0)
foreach $invItems ($item,$amount)
$items.$item += $amount


now I can add more containers here
var $inventories = ".a{container}.b{tank_O2}.c{tank_H2}.d{tank_H2O}.e{tank_1}.f{iron}"

I think many people will want to have this functionality, so maybe consider adding this to your crafter ;)
Chip Patton Dec 7, 2025 @ 3:20pm 
Sent a friend request over.
Snjo  [author] Dec 4, 2025 @ 2:32am 
@chip patton
You can send me the code if you're on the Discord, I'll take a look at it.
Chip Patton Dec 3, 2025 @ 7:20pm 
also @snjo, I can give you a code snippet if you want for the first point I mentioned below because I have already done this on my builds but it's an add-on to your code (so I didn't have to keep editing code every update he he he).
Chip Patton Dec 3, 2025 @ 7:18pm 
@snjo, I have a few suggestions that would take this to the next level if you're not sunsetting this already:
- Have an option that allows items to be moved from a parts container to a "finished product" container. Simply put, there are so many parts now since you made this, you need to split up the final products and ores and such or things just get clogged up.
- When something is out, it doesn't tell you what components (or how many) are missing (after you hit "craft"), it should do that. If it says error at the bottom, maybe give a button to click to read an actual error message that is pretty clear what needs to be done.
- (troll alert) support "crafter" "crafter2" and "crafter3" to increase speed :) This is a big ask, I know :P
wf13 Jun 6, 2025 @ 2:07pm 
Can you add a router to connect more devices?
ManaWei May 23, 2025 @ 2:44am 
This computer, very smart <3 absolutely love it - This is my AutoCrafting Station that I made: https://steamcommunity.com/sharedfiles/filedetails/?id=3486163516
Hope you like it, I'm kinda new at this.
Snjo  [author] May 10, 2025 @ 12:41am 
@archifoxer Reboot the crafting computer to update any bad recipes, and check that you don't have any auto-crafts set up for plastic. I was able to craft a linear track just now. If you have a reproducible bug, contact me on the discord channel.
ArchieFoxer May 7, 2025 @ 12:20pm 
Somehow the new LinearTrack component is uncraftable.
It's in the list, but the auto crafter refuses to craft the seperate parts needed.

Also since a while it often has a problem when trying to craft huge amounts of items, for example when trying to craft 5000 composite blocks it wants to craft way more plastic than needed.
Once we accidently filled a whole container with capacitators because we tried to craft 50 batteries.

Otherwise it's a really useful tool, thanks for creating it!
trucksarenoisy Apr 26, 2025 @ 9:38am 
by "it works just fine" i mean that after i made line 1 clear it worked as usual, i don't really know why it errored