In other languages: 日本語 Українська 简体中文

Production statistics

From Official Factorio Wiki
Revision as of 11:47, 30 May 2025 by Regular9 (talk | contribs) (Productivity modules: Science production is now included in statistics)
Jump to navigation Jump to search
The production window in action.

The production screen is a window that shows details about the rate at which your factory produces and consumes items. It also includes graphs to show how this information has changed over time. By default, it is accessed by pressing P in-game or via a button above the minimap. On the Nintendo Switch the GUI can be opened via a button in the quick panel.

The timescale can be set to 5 seconds, 1 minute, 10 minutes, 1 hour, 10 hours, 50 hours, 250 hours, 1000 hours or all. At low timescales, the rate shown can be inaccurate because of the small number of items sampled to get the value.

Items and Fluids

The default tab, items, shows how many of a given product have been produced and consumed through assemblers, chemical plants etc. These can be from all categories, including ore, electronic circuits and transport belts. The fluids tab works similarly to the production tab in that it shows produced and consumed fluids. This includes steam that is created to generate power, but also all oil-related fluids.

Buildings

The buildings tab gives an overview over which buildings the player (by hand or by bot) has placed into the world and deconstructed recently. This includes assembly machines and transport belts, but also trees.

Pollution

Main article: Pollution

The pollution tab shows the rate of pollution production and absorption over time. Usually, pollution is produced by machines and then absorbed by the tiles, trees and nests. Particularly, nests can absorb pollution and spawn enemies based on the amount absorbed, then launch an attack on the polluters. Therefore players can predict the frequency and intensity of enemy attacks by regularly check the amount of pollution absorbed by nests and and prepare for defenses in advance.

Kills

The kills tab shows the enemies killed by the player over time, and the items destroyed by enemies. In addition, some entities in environment (such as trees and rocks) are also included in the kills statistics when destroyed (not mined).

Filtering the graph

If some items are produced at a significantly higher rate than others (this often happens with iron and copper plates), the graphs get compressed vertically so they can fit in the space. This makes it very hard to see how production has changed over time for other items. To alleviate the issue, the player can filter which items are to be shown on the graph by clicking the icons of the resources. This changes from the default view (all items visible) to a view where only the selected items are visible. The player can add more items to the selection by clicking the resource icons. To return to the default view there is a red reset button in the upper right part of the item list.

In Space Age, filters are provided for different surfaces and quality tiers. By default, the production screen will shows statistics for the current surface (including planets and space platforms). Checking the "Global statistics" option will display the total statistics of all corresponding items in the game. The quality filter allows player to view the production and consumption of items at different quality tiers.

Productivity modules

Consumption only takes the consumed items into account and is not affected by any productivity bonuses. This means that science progress is higher than the science pack consumption would suggest if productivity modules are used in labs.

Exporting production statistics

In order to export production statistics out of the game into external JSON files, the following command may be used in the in-game Console.

NOTE!! Using this script will disable achievements. Work around this; it is recommended to run this script on a copy of your game save. The following steps are recommended:

  • Save the game to a separate game save file.
  • Start a separate game save.
  • Run script
  • You may now delete the separate game save again.
/command local timescales = {
  [defines.flow_precision_index.five_seconds] = "5s",
  [defines.flow_precision_index.one_minute] = "1min",
  [defines.flow_precision_index.ten_minutes] = "10min",
  [defines.flow_precision_index.one_hour] = "1h",
  [defines.flow_precision_index.ten_hours] = "10h",
  [defines.flow_precision_index.fifty_hours] = "50h",
  [defines.flow_precision_index.two_hundred_fifty_hours] = "250h",
  [defines.flow_precision_index.one_thousand_hours] = "1000h"
}
for surface_name, _ in pairs(game.surfaces) do
  local flowdata = game.forces.player.get_item_production_statistics(surface_name)
  for timescale_index, timescale_name in pairs(timescales) do
    local tbl = {}
    local totals = flowdata.input_counts
    for item_name, _ in pairs(totals) do
      local row = {item_name}
      for i = 1, 300 do
        table.insert(row, flowdata.get_flow_count{name=item_name, category="input", precision_index=timescale_index, sample_index=i, count=true})
      end
      table.insert(tbl, row)
    end
    helpers.write_file("stats-" .. surface_name .. "-" .. timescale_name .. ".json", helpers.table_to_json(tbl), false)
  end
end
game.player.print("Export done")

Command: Factorio Forum Source: User @Muche