Factory-lite
For creatorsAdd-on 2.2.2+
You build a factory game: mine ore, smelt it into plates, assemble gears and circuits, and deliver them to the hub. Machines, recipes and goals are data tables.
▶ Play
- M miner · B belt (drag for a run) · F furnace · A assembler (Tab picks its recipe) · G generator.
- R rotates the machine’s front (Shift+R turns it back).
- Q copies the machine under the cursor, with its facing and recipe.
- Right-click or X removes. Esc cancels.
- The arrow keys and the wheel move the camera.
- Tap a palette button, then the ground.
- Drag for a belt run.
- Two fingers move the camera.
What you get
Section titled “What you get”Iron and copper ore lie in the north-west, with the hub and a generator already standing. The game walks you through the first line, then sets the goals: deliver 30 iron plates, then 15 gears, then 10 circuits.
- Guided steps. The help line tells you what to do next, and a bobbing yellow marker stands where it wants you: over the ore, on the miner’s output, at the end of your belt, at the hub.
- A status light over every machine. Green: working. Yellow: waiting for input. Red: output blocked. Purple: no power. Amber: slowed by low power. Grey: out of ore, or no recipe. The palette has a legend.
- Hover anything. A machine shows its name, its status in words (waiting for input — needs Iron plate), its recipe and what it holds. A belt shows what it carries; ore shows how much is left.
- A ghost that explains. While placing, an arrow shows the machine’s front and a marker shows where its output goes. Where it can’t go, the ghost turns red and says why: no ore, occupied, or the plates you still need.
- L-shaped belts. Drag along one axis and then the other, and the belt turns the corner. The run is previewed before you let go.
- Feedback. The hub pulses at every delivery, and the help line shows delivery rates per minute.
Build it
Section titled “Build it”-
Make the ground and add the scene tags
factory.map = 64,48(the grid, in 1 m cells),factory.origin = -32,-24andfactory.stock = iron-plate:400,gear:20(the hub’s starting stock). -
Set the camera. Use the strategy camera from tutorial 15:
camera.mode = rts, withcamera.rtsBounds = -32,-24,32,24. -
Paint the ore. Add a flat box over each ore patch. Give it Add Component ▸ Shooter & Strategy ▸ Ore Patch, with
factory.ore = iron-ore(orcopper-ore) andfactory.amount = 500. Every cell under the box holds that much ore, and the ground thins as it runs out. -
Model the machines. Model a miner, a furnace, an assembler, a generator and the hub, and name them
Model_Miner,Model_Furnace,Model_Assembler,Model_GeneratorandModel_Hub. -
Write the tables. In Blender’s Text Editor, make these texts (see The tables):
data/items.json: every item, with its name and colour;data/recipes.json: what goes in, what comes out, how long it takes, and which machine makes it;data/machines.json: each machine’s footprint, cost, power, key and model;data/start.json: what stands at the start (the hub and a generator);data/goals.json: the guided steps, then the deliveries.
-
Add the help lines. Two HUD Text lines, one for the keyboard (
hud.touch = 0) and one for touch screens (hud.touch = 1). -
Press ▶ Play. Press M and place a miner on the iron ore, drag a belt from its front with B, put a furnace at the belt’s end with F, and belt the plates into the hub. The first plate arrives and the hub pulses.
The parts
Section titled “The parts”| Part | Footprint | Cost | What it does |
|---|---|---|---|
| Belt | 1 × 1 | 1 iron plate | Carries items 2 cells a second, at most 4 to a cell. At its end, an item moves into whatever it points at: another belt, or a machine that takes it |
| Miner | 2 × 2 | 10 plates | On ore: one ore every 2 s from the richest cell beneath it, out of its front |
| Furnace | 2 × 2 | 8 plates | Ore into plates in 3.2 s. It picks its recipe from what arrives |
| Assembler | 3 × 3 | 9 plates + 5 gears | Makes one recipe: gear (2 plates), cable (1 copper plate → 2), circuit (1 plate + 3 cable). Inputs arrive by belt from any side; the output leaves by the front |
| Generator | 2 × 3 | 20 plates | 900 kW of power |
| Hub | 3 × 3 | — | Takes every delivery. Its stock pays for building |
Power. Miners, furnaces and assemblers draw power while they work. When they need more than the generators give, every machine runs at the same fraction: the factory slows down but doesn’t stop. Remove the last generator and everything stops.
Removing. Right-click removes a machine or a belt. Its items and what it holds go back to the hub, and its cost is refunded.
Nothing is lost. No item appears or disappears outside a recipe.
The tables
Section titled “The tables”| Table | Columns |
|---|---|
data/items.json |
id, name, color |
data/recipes.json |
id, in (item:n,…), out, time (seconds), made (furnace or assembler) |
data/machines.json |
id, name, kind (belt, miner, furnace, assembler, generator or hub), foot (w,h), cost (item:n,…), time, power (kW), hotkey, model |
data/start.json |
machine, x, z, dir, and optionally recipe |
data/goals.json |
kind (place, front-belt, fed or deliver), text, target (where the marker points), and for a delivery item and count. The steps run in order |
Settings
Section titled “Settings”| Tag | Values | What it does |
|---|---|---|
factory.map |
W,H in 1 m cells |
Makes the scene a factory, and sets its size |
factory.origin |
x0,z0 in metres |
The grid’s corner. Default: centred |
factory.stock |
item:n,… |
The hub’s starting stock |
factory.items · factory.recipes · factory.machines · factory.start · factory.goals |
default data/<name>.json |
The tables, if you name them differently |
factory.ore |
an item, default iron-ore |
On a box: the ore under it |
factory.amount |
ore per cell, default 500 |
On a box: how much each cell holds |
When it plays the way you want, share it: publish and share.