Skip to content

Repository files navigation

Satisfactory Production Line Calculator

A CLI tool for planning Satisfactory factory production lines. Models resources, machines, and crafts, then solves the full dependency tree and renders an interactive HTML graph.

Install

Requires Python 3.11+ and uv.

uv sync

Commands

All commands are run via:

uv run satisfactory <COMMAND> [ARGS]

add-resource

Add a resource (ingredient or product).

uv run satisfactory add-resource "Iron Ingot"
uv run satisfactory add-resource "Iron Plate"

add-machine

Add a machine type.

uv run satisfactory add-machine Constructor
uv run satisfactory add-machine Assembler

add-craft

Add a craft interactively (reads from stdin). Prompts for craft name, machine, inputs (resource + rate/min at 100%, empty line to finish), then outputs (resource + rate/min at 100%, empty line to finish).

uv run satisfactory add-craft
# or pipe answers in:
printf 'Iron Plate\nConstructor\nIron Ingot\n30\n\nIron Plate\n20\n\n' | uv run satisfactory add-craft

list

List all stored resources, machines, and crafts.

uv run satisfactory list

build

Build a production line interactively. Prompts for one or more target crafts (with a desired production percentage), solves the full dependency tree using flux tendu (shared intermediates), and writes an HTML visualization.

uv run satisfactory build
# or pipe answers in (target, pct, empty to finish targets, output filename):
printf 'Modular Frame\n300\n\nligne.html\n' | uv run satisfactory build
# Output: Wrote ligne.html

catalog

Generate a standalone HTML page listing every available craft as a card (machine, inputs → outputs, rates). Pure HTML/CSS — no internet needed.

uv run satisfactory catalog --out crafts.html
# Output: Wrote crafts.html (N crafts)

Data Files

All data is stored as JSON in the data/ directory:

  • data/resources.json — list of resource names
  • data/machines.json — list of machine names
  • data/crafts.json — list of craft definitions (inputs, outputs, machine)

Overclock Rule and Machine Count

Satisfactory machines can be overclocked up to 250%. This tool enforces that cap:

  • Input: a target production percentage (e.g. 300% means 3× the base rate).
  • Conversion: machines = ceil(pct / 250), clock = pct / machines
  • Example: 300% → ceil(300/250) = 2 machines each running at 300/2 = 150%
  • Example: 500% → ceil(500/250) = 2 machines each at 250%
  • Example: 420% → ceil(420/250) = 2 machines each at 210%

The detail line on each craft node in the HTML reads: N× Machine @clock%

Known Limitation: Multi-Output Recipes

The solver is exact for single-output recipes (every recipe shipped in the seed data). For a recipe with multiple outputs that are each independently consumed (e.g. a refinery byproduct), the machine count is correctly driven by the output requiring the most machines, but the input/raw demand upstream is over-counted (summed across outputs). When this happens the build prints a WARN: Craft '...' has multiple demanded outputs ... message — treat the upstream numbers for that craft as an upper bound, not exact.

Viewing the HTML Output

Open the generated file in any modern browser:

# Windows
start ligne.html

# macOS
open ligne.html

# Linux
xdg-open ligne.html

The graph renders left-to-right using Cytoscape.js with a dagre layout. Craft nodes show production rate and machine count/clock. Raw resource nodes (leaves) are styled distinctly. Edges are labelled with the flow rate in items/min.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages