Better Pumpjacks


Adds MK2 and MK3 pumpjacks with dedicated productivity research and circuit-controlled extraction modes. Use Conservation to slow well depletion or Overdrive to extract faster at higher power cost. Monitor fluid output across surfaces with a live dashboard and configurable low-output warnings. Supports Factorio 2.1, Space Age, and Space Exploration with Krastorio 2.

Utilities
3 days ago
2.0 - 2.1
958
Mining Fluids

Changelog

Version: 1.8.0
Date: 2026-11-04
  Features:
    - Added Conservation, Standard, and Overdrive extraction modes for MK2 and MK3 pumpjacks. Conservation slows extraction and well depletion over time. Overdrive increases extraction speed and operating power use.
    - Added circuit-controlled extraction modes with per-pumpjack signal pickers, a manual fallback, and Conservation priority when both signals are positive.
    - Added extraction settings copy and paste between MK2 and MK3 through Factorio's built-in entity settings controls.
    - Added a live Active Mode display to the extraction controls and the right-side entity info panel.
  Changes:
    - Open dashboards refresh output and warnings every five seconds while preserving threshold edits.
    - The dashboard and Surface Visibility windows close with Escape and remember their positions per player. Closing Surface Visibility returns focus to the dashboard.
  Bugfixes:
    - Refreshed dashboard controls when a surface is deleted or a player changes force. Preserved warning thresholds when forces merge.
    - Cloned pumpjacks inherit their extraction and circuit settings and receive the correct productivity bonus for their destination force.
Version: 1.7.0
Date: 2026-11-01
  Changes:
    - Added configurable quadratic research-cost growth with the default formula 1000 + (1000 * L) + (37.996 * L^2). Level 500 costs exactly 10000000 of each required science pack.
    - Shared the research-cost formula between initial technology definitions and Space Exploration final fixes. Set quadratic growth to 0 to restore linear costs.
    - Increased the default applied productivity research cap from level 50 to the maximum of 500.
    - Applied dedicated pumpjack research directly through local effects without replacing entities.
    - Removed hidden productivity prototypes, replacement and module-transfer code, and duplicate prototype-name scans.
    - Added JSON migrations for all 1500 legacy productivity variant names, mapping them to standard pumpjack tiers.
    - Preserved existing local effect fields during bonus updates and tracked the mod's contribution to avoid stacking on repeated refreshes. External mods overwriting local effects remain a known compatibility limitation.
    - Added automatic bonus synchronization after research reversal, force resets, and force merges.
    - Accounted for copied research bonuses when cloning pumpjacks across forces.
    - Updated descriptions and documentation for direct research effects. Regular miners remain unaffected.
    - Updated startup setting tooltips and README to describe the level-500 cap and quadratic research costs. Existing saved setting values are preserved.
  Bugfixes:
    - Counted completed finite staged research levels correctly.
Version: 1.6.1
Date: 2026-11-01
  Bugfixes:
    - Applied tier and research productivity through effect_receiver.base_effect.productivity, the Factorio 2.1 productivity field.
Version: 1.6.0
Date: 2026-11-01
  Changes:
    - Updated the required Factorio and base game version to 2.1.
    - Increased default MK2 base productivity to 30% and MK3 base productivity to 60%. Existing saved startup settings are preserved.
    - Removed the space science prerequisite from MK2 in the base-game branch; MK3 retains it. Space Age and Space Exploration gates are unchanged.
    - Improved startup setting descriptions for mining speed, pollution, productivity fractions, applied productivity caps, and research costs.
  Bugfixes:
    - Updated pumpjack recipes to use Factorio 2.1 recipe categories.
    - Fixed missing science requirements by recognizing science packs defined as items as well as tools.
    - Corrected the K2 optimization technology prerequisite and made it conditional on the technology existing.
    - Preserved pumpjack and module quality during productivity replacement, including spilled modules.
    - Replaced explicit entity destruction with fast replacement and restored modules to the original pumpjack when replacement returns no entity.
    - Preserved pending upgrades across forces and prevented duplicate queue entries. Refresh commands no longer clear other forces' tracking or pending work.
    - Kept saved fluid warning thresholds editable when their last producer is removed.
    - Retained all supported hidden productivity variants so lowering the applied level cap or disabling vanilla productivity does not remove placed pumpjacks on load.
    - Added tracking and queued productivity updates for cloned pumpjacks.
    - Stored surface preferences and warning thresholds by stable surface index, with automatic migration of existing settings and GUI refresh after surface renaming.
    - Added destruction notifications and one-time legacy cleanup for stale pumpjack tracking entries.
  
