Export realtime game statistics to disk in JSON and other formats.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chksm 642ca71e2d Initial commit 2 years ago
public Initial commit 2 years ago
watcher Initial commit 2 years ago
README.md Initial commit 2 years ago
control.lua Initial commit 2 years ago
control.lua.v1 Initial commit 2 years ago
control.lua.v2 Initial commit 2 years ago
info.json Initial commit 2 years ago

README.md

Statorio

A statistics export plugin for Factorio. Choose which metrics and a frequency for exporting to JSON file on disk.

Also includes a Node JS script for moving the JSON into statsd or similar, and some custom dashboards for Netdata. Or roll your own stats directly from the JSON.

  • Game data
    • Cheat mode
  • Force (player and enemy) statistics
    • Mining
    • Fluids
    • Manufacturing
    • Building
    • Rocket launches
    • Kills and demolision
    • Current and previous research
    • Evolution
    • Modifiers
  • Surface (planet) statistics
    • Pollution
    • Wind
    • Time of day
    • Day/night cycles

Use cases

  • Graphs and dashboards
    • Bring a spare screen into your game with interesting graphs and metrics
    • Watch and publish the state of a multiplayer game
    • Use a graph or gauge as a source in OBS streams etc
  • Alerts from alarms
    • Strong attacks
    • Low power
    • Production problems
  • Custom applications
    • Chat bots
    • Feedback and control
    • IoT sillyness
    • Other variables and flags are included in the data
    • Its just JSON 🤷

Maybe one day this could be useful for tournaments, speed runs, and other game types.

Dependencies

On its own this mod will only output JSON data to disk, which only requires Factorio v1.1.x. You can consume the JSON data in your own applications for fun and profit.

To store data and generate a dashboard of graphs, anything that uses a statsd (or compatible) UDP network socket for receiving metrics will be compatible with the included Node script. I highly recommend Netdata which can run locally or on a separate computer, uses very little resource, and includes plenty of functionality and hackability, open source at no cost.

Using the mod

Install the mod (GUI)

Install the mod (headless server)

Configure the mod

Check JSON output

Using Netdata

Install Netdata

Install custom dashboards

Run the JSON parser