Skip to content

Autocrafter rewrite#206

Open
OgelGames wants to merge 10 commits into
masterfrom
autocrafter_rewrite
Open

Autocrafter rewrite#206
OgelGames wants to merge 10 commits into
masterfrom
autocrafter_rewrite

Conversation

@OgelGames

@OgelGames OgelGames commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

It's been a while since I last did a big rewrite, and like the others, this has been a long time coming.

Here's the big list of changes and new features (most of them at least), in no particular order:

  • Crafting now uses actual items from the inventory and calls on_craft callbacks, this does reduce performance slightly but fixes many crafting issues.
  • Setting a recipe by the output item now works correctly, and tries to select the best recipe available.
  • Added an option to keep non-consumables (items replaced with themselves) or all items (for digilines-controlled crafting), with a button to switch.
  • There are now more checks for what items will be accepted from tubes, and space will be reserved for missing ingredients (and outputs when keeping them).
  • Groups are handled better, and are shown in the recipe grid with "G" on the item.
  • Recipe and output lists can now have items shift-clicked out.
  • Catch-up is now limited to reduce lag spikes when an autocrafter has been unloaded for a long time.
  • Digilines-initiated crafting now uses a queue instead of crafting instantly, with a message sent back when crafting is finished.
  • Digilines support has been expanded with more features (including setting the recipe with the output item), and now supports the command = "action" message format.
  • The crafting time (and the new catch-up limit) can now be adjusted with a setting.
  • The autocrafter upgrade function is now run once by an LBM, instead of being repeatedly called before various actions.

TODO:

Closes #63, fixes #67, closes #80, closes #133, fixes #162, closes #171, closes #189, fixes pandorabox-io/pandorabox.io#479 (finally), fixes pandorabox-io/pandorabox.io#872, closes pandorabox-io/in-game#164.
I think this might be a record for the most issues closed by one PR 👀

Pings for the people who might be interested: @SwissalpS @S-S-X @fluxionary @MCLV-pandorabox

@OgelGames OgelGames added enhancement New feature or request bugfix fixes a bug cleanup code and other cleanups labels Jun 24, 2026
@SwissalpS

Copy link
Copy Markdown
Contributor

I wish the new output redirection's default was what it was historically: output all items.

@OgelGames

OgelGames commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

I chose to make keeping the replacements the default because that's what happens when you manually craft something, so it's the more intuitive behavior.

Also, only unchanged replacements are kept, so items that are replaced with different items (empty buckets, bottles, etc) are still sent to the output.

@SwissalpS

Copy link
Copy Markdown
Contributor

Some observations:

  • manually setting recipe to e.g. 1 trunk and 8 leaves now no longer allows any group:tree and group:leaves. Only the exact same items as in recipe are used :(
  • using digiline setting recipe to group:tree and 8 group:leaves works however :D
  • using digiline to set { { "dye:blue", "wool:white" } } is ignored :(
  • using digiline to set { { "dye:blue", "group:wool" } } is also ignored :(

@OgelGames

Copy link
Copy Markdown
Contributor Author
  • manually setting recipe to e.g. 1 trunk and 8 leaves now no longer allows any group:tree and group:leaves. Only the exact same items as in recipe are used :(

Yes, this is how it should be, the behavior before was wrong IMO. Also, recipes using groups are preferred when setting the recipe by the output, so it should be possible to manually set those same recipes.

  • using digiline to set { { "dye:blue", "wool:white" } } is ignored :(
  • using digiline to set { { "dye:blue", "group:wool" } } is also ignored :(

They were also ignored before, so nothing has changed. Now however, you can use {command = "set", input = {"dye:blue", "wool:white"}} to set the recipe without having to specify empty slots.

@SwissalpS

SwissalpS commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Why doesn't sending the recipe the legacy way just redirect to the new command = 'set', input = recipe way?

Using the set & input way, even { 'group:dye', 'group:wool' } works, thanks.

Also, recipes using groups are preferred when setting the recipe by the output, so it should be possible to manually set those same recipes.

That is incorrect as I mentioned in my previous comment. oh, the output, but then it just chooses one recipe for the player. e.g. putting mulch on output sets the tree & leaves group recipe, the one based on group:seed can't be used manually.

@OgelGames

Copy link
Copy Markdown
Contributor Author

Why doesn't sending the recipe the legacy way just redirect to the new command = 'set', input = recipe way?

It does, but you need to format it correctly, including empty tables: { {"dye:blue", "wool:white"}, {}, {} }

but then it just chooses one recipe for the player. e.g. putting mulch on output sets the tree & leaves group recipe, the one based on group:seed can't be used manually

Yeah, items with multiple recipes are a limitation, technic LV battery boxes is another one that comes to mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment