Ghost Bot Tracker & Motivator

by xaerie

Provides real-time feedback on construction bots heading to build ghosts and adds a late-game tool to boost them.

Utilities
8 days ago
2.0
69
Logistic network

Changelog

Version: 0.10.2
Date: 2026-01-03
  Bugfixes:
    - Fixed ETA hover not displaying when hovering over machines with ghost module requests (item-request-proxy entities).
Version: 0.10.1
Date: 2025-12-24
  Features:
    - Improved spark feedback: Shows "No bots found" if spark expires without motivating any bots.
    - Improved spark feedback: Shows "Bot is recharging" if target bot is charging with no alternatives.
    - Improved spark feedback: Shows cooldown timer when attempting to fire during cooldown.
    - Visual feedback: Spark now shows waiting animation when bot is charging or at destination.
Version: 0.10.0
Date: 2025-12-23
  Features:
    - Module delivery support: Item-request-proxy entities (ghost modules in machines) are now valid targets for ETA display and spark motivation.
    - Sparks can now chain to module delivery requests alongside ghosts, deconstruction, and upgrade targets.
    - ETA display shows "Module" phase when a bot is delivering modules to a machine.
Version: 0.9.0
Date: 2025-12-22
  Features:
    - Upgrade planner support: Entities marked for upgrade are now valid targets for ETA display and spark motivation.
    - Sparks can now chain to upgrade targets alongside ghosts and deconstruction targets.
Version: 0.8.0
Date: 2025-12-21
  Features:
    - Improved spark targeting: Sparks no longer require precise mouse placement over ghosts. If mouse isn't directly over a valid target, the spark will find the closest ghost or deconstruction target within 15 tiles.
Version: 0.7.5
Date: 2025-12-21
  Changes:
    - Changed spark activation sound from "wire_connect_pole" to "armor_insert" for a more satisfying electrical effect.
    - Spark-to-bot energy transfer is now 100% efficient (no longer quality-dependent).
    - Bots are now teleported to 3 tiles away from their destination (safety buffer) instead of directly on top.
    - BALANCE: Reduced spark action costs (JUMP: 100kJ→10kJ, TELEPORT_OVERHEAD: 10kJ→1kJ, per-tile: 5kJ→1kJ).
    - BALANCE: Bot recharge now only triggers when bot is below 25% capacity (was unconditional).
  Bugfixes:
    - Fixed bots arriving at ghost destinations with minimal energy. Teleported bots are now recharged to 50% capacity when low.
    - Fixed lag caused by sparks jumping every tick when bots were within safety buffer distance.
    - Fixed sparks motivating bots that are actively recharging at roboports, which left them stuck in a "waiting to charge" state.
Version: 0.7.3
Date: 2025-12-20
  Bugfixes:
    - Fixed critical bug where firing the Motivator drained energy from other grid equipment (roboports, batteries) instead of only from the Motivator equipment itself.
Version: 0.7.2
Date: 2025-12-20
  Changes:
    - MAJOR: Replaced abstract "jolts" with Joule-based energy economy for sparks.
    - Spark energy now based on quality: 7 MJ (Normal) to 37 MJ (Legendary) using formula floor(5 * 1.5^q).
    - Conversion efficiency based on quality: 50% (Normal) to 90% (Legendary).
    - Efficiency applies at spark creation (spark starts with spark_energy * efficiency).
    - Jump cost: 100 kJ. Teleport overhead: 10 kJ. Teleport cost: 1 kJ per tile.
  Bugfixes:
    - Fixed ENERGY_PER_TILE being 1000x too high (was 1 MJ/tile, now 1 kJ/tile).
    - Fixed sparks staying on bots that have arrived at destination - now jumps to next target.
    - Fixed nil energy crash when processing legacy sparks.
    - Fixed sparks jumping away from claimed ghosts (short TTL for negative cache).
    - Added dynamic bot recharging: bots receive enough energy to reach destination.
Version: 0.7.1
Date: 2025-12-17
  Features:
    - **Enhanced Tooltips**: Added explicit "Range" and "Cooldown" stats to the Motivator item tooltip.
Version: 0.7.0
Date: 2025-12-14
  Features:
    - Adjusted Motivator teleport distance to be dynamic based on bot speed (Robot Speed Technology + Quality).
    - Base teleport is ~4 tiles, scaling up to 100 tiles max.
  Changes:
    - Removed "Electrotherapeutic Motivation" research upgrades (effectiveness) to reduce clutter.
    - Updated teleport logic to use 70x effective speed as distance.
