Quality Gardener

by raley

Let bots manage your garden **ahem** factory. This is a helper for factories with mixed quality buildings. Ghosts are matched to the best-available item in logistic storage, and bots automatically upgrade buildings to higher qualities when they become available.

Utilities
9 hours ago
2.1
2
Factorio: Space Age Icon Space Age Mod
Logistic network

Changelog

Version: 1.1.0
Date: 29. 07. 2026
  Features:
    - Starved upgrade orders now self-heal. The mod remembers which upgrade marks it placed - and
      only ever cancels those; your own marks are never touched - and cancels one that has waited
      longer than the new Order Expiry setting (default 300 s) with its item out of stock, for
      example after biter damage or your own upgrade passes consumed the stock the order was
      counting on. The building becomes an ordinary candidate again on the next round. Orders whose
      item is in stock but queued behind busy bots are left alone. Set the expiry to 0 to keep the
      old never-cancel behavior.
  Changes:
    - The pass now runs every tick in correspondingly smaller slices; the Entities per Pass setting
      is renamed Entities per Tick (default 1 - the same average throughput as before, delivered
      perfectly smoothly). The order ledger is swept during the rest between rounds under the same
      work budget, so nothing ever bursts.
Version: 1.0.0
Date: 28. 07. 2026
  Features:
    - Buildings are marked for upgrade when higher-quality versions of them sit in the logistic
      network, and construction bots swap them out. Each building jumps straight to the best
      quality on hand, and the displaced item returns to storage where it can lift an even worse
      building - quality cascades through the base with no manual upgrade-planner passes.
    - Ghost provisioning: a ghost requesting a quality the network does not stock is retargeted to
      the best quality the network does have - even a lower one - so the building gets built
      instead of waiting forever. Once built, it is an ordinary upgrade candidate and is raised
      back up as better stock appears.
    - Module provisioning: installed modules with a higher-quality version in storage are swapped
      by the bots (the displaced module returns to storage), and module requests stuck on an
      out-of-stock quality are retargeted to the best quality on hand - even a lower one - so the
      slot gets filled at all. Quality-only: the mod never changes which module is installed or
      requested, and installed modules are never downgraded.
    - Everything placeable and upgradable is covered, modded buildings included - coverage is
      derived from prototypes, with no per-type toggles. Quality chains are walked via the
      prototype graph, so any quality mod works.
    - Stateless by design: every round reads the world fresh, so nothing can get out of sync.
      Existing upgrade marks (yours, the mod's, or another mod's) count as demand, so the same
      item is never promised twice, and no mark is ever cancelled. Upgrades behave exactly like
      player-ordered native upgrades.
    - Smooth, constant cost: networks are visited round-robin in small slices, orders are capped
      by available construction robots, and a rest between rounds gives bots time to pick up
      ordered items. Settings: work per slice, a per-item supply reserve, and the round delay.