Computer Core 2 (ALPHA)


ALPHA - experimental Factorio 2.0 port of Computer Core. Programmable Lua computers, shell/filesystem, named persistent handlers, circuits, wireless networking and personal gauntlet. Fresh 2.0 worlds only; no legacy saves or persisted-closure compatibility. Headless base/expansion save-reload tests pass; client GUI, sound, wired robot blueprints and multiplayer acceptance remain unverified. Back up saves; expect bugs and API changes.

Utilities
7 hours ago
2.0
0
Circuit network
Owner:
SirEdvin
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
16 hours ago
Latest Version:
0.1.2 (7 hours ago)
Factorio version:
2.0
Downloaded by:
0 users

Computer Core 2 — ALPHA 0.1.2

Programmable Lua computers for Factorio 2.0: terminal/shell, filesystem and mounts, left/right circuit ports, wireless messaging, speaker, personal computer and waypoints. A modernization of Computer Core by Relik77 and contributors; original artwork and MIT license retained.

Experimental alpha, not a stable release. Back up saves and use a fresh test world. Expect bugs and possible API/save-format changes before stability. Requires Factorio 2.0.77 or newer. No legacy Computer Core save or persisted-closure migration; the original Computer Core cannot be enabled alongside this mod.

0.1.2 startup hotfix

Fixes the 0.1.1 error Missing specification of font name: "default-mono". The editor now uses Factorio's declared core default font. A new regression explicitly validates font prototype names, because headless loading alone did not catch this client startup failure. No program or filesystem data is reset.

Workbench improvements introduced in 0.1.1

  • Reworked native workbench with a draggable window, resolution/UI-scale-aware layouts, Terminal / Files / Waypoints / Help navigation and live process/power status.
  • File/folder browser, create/edit/run actions, live dirty/saved indicators, immediate success/error feedback and retained draft/conflict/rebase safeguards.
  • Terminal commands update existing controls instead of rebuilding the whole window. Program input sends once using Send/Enter, not on every keystroke.
  • Power loss leaves the workbench inspectable; executing programs and sending program input still require power.
  • Corrected inherited red/green wire anchor offsets: attach wires to the two feet, not the computer body. Ports take selection priority over the overlapping body.

Getting started

Research Personal Computer and Computer, craft a computer and connect power. Stand within 10 tiles and Ctrl+left-click it. Ctrl+G or the shortcut opens the personal computer after research with a character.

Use Files → New file to open the Lua editor, or enter help, help apis or help os in the Terminal. Save & run starts a program; Stop clears its circuit and speaker outputs. The personal computer has no physical circuit ports or speaker.

Circuit networks

Wire an input chest, constant combinator or roboport to the left foot; use the right foot for a separate output network. Red/green wires are circuit networks, not the roboport logistic network. To observe logistics, configure a wired roboport to read network contents.

Read with lan.readLeftSignals("red") / "green" and publish using lan.writeRightSignals(signals). Both colours on an output port receive its signal set. Publishing replaces that side's entire set. Avoid connecting input and output networks together unless feedback is intended. Signal quality is part of identity.

Durable programs and safety

Persistent callbacks use named handlers and explicit serializable state, not saved anonymous closures. Keep lasting values in state, os.set or extension __state. Put effects in init/handlers, not module scope. init runs once per program start, not on save load; captured locals are reconstructed between callbacks.

Only execute Lua you trust: data quotas are not CPU isolation. An infinite loop can stall the simulation.

Documentation packaging

Detailed documentation and practical Lua examples are maintained in the project repository, not bundled in the mod archive or installed in the computer filesystem. Built-in concise shell/API help remains available. The release ZIP contains runtime/data, graphics, locale and the MIT license only.

Verification and outstanding client acceptance

The actual packaged mod passes real Factorio 2.0.77 headless tests in base-only and Quality / Elevated Rails / Space Age configurations: 154 cumulative initial checks and 155 after separate-process save/reload. These include real wired examples, persistence/lifecycle/quota protections, data-stage wire/style assertions and mocked GUI interaction contracts. Main-commit CI passes.

Mocked GUI tests do not verify native rendering or real mouse/keyboard behavior. The following remain unverified with actual clients: visual UI/layout/focus and wire alignment, audible playback, personal-computer surface-deletion behavior, robot-built externally wired blueprints, and multiplayer client joining/desync acceptance.

Report reproduction steps, Factorio version, enabled mods, UI scale and relevant logs. Do not treat headless success as full client acceptance.

MIT. Original Computer Core: https://github.com/Relik77/factorio_computer_core
Factorio 2.0 modernization by SirEdvin.