Personal Autocraft

by Gefion

Experimental. Hand-crafts the builds in your [Auto] logistics section. A fork of MengLei's Section Autocraft. Source will be posted next week.

Utilities
a day ago
2.1
30

Changelog

Version: 1.2.1
Date: 2026-11-11
  Bugfixes:
    - Autocraft no longer treats scrap-recycling as a way to make stone (or its other chance products). A Landfill request that is short of stone no longer asks for scrap: the leftover stone stays a stone request. The scrap item and the scrap-recycling recipe are not used in planning.
    - A build that needs a part only a machine can make (processing units, engine units, concrete and so on) is no longer blocked with "cannot be crafted by hand" when you carry some of it but the logistics network you are in doesn't have enough for the whole build. The build now waits instead and shows in the "[Autocraft] N build(s) waiting" alert: "paused until this logistics network has enough of the parts that can't be crafted by hand: ... Other builds go on meanwhile." The other builds go on, and it resumes by itself once the network, what you carry and what is on the way cover the rest.
    - The waiting alert names every short part (up to four, then "and N more") with how many more are needed and how many are in the network or on the way. Before, only one part was named, and which one could change from check to check.
    - A waiting or blocked build keeps the materials it already carries on the missing-materials list. Before, its list was dropped and "Trash unrequested" sent what it had fetched to the trash (for example 200 electric engine units and 800 steel plates for rocket silos). This also applies to a build blocked by a surface condition, an unresearched recipe or a part that can't be hand-crafted after it has started.
  Changes:
    - The log (when on) notes the logistics network id and every short part when a build starts waiting.
Version: 1.2.0
Date: 2026-11-01
  Major Features:
    - First public release, as a new mod: Personal Autocraft (internal name personal-autocraft). It is a fork of Section Autocraft by MengLei (https://mods.factorio.com/mod/section-autocraft), built on MengLei's 1.1.0 and the unofficial patches 1.1.1 to 1.1.8 listed below. It is not released or endorsed by MengLei; please don't report problems with this fork to the original author.
  Changes:
    - Renamed: title "Personal Autocraft", internal name personal-autocraft, version 1.2.0. The log file is now script-output/personal-autocraft.log and log lines in factorio-current.log start with [personal-autocraft].
    - Settings, the shortcut, the wrench signal and the [Auto] section tag keep their names, so your setting values and section names carry over.
    - The map setting "Log file detail" now defaults to Off (it was Info): no log file is written until you choose Info or Debug. A save or settings file that already has a value is expected to keep it.
    - Marked incompatible with section-autocraft: both use the same setting, shortcut and signal names, so only one of them can be enabled.
  Graphics:
    - New thumbnail.
  Info:
    - Experimental, limited testing: earlier versions were tested in game by one player, and the latest changes (1.1.8) so far only in an offline simulation. Back up your save before trying it.
    - No gameplay changes from 1.1.8.
    - Upgrade note from section-autocraft: let running builds finish, then disable section-autocraft and enable Personal Autocraft. The game treats it as a new mod: its saved progress (builds under way, alerts) starts fresh; your [Auto] section, its rows and your settings stay.
    - Thanks to MengLei, the author of Section Autocraft, and to BAYUNZIYUE, who helped work out its logic and test it.
    - LICENSE: MIT, Copyright (c) 2025 MengLeiFudge and Copyright (c) 2026 Gefion; a fork notice is added at the top.
Version: 1.1.8
Date: 2026-11-01
  Changes:
    - (Unofficial patch) Rounds are half the size they were: the size is still the smallest of what is owed, the 10000 cap and what fits (what you carry can make now + free slots + on the way), then halved and rounded up, at least 1 and never more than is left to make. The first round (the head start with what you carry) is not halved. (#45)
    - (Unofficial patch) New wrench alert "[Autocraft] N build(s) waiting" for every build that is waiting for materials, robots, your own requests or room, with each reason on mouseover in the same wording the chat messages used. It stays while a round crafts and the rest is still to come, and clears about 10 seconds after the last wait ends. (#42)
    - (Unofficial patch) Problems shown in the wrench alert are no longer also printed in chat. Chat messages remain only for things no alert covers (deleting the missing-materials list). The flying text now says "Hover over the wrench alert for the reason." (#43)
    - (Unofficial patch) More detail in script-output/section-autocraft.log at the Info level: each list change with every item's min and max and the fit check (empty slots, own incoming, buffer, what was cut), the reason each time the list is removed, the round size with its parts, a snapshot of the lead build when it changes (at least every 5 seconds), your trash slots and "Trash unrequested", your own requests' min and max, which materials are fetched or hand-crafted and when that changes, and the crafting queue at each round start. The log is written out at each of these state changes. (#40)
  Bugfixes:
    - (Unofficial patch) A recipe that can't be crafted on the surface you are on (Space Age surface conditions, for example a lightning rod away from Fulgora) is detected before the build starts instead of failing with an unknown reason. The reason names the condition, the value it needs and the value where you are; only that build pauses and stays queued, and the reason is shown in the wrench alert. If the game refuses to start a round for another reason, only that build waits and is tried again after about 10 seconds. (#44)
    - (Unofficial patch) The fit check for the missing-materials list keeps the 5-slot buffer free: it shares out the free slots less your own incoming requests and 5 slots, so builds no longer fill the inventory and pause full. (#45)
    - (Unofficial patch) "Not enough room for this batch: free up N inventory slots." counts N for the halved round, leaves out the slots your own requests will refill, and never grows within a round: freeing slots can only bring it down. While the list is cut to fit, the build crafts what you carry instead of being reported as stalled, and the "Inventory is filling up" forecast is not shown for it. (#45)
  Info:
    - LICENSE unchanged: MIT, Copyright (c) 2025 MengLeiFudge and Copyright (c) 2026 Gefion (modifications from version 1.1.1 onward).
    - Smaller rounds mean more of them; with a small inventory a build can take longer than in 1.1.7.
    - Upgrade note: no settings changed. A build already under way keeps its 1.1.7 round size until it finishes; new builds use the halved size.
    - Checked in an offline simulation only; not tested in game yet.
Version: 1.1.7
Date: 2026-10-31
  Changes:
    - (Unofficial patch) Builds are crafted in equal rounds. The first round is a head start with whatever what you carry can make now; every later round waits until its materials have arrived and has the same size; only the last may be smaller. The 100-craft cap is gone.
    - (Unofficial patch) Round sizes come from the projected slot need (what you carry, what your own logistics requests are bringing, intermediates and finished items) plus a fixed 5-slot buffer, which replaces the 25% output reserve.
    - (Unofficial patch) Removed the settings "Missing-material batch mode" (Slot-aware / Fixed 100) and "Inventory reserve for outputs (%)". Sizing is always by free slots.
    - (Unofficial patch) The mod reads the game's real count of items on the way to you instead of guessing "still being delivered". Waiting messages show what is set aside from what you carry, what is on the way and what is still to request.
    - (Unofficial patch) A stall alert is raised when nothing has been on the way for about 5 seconds while a build still needs materials. The stalled build pauses and stays queued; nothing is ever cancelled automatically.
    - (Unofficial patch) A forecast alert ("Inventory is filling up: free up N inventory slots.") appears as soon as the projected use would reach the 5-slot buffer; builds pause only when not even one more craft fits, and restart on their own when slots free up. When a round's materials would not fit, the message is "Not enough room for this batch: free up N inventory slots."
    - (Unofficial patch) Problems are shown as alert boxes in the game's alert bar with a count and the details on hover, plus a message on the left of the screen; each box clears about 10 seconds after its last problem is sorted out.
    - (Unofficial patch) Build order: the leftmost build in the [Auto] section goes first, reading row by row; builds to the right may craft from what you carry or request materials while it waits, as long as they don't hold it up.
    - (Unofficial patch) A blocked build (a part that cannot be crafted by hand, better-than-normal quality, an unresearched recipe) pauses only that build; all uncraftable-part cases use the one "cannot be crafted by hand" message.
    - (Unofficial patch) Stop rules: after a death all builds pause until the body is picked up or emptied, or has expired; remote view no longer pauses builds; out of logistics range only builds that need the network pause, and the out-of-range pause is shown instead of stall alerts.
    - (Unofficial patch) Sections matching your prefix without the [Auto] tag are no longer hand-crafted for (keep-stock hand-crafting is off); they stay ordinary personal logistics requests.
    - (Unofficial patch) Deleting the missing-materials section cancels the builds that depend on it and removes their lines from the [Auto] section.
    - (Unofficial patch) The log file script-output/section-autocraft.log starts fresh each session. The debug setting is now "Debug: print round size limits".
  Bugfixes:
    - (Unofficial patch) Builds no longer come out one craft at a time, or as one small first batch, while materials are still arriving. (#27)
    - (Unofficial patch) Best-effort fix for cancels being matched to the wrong craft: the mod now keeps its own copy of the crafting queue and matches each finished or cancelled craft to it. When your own craft of the same recipe merges into the mod's queue entry, or two entries would look the same after a cancel, it still has to guess; it then assumes the cancelled crafts were yours and notes the guess in the log. (#37)
  Info:
    - English only: the Chinese translation is dropped. The Chinese-language [Auto] tag in section names is still recognised.
    - LICENSE unchanged: MIT, Copyright (c) 2025 MengLeiFudge and Copyright (c) 2026 Gefion (modifications from version 1.1.1 onward).
    - Upgrade note: let any Autocraft crafting finish, or cancel it, before installing 1.1.7. Rounds queued by 1.1.6 are not counted after the update, so one extra round could be made.
    - Checked in an offline simulation only; not tested in game yet.
Version: 1.1.6
Date: 2026-10-26
  Changes:
    - (Unofficial patch) Nothing is asked for twice, for every material and every path (raw materials, intermediates and parts fetched from the network): what you already hold is set aside for the build first, your personal logistics requests are left to refill themselves, and the missing-materials section asks the network only for what is left (slot = build need minus your personal minimum for that item).
    - (Unofficial patch) No more min-0 hold slots: delivered materials stay protected as satisfied requests, slots drop out as their items are used, and the section deletes itself when nothing is left.
    - (Unofficial patch) The section is recomputed right after a batch starts, so robots no longer bring the same batch twice, and the next batch of a make request is requested while the current one is crafting.
    - (Unofficial patch) Every can't-start case prints its reason once in chat (again only when the reason changes): short ingredients with the amount in your inventory, in the logistics network and the shortfall, and why (not in the network, not enough there, no network in range, still being delivered); a batch that doesn't fit, with the free and needed slots and what was cut; an item or intermediate that can't be crafted by hand, with the same three numbers; an unresearched recipe; a quality request.
    - (Unofficial patch) Places where hand crafting can't happen are reported instead of stopping silently: space platform hub, cargo pod, remote view, respawning, cutscene, no character (god, editor, spectator), and personal logistics switched off.
    - (Unofficial patch) One persistent alert with the wrench icon shows how many requests are blocked and the latest reason; it is refreshed on a new failure and removed when nothing is blocked.
    - (Unofficial patch) Intermediates that are in the logistics network are requested as they are instead of being broken down into raw materials.
    - (Unofficial patch) New map setting "Log file detail" (off, info, debug; default info): Autocraft writes script-output/section-autocraft.log, buffered and written about every 10 seconds or straight away after an important event.
    - (Unofficial patch) New per-player setting "Debug: print batch size limits" prints which limit set each crafting batch.
  Bugfixes:
    - (Unofficial patch) Requested amounts no longer show as 0: slots are cleared before the section is rewritten (set_slot refuses an item that is already in another slot).
    - (Unofficial patch) Make requests no longer stall with a generic "can't start" message when the materials are in the network but not in the inventory (nuclear reactor, steam turbine, assembling machine reports).
    - (Unofficial patch) The [Auto] make queue is switched off before any wait or retry check, so robots never fill it as a normal request.
    - (Unofficial patch) Make-request progress counts only items from batches the mod queued for that request, and the item that just finished is no longer counted twice.
    - (Unofficial patch) Hand-crafted intermediates of a build batch are no longer capped at 100 crafts, which left large batches short.
    - (Unofficial patch) Cancelling crafts no longer loses or double counts make-request progress: cancelling your own queued crafts (even of the same recipe) leaves the mod's batch and its count alone, cancelled crafts of the mod's batch are made again later, prerequisite crafts are never counted, and turning autocraft off mid-batch cancels the mod's batch itself rather than a prerequisite entry.
  Info:
    - LICENSE unchanged: MIT, Copyright (c) 2025 MengLeiFudge and Copyright (c) 2026 Gefion (modifications from version 1.1.1 onward).
    - Upgrade note: let any Autocraft crafting finish before installing 1.1.6. Make-request batches queued by 1.1.5 are not counted toward their request and could be crafted again.
Version: 1.1.5
Date: 2026-10-25
  Changes:
    - (Unofficial patch) The mod-created [Auto] autocraft section is now a make-request queue: each slot means "craft this many once" instead of a standing minimum. Other matching sections keep the original standing-minimum behaviour.
    - (Unofficial patch) The [Auto] make-queue section is kept switched off and read by the mod anyway, so the finished product is never a real logistic request and is never held (no bot refill, not protected from "Trash unrequested").
    - (Unofficial patch) While a make request is in progress, all its raw and intermediate ingredients are held (min-0 slots in the missing-materials section) across every batch until the full amount has been crafted. Ingredients shared with other unfinished make requests stay held until the last of them finishes.
    - (Unofficial patch) A make request is complete when the mod has crafted the full requested amount (picking up, using or moving the item does not count). On completion its [Auto] entry is removed and its ingredient holds are released.
  Bugfixes:
    - (Unofficial patch) active_quality_name is now cleared together with the other active-craft fields when crafting is cancelled or the active state is cleared.
  Info:
    - Upgrade note: empty the [Auto] section before installing 1.1.5: existing [Auto] slots become make requests starting at 0 crafted, so the mod would craft the full amount again even if you already have it.
Version: 1.1.4
Date: 2026-10-25
  Bugfixes:
    - (Unofficial patch) Toggling autocraft on now recreates the [Auto] player section whenever no matching autocraft section exists, instead of only once per player ever.
    - (Unofficial patch) The toggle-on status message now runs after the section is created, so a recreated section no longer reports "No matching autocraft groups".
Version: 1.1.3
Date: 2026-10-25
  Bugfixes:
    - (Unofficial patch) Recreate the missing-materials section if the player deleted it: toggling autocraft on now resets the cached section state, cooldown and retry timer, and the regular crafting pass also rebuilds the section when it has gone missing.
    - (Unofficial patch) The auto-created autocraft section is now named "[Auto]" + prefix + player name, matching the missing-materials section style. Section matching ignores a leading [Auto] tag, so these sections still count in every match mode.
    - (Unofficial patch) New, renamed or toggled sections are picked up live while the character screen is open (checked every 10 ticks), and every 60 ticks otherwise, without needing to close the menu.
    - (Unofficial patch) Protect requested materials from "Trash unrequested" for the whole request lifecycle: every item requested for the current target recipe stays in the missing-materials section (delivered items as a minimum-0 slot, which still counts as a request but triggers no delivery). Protection is released when that craft finishes, the target changes, or the request is cleared; protection is never released silently: if a requested material is not available in the logistics network (and nothing is in flight), or nothing is left to request but the craft cannot start, the player gets an on-screen alert (alert bar + flying text, not chat) to check their logistics sections, and the items stay protected until the player edits or deletes the missing-materials section, the craft finishes, or autocraft is turned off.
    - (Unofficial patch) Do not duplicate requests: missing materials already covered by another active personal logistics request, or already on the way by robot or cargo pod (requester point targeted_items_deliver), are not requested again.
Version: 1.1.2
Date: 2026-10-25
  Changes:
    - [Unofficial patch] Not released by MengLei; personal-use build based on GitHub commit 571bf78.
    - [Change] New per-player setting "Missing-material batch mode": slot-aware (default) sizes the material request to fit free inventory slots; fixed-100 keeps the old behaviour.
    - [Change] Slot-aware batching reserves slots for other active personal logistics requests and a configurable output reserve (default 25%).
    - [Change] Per-craft slot estimate includes raw inputs, the output, and the largest hand-crafted intermediate.
    - [Change] Editing a personal logistic slot now re-checks autocraft immediately (on_entity_logistic_slot_changed).
    - [Change] 60-tick fallback retry for idle players with autocraft enabled (merged with the existing missing-section keep-alive).
    - [Change] Recipe cache refreshed and sections re-read when research finishes.
    - [Change] An autocraft section named after the configured prefix and player name is created once per player if none matches.
Version: 1.1.1
Date: 2026-10-25
  Bugfixes:
    - [Fix] Missing-materials section crash ("'slot_index': real number expected got table"): LuaLogisticSection.set_slot arguments were swapped (slot_index, filter).
  Info:
    - [Unofficial patch] Not released by MengLei; personal-use build based on GitHub commit 571bf78.
    - [Info] info.json author changed from "MengLei" to "MengLei, Gefion".
    - [License] LICENSE keeps the MIT notice "Copyright (c) 2025 MengLeiFudge" and adds "Copyright (c) 2026 Gefion (modifications from version 1.1.1 onward)".
Version: 1.1.0
Date: 2026-06-21
  Changes:
    - [Change] Replaced recursive accumulation model with resolve_ingredient tiered-degrade logic.
    - [Fix] Material request cap at 100 crafts per level.
    - [Fix] Backpack snapshot shared across recursion.
    - [Fix] Cycle detection for hand-craftable recipe loops.
    - [Fix] Fluid ingredients excluded from requests.
    - [Fix] Crafting queue double-counting of active recipe output.
    - [Fix] Missing section cooldown to prevent oscillation.
    - 声明支持 Factorio 2.1。
    - Updated missing-material logistics section writes for the Factorio 2.1 LuaLogisticSection.set_slot signature.
Version: 1.0.6
Date: 2026-05-14
  Bugfixes:
    - 修复自动手搓请求、缺料编组和物流网络计数没有按品质区分的问题。
    - 修复非普通品质物品误进入手搓配方选择,导致实际仍制作普通品质物品的问题。
    - Fixed autocraft requests, missing-material sections, and logistics network counts not being separated by quality.
    - Fixed non-normal-quality requests being considered for hand crafting even though hand crafting can only produce normal-quality items.
Version: 1.0.5
Date: 2026-05-02
  Bugfixes:
    - 修复新建游戏 tick 0 玩家角色尚未创建时同步手搓速度导致 "No character" 崩溃的问题。
    - 修复开始自动手搓时缺料编组被删除、随后又重建导致玩家看到编组闪烁的问题。
    - Fixed a "No character" crash when syncing hand crafting speed before the player's character exists on new game startup.
    - Fixed visible missing-materials section flicker caused by deleting and recreating the section when autocrafting starts.
  Optimizations:
    - 无可搓配方时增加重试间隔,并缓存缺料材料可用量;材料没有变化时跳过缺口统计、配方枚举和缺料编组重写。
    - Added a retry interval and missing-material availability cache when no recipe is craftable, skipping shortage scans, recipe scans, and missing-material section rewrites while materials are unchanged.
Version: 1.0.3
Date: 2026-05-01
  Changes:
    - 将“手搓速度倍数”改为每玩家设置,只影响设置该值的玩家角色。
    - 自动手搓现在会按当前缺口、配方产出数量和当前可制作数量动态决定本轮制作次数。
    - Changed the hand crafting speed multiplier to a per-player setting that only affects that player's character.
    - Section Autocraft now dynamically chooses each crafting count from the current shortage, recipe output amount, and current craftable count.
Version: 1.0.2
Date: 2026-05-01
  Optimizations:
    - 优化全匹配模式下高频背包变化触发的自动手搓性能,缓存物流编组请求、缺料编组位置和上一轮可搓配方,并保留持续性能日志。
    - 增加运行时全局设置“手搓速度倍数”,可按倍数调整所有阵营的手搓速度。
    - Optimized full-match autocraft performance for frequent inventory changes by caching logistic section requests, missing-material section lookup, and the previous craftable recipe while keeping continuous performance profiling logs.
    - Added a runtime-global hand crafting speed multiplier setting that adjusts manual crafting speed for all forces.
Version: 1.0.1
Date: 2026-04-12
  Bugfixes:
    - 修复数据阶段图标资源路径仍引用旧模组名,导致模组加载失败的问题。
    - Fixed the data-stage icon asset paths still referencing the old mod name, which caused the mod to fail to load.
Version: 1.0.0
Date: 2026-04-06
  Features:
    - 初始版本。
    - Initial release.