Mining Telemetry

by utoxin

Adds new circuit network signals to miners and resource extractors (like pumpjacks) to enable advanced circuit network logic and monitoring.

Utilities
a month ago
2.0
261
Mining Circuit network

Changelog

Version: 1.2.0
Date: 2025-11-11
  Features:
    - Added intelligent handling for infinite resources (like crude oil and modded infinite ores)
    - Infinite resources now output production rate in items per minute instead of meaningless remaining count
    - Added "Rate Indicator Signal" global setting (defaults to "R") that outputs when showing production rates
    - Mixed resource patches (finite + infinite) intelligently prioritize finite counts, then switch to rate when depleted
    - Multiple resource types in mining area are now properly handled with separate signals for each type
  Changes:
    - Infinite resources (like crude oil) never trigger the "no resources" signal
    - Entity counter always outputs for infinite resources, even with "disable when depleted" setting enabled
    - Effective resources now scans entire patch for accurate totals
    - Added circuit signal value clamping to prevent overflow on massive resource patches (max: 2.1 billion)
  Bugfixes:
    - Fixed copy/paste not properly removing combinator when pasting settings with all signals disabled
    - Fixed missing paste sound effect when pasting entity settings
    - Fixed crash when outputting fluid signals (crude oil, etc.) - now properly detects fluids vs items
    - Fixed multiple API compatibility issues with Factorio 2.0 (prototypes.fluid, prototypes.entity)
    - Fixed productivity and resource drain modifier calculations not being applied to effective resources
    - Fixed circuit signal overflow crash when calculated values exceed 32-bit integer limits
Version: 1.1.0
Date: 2025-11-09
  Features:
    - Added "Effective resources" signal: Outputs the total effective resources in the entire patch, accounting for mining productivity bonuses and resource drain modifiers
    - Added global setting "Disable entity counter when depleted": When enabled, the entity counter signal stops outputting when the miner has no resources, providing an alternative to the "no resources" signal
  Changes:
    - Effective resources calculation uses the drill's native resource reading for improved performance
    - Effective resources signal uses the resource item icon (e.g., iron-ore) as the signal type
    - Improved "no resources" detection to scan the entire mining area instead of just the current mining target
  Bugfixes:
    - Fixed false "no resources" signals being emitted when the drill still has accessible resources
    - Fixed migration issues when loading saves from older versions
    - Added safe fallbacks for missing settings when upgrading from older versions
Version: 1.0.0
Date: 2025-11-09
  Features:
    - Added "Entity counter" signal: Outputs a signal with the mining drill's icon and value of 1, useful for counting miners on a circuit network
    - Added "No resources" signal: Outputs a configurable signal (defaults to "N") when a mining drill has no resources to extract
    - Per-entity configuration GUI integrated into the mining drill interface
    - Global mod setting to configure the default "no resources" signal
    - Per-entity override for the "no resources" signal
    - Both signals are toggleable and default to off
    - Automatic wire synchronization when circuit connections are added or removed
    - Blueprint support: Settings are saved in blueprints when creating them
    - Copy/paste support: Settings can be copied between mining drills using Shift+Right-Click / Shift+Left-Click
  Known Issues:
    - Placing a blueprint over existing mining drills does not transfer settings from the blueprint to the existing entities. This is a Factorio API limitation. Use copy/paste or let the blueprint deconstruct and rebuild as workarounds.
  Info:
    - Initial release