Build Planner
List what your Commander builds, in order, and what its first factory makes. The planner works out when each job starts and finishes, how your metal and energy rise and fall, and when a shortage holds your builders up. It follows the game's own rules, one tick at a time. At normal speed the game runs 30 ticks a second.
How Building Works
Every tick, a builder adds its build power to the job: its workertime divided by 30, with the remainder dropped. The Commander's 300 gives 10 a tick, a Kbot Lab's 100 gives 3, and a Construction KBot's 80 gives only 2. The job is finished when the build power added reaches its build time. The Metal Extractor has a build time of 1800, so the Commander builds one in 180 ticks: 6 seconds.
You pay as the work goes on. Each tick of work asks for the same share of the metal and energy cost: for that extractor, 8.3 metal and 86.8 energy a second. A builder that assists a factory adds its own build power and pays for its own share.
How the Stores Settle
Your stores change once a second, not every tick: on the game's first tick, then on every 30th tick. Each time, the game adds the second's income, pays any debts from earlier seconds, then pays what was asked for since the last time.
If your stores cannot cover it all, every builder is paid the same share of what it asked for, and the rest becomes its debt. A builder that owes metal or energy does no work at all until a later second pays the debt off. So a shortage does not slow your builders down. They stop for a whole second, start again, and stop again, until income catches up.
Your storage for each resource is your starting amount, or 200 if that is less, plus what your buildings add. A Kbot Lab adds 100 of each. Income above your storage is lost.
Income
The Commander makes 25 energy and 1 metal a second; the Core Commander also uses 1 energy. A Solar Collector makes 20 energy.
An extractor's output is fixed when it is placed: its extraction value (0.001 for a Metal Extractor) times the total, over the 9 cells under it, of each cell's metal plus one. On a deposit of 223 that is 0.001 × 9 × 224 = 2.016 metal a second; on ground with no metal, 0.009. The planner takes every cell to hold the same metal, as when the extractor sits squarely on a deposit, and lists the deposits of the map you choose. An extractor uses 3 energy a second. If that energy is not paid in full one second, the extractor makes no metal the next.
Every 5 to 14 seconds the wind changes to a speed between the map's lowest and highest. A Wind Generator makes 30 energy times the speed divided by 5000, and never more than 30. The planner uses the average over every speed the map allows, or its lowest or highest if you choose. A Tidal Generator makes the map's tidal strength in energy each second.
A Metal Maker turns 60 energy into 1 metal a second. The game switches it off while your stored energy is no more than twice your stored metal, and on again while your energy income is higher than your energy use. One time in five, at random, it skips switching on; the planner does not.
What the Planner Leaves Out
- Walking, turning, factory doors and units leaving the factory. A builder places its next job on the tick after it finishes the last one, and starts work on the tick after that.
- Every builder except the Commander and the first factory on its list. The units the factory makes add their income and storage, but they do not build or move.
- Weapons, reclaiming and sharing with allies.