Version: 1.5.0
Date: 2026-06-20

  Features:
    - Added Better Pumpjacks dashboard with per-surface fluid/s estimates, pumpjack counts, average yield, and low-output warnings.
    - Added surface visibility manager to show/hide surfaces and assign custom display names in the dashboard.
    - Added configurable per-fluid low-output warning thresholds with chat notifications.
    - Added remote interface (better-pumpjacks) exposing dashboard stats, output thresholds, and threshold checks to other mods.
    - Added upgrade planner support: hidden productivity variants now carry next_upgrade so bots and the upgrade planner can promote them to the next tier.
    - Added placeable_by to hidden productivity variants so pressing Q on a placed pumpjack correctly returns the right item for ghost placement.

  Bugfixes:
    - Fixed silent module loss during pumpjack replacement: modules that cannot fit in the new entity are now spilled on the ground instead of deleted.
    - Fixed low-output warning crash when warning state storage contained a boolean instead of a tick number.
    - Fixed entity name cache functions being defined before the functions they reference, causing a nil call error when opening the dashboard.
    - Fixed entity name lists being rebuilt on every warning-check tick: names are now cached at first use since prototypes never change at runtime.

Version: 1.4.1
Date: 2026-06-14

  Bugfixes:
    - HOTFIX: Added /bpj-level command to print the current pumpjack productivity level and bonus.
    - HOTFIX: Fixed non-Space Exploration infinite productivity levels showing as level 0.
    - HOTFIX: Fixed pumpjack productivity level display after the first research level.
    - HOTFIX: Fixed staged productivity technologies counting one level too low.
    - HOTFIX: Fixed staged infinite productivity technology levels being counted incorrectly.
    - HOTFIX: Replaced research-time world scans with tracked pumpjack updates to reduce research-completion stutter.
    - HOTFIX: Added fallback registry rebuilding when existing saves have no tracked pumpjacks yet.
    - HOTFIX: Reduced pumpjack productivity replacement batch size to lower per-tick spikes.
    - HOTFIX: Removed fixed researched productivity values from item tooltips; placed entities still show applied productivity.

Version: 1.4.0
Date: 2026-06-14

  Features:
    - Added configurable pumpjack energy usage settings.
    - Added configurable pumpjack productivity research bonus setting.
    - Added configurable pumpjack productivity research cost settings.
    - Added configurable maximum pumpjack productivity level.
    - Added optional productivity research support for vanilla pumpjacks.
    - Updated pumpjack descriptions to reflect configured startup settings.
    - Updated pumpjack technology descriptions to reflect configured startup settings.
    - Added a chat message showing current pumpjack productivity after research completes.
    - Fixed migration scan crash when hidden productivity entity prototypes do not exist.

Version: 1.3.0
Date: 2026-06-06

  Features:
    - Fixed MK3 research prerequisite order.
    - Improved Space Age and Space Exploration science pack compatibility.
    - Added proper Optimization Tech Card prerequisite support for SE/K2.
    - Fixed Space Exploration postprocess changes affecting pumpjack productivity research costs.

Version: 1.2.1
Date: 2026-06-05

  Features:
    - Added Productivity research specific to pumpjacks.
    - Adjusted base productivity values.

Version: 1.0.0
Date: 2026-06-05

  Features:
    - Added Pumpjack MK2
    - Added Pumpjack MK3
    - Added Space Exploration support
    - Added Space Age support
    - Added K2 support