Version: 0.6.5
Date: 2025-12-14

  Features:
    - **Performance Optimization**: Comprehensive refactor of internal modules (`eta_calculator`, `bot_finder`, `motivator`) for better performance and maintainability.
    - **Modded Support**: Motivator equipment now supports modded quality tiers above Legendary with custom scaling logic.
  Bugfixes:
    - Fixed `run_tests_headless.sh` syntax errors and log file detection for Mac/Linux environments.
    - Fixed crash in `eta_calculator` when accessing missing prototype properties.
    - Fixed crash in `gui.lua` related to `rendering` object validation.
    - Fixed stale globals `timeframe` and `alpha` persisting in save files.
Version: 0.6.4
Date: 2025-12-10

  Features:
    - **Deconstruction UI**: ETA display now explicitly labels deconstruction tasks as "Deconstruct" instead of "Build".
    - **Tracker Improvements**: Improved handling and visualization for deconstruction targets in the ETA tracker.
Version: 0.6.3
Date: 2025-12-09

  Features:
    - **Deconstruction Support**: Motivator can now target entities marked for deconstruction directly.
    - **Prioritized Searching**: Sparks now prioritize jumping to nearby entities marked for deconstruction before targeting ghosts, helping clear debris blocking construction.
Version: 0.6.2
Date: 2025-12-08

  Features:
    - **Bot Reliability Improvements**:
      - **Recharge**: Bots now receive 5kJ of energy when teleported to prevent depletion mid-task.
      - **Verification**: Cached bots are re-verified every 30 ticks to ensure they haven't changed targets (fixes sticky sparks).
      - **Timeout**: Sparks now automatically jump to a new ghost if stuck for more than 3 seconds.
Version: 0.6.1
Date: 2025-12-08

  Bugfixes:
    - Fixed duplicate statistics display in Factoriopedia by moving stat definitions to the Item prototype.
    - Removed unused "Max Output" statistic from Motivator tooltip.
    - Removed redundant shortcut tool button (hotkey functionality preserved).
Version: 0.6.0
Date: 08. 12. 2025
  Breaking Changes:
    - Removed "Motivator Gun" and "Motivator Ammo" items entirely.
    - Removed grenade/capsule prototype experiments.
    - Changed "Electrotherapeutic Motivator" equipment type to **Battery Equipment**.
  Features:
    - **Spark Mechanic**: Activate via **CTRL+M** (or shortcut) while hovering a ghost.
    - **Quality Scaling**: Sparks become more powerful and efficient with higher quality equipment.
      - **Jolts**: Scale up to +150% (Legendary).
      - **Efficiency**: Capacity (+150%) scales faster than Cost (+80%), allowing more shots per charge.
    - **Custom Stats UI**: Equipment tooltip now displays native-looking blue stats for **Jolts**, **Max Sparks**, and **Energy Cost**.
    - **Visuals & Audio**: Added dedicated sound effects and visual "spark explosion" on activation.
    - **Battery Integration**: Motivator now acts as a 50MJ battery (scales with quality) to power itself.
  Changes:
    - Renamed internal module `motivator_gun` to `motivator_spark`.
    - Removed `movement_bonus` (set to 0%) to prevent UI clutter.
    - Added comprehensive headless test suite for spark logic.
Version: 0.5.1
Date: 03. 12. 2025
  Bugfixes:
    - Fixed infinite chaining bug in motivator gun effect causing lag.
    - Fixed motivator teleporting bots to ghosts before they picked up items.
    - Added missing friendly names for motivator gun and ammo.
    - Updated motivator battery recipe to use copper cables instead of batteries.
Version: 0.5.0
Date: 03. 12. 2025
  Features:
    - Added "Electrotherapeutic Motivator" gun:
      - Implemented new "Tesla" beam mechanic with chain-lightning visuals.
      - Added Area-of-Effect (AOE) motivation along the beam path.
      - Integrated native beam rendering with robust script-driven hit detection.
      - Added dynamic asset loading to support Space Age Tesla Turret visuals while maintaining vanilla compatibility.
    - Performance & Logic Improvements:
      - Implemented TTL caching for bot searches to improve performance.
      - Fixed infinite chaining bug on unclaimed ghosts.
Version: 0.4.1
Date: 27. 11. 2025
  Features:
    - Added debug overlay setting for diagnosing performance issues.
Version: 0.4.0
Date: 25. 11. 2025
  Features:
    - Refactored code for better performance.
Version: 0.3.1
Date: 24. 11. 2025
  Features:
    - Added new icons.
Version: 0.3.0
Date: 23. 11. 2025
  Features:
    - Added a shortcut button and hotkey (CTRL + SHIFT + M) to toggle the Ghost Hover ETA effect.
    - Added "Electrotherapeutic Motivator" description to mod info.
Version: 0.2.2
Date: 23. 11. 2025
  Features:
    - Build changes.
Version: 0.2.1
Date: 23. 11. 2025
  Features:
    - Restructured mod.
Version: 0.2.0
Date: 21. 11. 2025
  Features:
    - Implemented motivator equipment.
Version: 0.1.0
Date: 20. 11. 2025
  Features:
    - Initial release.