Pythonator – Programmable Combinator


A combinator you program in Python. Replace tangled combinator setups with readable code – loop() runs every tick with deterministic 1-tick timing, like vanilla combinators. Snippet buttons and a signal picker help you start, ALT mode shows what every building reads and sends. [Early development – feedback welcome]

Content
14 days ago
2.0 - 2.1
100
Circuit network

Changelog

Version: 0.3.0
Date: 2026-11-22
  Features:
    - Snippet bar below the editor: buttons insert ready-made code (def loop, if, if/else, inp, out, print, latch,
      timer, edge, counter, delay, pid, where, each) where you last typed. Statements go on a new line with the
      right indentation and the first UPPERCASE placeholder is selected, so you just type over it.
    - Signal picker in the snippet bar: replaces the selected SIGNAL placeholder and selects the next one, or
      inserts the signal name in quotes.
    - config(label="...") sets the building description shown in its tooltip; config(icon="...") shows an icon in the
      middle of the building. Both are part of the code, so they travel with blueprints.
    - ALT mode shows the signals the program reads (by name, or Each when it reads the whole set) on the input side
      and the signals it currently sends on the output side, with a red / green background for single-wire
      signals. The input and output arrows are drawn on the edge of the building so they do not cover the icons.
  Changes:
    - A string that is exactly one icon from the editor's icon picker ("[item=iron-plate]") now works as a signal
      key. Previously it was reported as an unknown signal.
    - Help: new config() and Window and ALT tabs, the library tab describes every function in detail (including
      what kp, ki, kd, lo and hi mean in pid() and how to tune it). The new tabs are also in Tips and tricks.
    - The print() log has a gap from the buttons above it.
Version: 0.2.2
Date: 2026-11-17
  Bugfixes:
    - Reading a single wire by key (red["stone"], green["stone"], red.get(...)) no longer stops the program
      with "Internal error: 'wire_connector_id': real number expected got nil". inp was not affected.
Version: 0.2.1
Date: 2026-11-13
  Info:
    - Mod title and description now say what the mod is: a programmable combinator.
Version: 0.2.0
Date: 2026-10-23
  Compatibility:
    - Updated for Factorio 2.1. Factorio 2.0 players keep version 0.1.1.
    - Fixed a crash on game load with Pyanodon 3.1: the Pythonator recipe and technology now get the same
      helper methods that other mods attach to existing recipes.
    - Existing saves keep all buildings, programs, program state and researched technologies.
    - Tested with vanilla, Space Age, Pyanodon's, Bob's and AAI Industry on Factorio 2.1.
Version: 0.1.1
Date: 2026-10-11
  Bugfixes:
    - Circuit wires now attach to the correct terminals in every rotation (they stayed at the north position).
    - Status LED is drawn at the correct position in every rotation.
  Changes:
    - An output explicitly written as 0 is shown in the output panel. The circuit network never carries zero, so
      nothing is sent on the wire, same as with a constant combinator.
Version: 0.1.0
Date: 2026-10-09
  Features:
    - Programmable circuit controller scripted in a Python subset.
    - In-game editor window with line numbers, signal icon selector, error line highlight and a draft that survives
      closing the window.
    - Play, Pause, Reset and Step buttons, status with tick and cost of the last run, panels for input and output
      wires, global variables and a print() log.
    - Combinator library: vector operations (each, where, count, sum, max_key, min_key, out.set, out.add) and
      stateful elements (latch, timer, edge, counter, delay, pid).
    - Help window with language reference and examples that can be inserted into the editor.
    - Building display shows scrolling code while the program runs, frozen text while paused, red text on an
      error.
    - Tips and tricks category Pythonator with the full language reference and examples.