Clock Generator Sidecar


Select machines to extract crafting speeds and productivity bonuses. Export data for use with the Clock Generator tool.

Utilities
13 days ago
2.0 - 2.1
611
Owner:
abucnasty
Source:
https://github.com/abucnasty/clock-generator
Homepage:
https://github.com/abucnasty/clock-generator
License:
MIT
Created:
11 months ago
Latest Version:
0.16.0 (13 days ago)
Factorio version:
2.0 - 2.1
Downloaded by:
611 users

Export a Factorio build as text for the Clock Generator website: https://clock.abucnasty.dev

Export a build from Factorio

Use the sidecar mod to copy a build from Factorio to the clock generator site.

Before you start

  • You have Factorio 2.1.
  • The mod Clock Generator Sidecar is installed and on. To install it, use the Mods menu of the game.
  • The build is assembled in the game, and each machine has a recipe.
  • The belts and chests that the inserters use have items on them or in them. The sidecar exports an empty belt only
    if each inserter that puts items on it takes them from a machine and moves one item that the machine makes. It
    exports an empty chest only if the items that go in and out show the item that it holds.

Procedure

  1. Press Alt+E, or click the Clock Generator Sidecar shortcut.

The selection tool is in your hand.

  1. Drag to select an area that contains one copy of the build. Include all of its machines, inserters, belts, chests
    and mining drills. If a belt goes into a loader, include the loader and the chest that it fills.

The Clock Generator Sidecar window opens. It shows the number of entities and the suggested target.

  1. Read the window. If it shows inserters or mining drills that are not in the export, read the cause for each one.
    Correct the build, then do step 2 again.

  2. Click Export.

The Export your build for the Clock Generator window opens. The text in it is selected.

  1. Press Ctrl+C.

If you clicked in the window and the text is not selected, click Select all, then press Ctrl+C.

  1. On the clock generator site, click Paste from Factorio.

The Confirm Import from Factorio dialog opens.

If your browser does not let the site read the clipboard, the Paste from Factorio dialog opens. Paste the text
into Paste the export here, then click Continue.

  1. Make sure that each part you want is selected. Then click Import Selected.

Result

The build is on the site. If the site had no setpoint before, the setpoint is the suggested target: the
product of the build at the maximum rate of its machines. If its output belt or a different part of the build cannot
take that rate, the setpoint is the maximum that the build can hold, and the Confirm Import from Factorio dialog shows the limit. At the
maximum rate, the clock has no time for recovery.
To give the clock time for recovery, decrease the rate in Setpoint.

Data in a sidecar export

The sidecar exports the entities in your selection that the clock generator uses, and the data of each entity.

Entities and their data

Entity Data in the export
Assembling machine, furnace Recipe. Crafting speed, with the effect of modules and beacons. Productivity, with the effect of research.
Recycler The data of a machine, and the machine or container that it puts its results into.
Biochamber The data of a machine, and its energy consumption bonus.
Mining drill Speed bonus and productivity.
Inserter The entity from which it removes items, and the entity into which it puts them. Type, quality, stack size and filters.
Belt The items on each lane. If an inserter removes items from the belt, also the end of each lane and the direction of the items.
Chest The items in it.
Car, tank, cargo wagon The data of a chest. For a cargo wagon, also its quality and its slot filters.
Rocket silo The data of a chest, and the quality, crafting speed and productivity of its recipe.

If the filters of an inserter are off, the export has no filters for it. The export marks a blacklist filter. The site
does not accept a blacklist filter.

Belt pickups

For each inserter that removes items from a belt, the export has the pickup position and the lane that the inserter
uses first. This includes:

  • Pickups in line with an underground belt entrance or exit, after it in the direction of the belt.
  • Pickups across an underground belt exit, from the belt before the exit. At these pickups, the first lane changes
    after you use Flip horizontal or Flip vertical on the inserter.

The export marks each belt pickup for which the sidecar cannot give data. The site does not accept these pickups:

  • A pickup from a belt bend.
  • A pickup from a splitter.
  • A pickup from a belt tile that has side-loading from a different belt.
  • A pickup in line with the belt, or a different pickup position that the site cannot use.

