Overview#
OpenComputers is a sophisticated modular mod that brings programmable devices to Minecraft. Unlike its predecessors, OpenComputers focuses on realism and modularity, requiring players to assemble computers from individual components like CPUs, RAM, and Hard Drives. The mod uses Lua 5.3 as its primary programming language, providing a robust environment for automation, redstone control, and complex systems management.
Key features include:
- Persistence: Computers save their state (including running programs) when chunks are unloaded or the server restarts.
- Modularity: Devices are built using tiers (Tier 1 to Tier 3), allowing for budget-friendly builds or high-end supercomputers.
- Energy Requirements: Computers consume power (RF, EU, or Joules) based on their hardware and computational load.
- Robotics: Fully mobile computers that can interact with the world, mine blocks, and manage inventories.
Core Computer Hardware#
To function, a computer requires a Case, a CPU, RAM, a Graphics Card (GPU), a Screen, and an Operating System (usually OpenOS on a Hard Disk Drive).
Computer Cases
Cases come in three tiers, determining how many component slots and expansion card slots are available.
| Tier | Card Slots | Component Slots | Memory Slots | Description |
|---|---|---|---|---|
| Tier 1 | 1 | 2 | 2 | Basic iron-based case for simple tasks. |
| Tier 2 | 2 | 3 | 2 | Gold-based case with more expansion room. |
| Tier 3 | 3 | 4 | 2 | Diamond-based case for high-end automation. |
| Creative | 3 | 9 | 3 | Infinite power and maximum slots. |
Essential Components
- CPU (Central Processing Unit): Determines the number of components the computer can manage. Tiers 1, 2, and 3 increase the component limit.
- Memory (RAM): Required to run programs. If a program exceeds the available RAM, the computer will crash with an "out of memory" error.
- Graphics Card (GPU): Controls the output to a Screen. Higher tiers support higher resolutions and more colors.
- Hard Disk Drive (HDD): Permanent storage for files and the Operating System.
- EEPROM: Contains the bootloader (BIOS). A computer cannot start without an EEPROM programmed with Lua code (typically the 'Lua BIOS').
Robotics and Drones#
Robots are mobile computers that can move through the world, use tools, and interact with blocks. Unlike static computers, they must be assembled in an Electronics Assembler.
Robot Assembly
To create a robot, you must place a Robot Case in an Assembler along with various components. The assembly process takes time and energy.
- Tier 1 Robot: Limited inventory and slots.
- Tier 2 Robot: Moderate capabilities.
- Tier 3 Robot: Maximum upgrade slots and internal energy storage.
Drones
Drones are lightweight, flying versions of robots. They do not have an inventory for tools but are much faster and can navigate 3D space more freely. They are programmed via a Wireless Endpoint and require a Microcontroller as their brain.
Robot Upgrades
- Inventory Upgrade: Adds slots for the robot to carry items.
- Tank Upgrade: Allows the robot to store and manipulate fluids.
- Crafting Upgrade: Enables the robot to craft items using its internal inventory.
- Generator Upgrade: Allows the robot to consume fuel (like coal) to recharge its internal battery on the go.
- Navigation Upgrade: Provides the robot with its current coordinates and orientation.
Peripheral Blocks#
Display and Input
- Screen: Displays text and graphics. Screens can be placed next to each other to form a single large display. Tier 2 and 3 screens support color.
- Keyboard: Must be attached to a screen (or placed adjacent) to allow player input.
- Hologram Projector: A high-end device that projects a 3D voxel grid into the air, useful for maps or data visualization.
Networking and Power
- Power Converter: Converts external energy (RF, EU, etc.) into OpenComputers' internal energy buffer.
- Capacitor: Stores energy for the computer network. Essential for handling power spikes.
- Cable: Connects blocks in a network. Components connected via cables can communicate with the computer.
- Switch: Connects different networks while filtering traffic to prevent packet collisions.
Specialized Blocks
- Adapter: Allows the computer to interact with non-OpenComputers blocks, such as chests, furnaces, or machines from other mods (e.g., IndustrialCraft 2, Thermal Expansion).
- Disk Drive: Allows the reading and writing of Floppy Disks.
- Geolyzer: Scans the surrounding terrain to detect ore density and block hardness.
- 3D Printer: Uses Chamelium and Ink to print custom decorative or functional blocks designed in Lua.
Mechanics and Programming#
OpenOS
OpenOS is the primary operating system for OpenComputers. It provides a command-line interface (CLI) similar to Unix/Linux. Users can create, edit, and run scripts using the built-in edit command.
The Component API
In Lua, the computer interacts with its hardware via the component library.
Example of turning on a redstone signal:
local component = require("component")
local rs = component.redstone
rs.setOutput(5, 15) -- Sets redstone output on the back side to max strength
Persistence (Eris)
OpenComputers uses the Eris library to serialize the state of the Lua VM. This means that if a computer is running a complex script and the chunk unloads, the script will be exactly where it left off when the chunk reloads. This eliminates the need for complex 'startup' scripts for every minor task.
Crafting Materials#
Crafting in OpenComputers is tiered and progressive. Most high-level components require several sub-components:
- Transistor: The most basic building block, used in almost every recipe.
- Microchip (Tier 1-3): Used to create CPUs, RAM, and complex cards.
- Printed Circuit Board (PCB): Created by treating an Unprepared PCB with acid (usually involving water and gold/iron dust).
- Control Unit: A high-tier component used for building Computer Cases and Robots.
- Chamelium: A synthetic material used as 'filament' for the 3D Printer.
Nanomachines#
Nanomachines are a late-game mechanic where the player can inject themselves with a Nanomachine Controller. By using a Nanomachine Remote, players can trigger various buffs (Speed, Strength, Night Vision) or abilities (Flight) by configuring the internal neural network of the nanites. These require a constant supply of energy, which can be provided by standing near a Wireless Charger.
Configuration#
The mod is highly configurable via the settings.conf file. Server administrators can adjust:
- Max RAM: Limits how much memory a computer can have to prevent server lag.
- Power Consumption: Can be increased for difficulty or disabled entirely.
- Tick Rate: Adjusts how many Lua instructions are executed per game tick.
- Wireless Range: Sets the maximum distance for wireless cards and access points.