building.dataType
One kind of production building: what one cycle takes and gives and how long it lasts, what storage it adds, what jobs it queues, what it costs to build and upgrade, and how big it is. Add a `.data` asset bound to `productionKit.building` anywhere in a world and productionKit fin…
building (productionKit contract)
One kind of production building: what one cycle takes and gives and how long it lasts, what storage it adds, what jobs it queues, what it costs to build and upgrade, and how big it is. Add a .data asset bound to productionKit.building anywhere in a world and productionKit finds it by itself; it is drawn in any look and shown by any display like the kit's own twelve kinds. (Several recipes on one building, like the market's, are made from code with Production.defineBuilding{ recipes = ... }.)
| Field | Meaning |
|---|---|
id, name, description | The kind's id (what scenes write in kind), and the words players read. |
category | producer, converter, market, housing, storage, military, power or research. Producers work first in each step, markets last, so a chain flows in one step. |
inputs, outputs, every | One recipe: take inputs from the town's stock, wait every seconds, put outputs in. Each is a list of { resource, amount }. A producer has no inputs. |
storage | What it adds to the town's limits: { resource: all, amount: 100 } raises every limit. |
queueSlots, jobs | A queue of jobs made one after another: each job { id, name, time, costResource, costAmount, outputResource, outputAmount }. |
size | Footprint and height in metres [w, h, d]. |
cost | What it costs to place in build mode (buildPlaceKit), a list of { resource, amount }. |
upgradeCost, upgradeGrowth, upgradeSpeed, upgradeMax | Coins for level 2, how much more each level after costs, how much faster each level works, and the top level. |
contract: productionKit.building
values:
id: quarry
name: "Quarry"
category: producer
outputs: [{ resource: stone, amount: 1 }]
every: 3
size: [6, 4, 6]
cost: [{ resource: coins, amount: 40 }]
Scoped to this part · feeds back into the world's score.