Lane ends

For each belt from which an inserter removes items, the sidecar follows the belt from the pickup in the direction of the
items. It does not examine the belts that put items on it. The export gives each lane one of these ends (lane_end):

  • dead_end: the lane stops. The belt has no belt after it, or it goes into an underground belt entrance that has no
    exit.
  • infinite: the items move off the lane. The sidecar gives this end only when the belt goes into a loader
    that fills an infinity chest that removes all items. The loader and the chest must be in your selection.
  • unknown: the sidecar cannot see the end of the lane.

The sidecar gives unknown when the belt goes into a splitter, into a different loader, or out of your selection. It
also gives unknown when a different belt goes onto the belt, when the belt goes onto a different belt, or when the belt
is a loop.

When the belt goes onto an underground belt from the side, one lane goes into the cover of the underground belt. That
lane is a dead_end. The sidecar cannot see the rate of the other lane on the underground belt. That lane is
unknown.

If two belts in your selection have the same items on the same lanes, the export shows them as one belt. If their lane
ends are different, the export gives unknown.

Flow direction

For each belt from which an inserter removes items, the export gives the direction in which the belt flows along the row
of copies (flow_direction): 0 north, 4 east, 8 south or 12 west.

  • If the export gives a copy spacing, the flow direction is the direction of the copy spacing.
  • If the export gives no copy spacing, the sidecar reads the direction at each belt tile from which an inserter removes
    items. It uses that direction only if the belt does not turn between that tile and the last belt tile in your
    selection.

The export gives no flow direction in these conditions:

  • The export gives no copy spacing, and the belt turns after one of these tiles, or one of these tiles is a belt bend.
  • The export gives no copy spacing, and these tiles have different directions.
  • The copy spacing is not along a north, east, south or west direction.

A belt from which no inserter removes items has no lane ends and no flow direction.

Suggested target

The export gives a suggested target output: the product that goes out of your selection, and the maximum rate at
which the machines can make it, in items each second. If the belt that the output inserters put the product on
carries less, the rate is what that belt carries. The sidecar window then shows both rates.

Copy spacing

If your selection has two or more copies of the build, the suggested target can give the copy spacing (copy_offset).
This is the distance in tiles from one copy to the next copy. The sidecar reads it from the inserters that remove items
from belts:

  1. On each belt, the sidecar starts at the first inserter in the direction of the items.
  2. It finds the distance that moves each inserter of a copy to the same inserter of the next copy. The next copy is the
    copy after it in the direction of the items.
  3. Each belt that has two or more of these inserters must give the same distance.
  4. Each inserter that removes items from a belt must have the same inserter at that distance in the copy before or after
    it. Each copy must have all of these inserters.

Two inserters are the same if they have the same type, quality and direction. The entities that they use must be the
same entity, with the same recipe and the same position from the inserter.

The export gives no copy spacing in these conditions:

  • Your selection has one copy.
  • The distances between the copies are not all the same.
  • A copy is a mirror image of a different copy.
  • A copy has only some of the inserters of a full copy.
  • No belt has the inserters of two or more copies.
  • The export has no suggested target.

One copy can have two or more machines that are the same, with the same inserters, at equal distances along a belt. The
sidecar cannot find the difference between these machines and copies. Then it gives that distance.

The site does not use the copy spacing from the export. Set the distance to the next copy in Setpoint.

Entities that are not in the export

The export does not include an inserter if the entity that it uses is not in the export. The export window shows each
such inserter, with the cause. This is also correct for a mining drill if the entity that it fills is not in the export.

The sidecar does not export:

  • An empty belt, if an inserter takes items from it, or if an inserter that puts items on it does not move one item
    that a machine makes.
  • An empty chest, if the items that go in and out do not show the item that it holds.
  • A machine that has no recipe, or a lab.

Exports from a previous sidecar version

An export or a configuration from a previous version of the sidecar can have belt pickups that the site does not
accept. Export the build again. An update of the mod does not change an export that you made before the update.

Source and bug reports: https://github.com/abucnasty/clock-generator