Range Tech

by TDSrock

Range research for every turret, grouped into categories by ammo or damage type. Works with quality turrets and modded turrets, with configurable levels, costs and presets.

Tweaks
13 days ago
2.0 - 2.1
577
Combat

Changelog

Version: 1.0.3
Date: 18. 11. 2026
  Bugfixes:
    - Fixed turrets losing deconstruction orders, upgrade orders, pending item requests (for example ammo from a blueprint) and the destructible, minable, operable and active flags when a range upgrade replaced them.
    - Fixed turret ghosts keeping an outdated range variant. Ghosts are now recreated at the researched level whenever range research changes, so they build the correct turret.
    - The disable command (/range-tech-prep-uninstall) now also restores turret ghosts, and the restore and resume messages count them, so no ghosts vanish when the variants are removed."
    - Fixed a compatibility issue with Integrated Orbital Strike System where its orbital kinetic bombarders were treated as turrets, replaced by range variants and stopped working.
  Compatibility:
    - Turrets without a range (fired by script, for example orbital weapons) are now ignored. Integrated Orbital Strike System is listed as not compatible, with the reason shown in the report and log. If you already researched a range upgrade with this mod in a save, run /range-tech disable before updating.
Version: 1.0.2
Date: 15. 11. 2026
  Bugfixes:
    - Fixed turrets that use ammo losing the damage bonus from technologies after a range upgrade. The turret damage effects of technologies are now also applied to the hidden range variants of each turret.
Version: 1.0.1
Date: 12. 11. 2026
  Features:
    - Add Conservative (+25% over 5 levels), Long range (+100% over 5 levels), and Gradual (+50% over 10 levels) presets.
    - Add an Expensive preset with the default Percent bonuses, a starting cost of 500 science units, and 2x cost growth per level.
  Ease of use:
    - Add individual tooltips explaining each preset's range bonuses, research levels, and costs.
Version: 1.0.0
Date: 07. 11. 2026
  Features:
    - Add version and help to /range-tech, with report, disable, and enable actions. Existing standalone commands remain available as aliases.
  Ease of use:
    - Report the number of turrets changed when range research completes or is reversed.
    - Verify that upgraded turrets have been restored before advising players to save for a startup setting change or mod removal.
Version: 0.1.3
Date: 07. 11. 2026
  Graphics:
    - Add a Range Tech mod thumbnail.
  Optimizations:
    - Split the periodic turret upgrade sweep into batches to reduce lag spikes on large saves.
      The new "Upgrade sweep chunks per event" setting caps each batch at 128 map chunks by default.
      The existing "Upgrade sweep interval" setting controls the time between batches
      (10 seconds by default, 0 disables the sweep).
Version: 0.1.2
Date: 23. 10. 2026
  Bugfixes:
    - Fixed a mod compatibility issue where generated turret variants could reference a turret removed by another mod, preventing the game from loading.
    - Added hidden optional dependencies for K2 arsenal to improve load order consistency.
Version: 0.1.1
Date: 22. 10. 2026
  Features:
    - Every range research now shows the small range symbol that vanilla puts on the artillery range research. The symbol is read from vanilla itself, so no image path is hardcoded. An own symbol can be added as graphics/range-overlay.png (128x128, transparent PNG) and enabled in lib/icons.lua.
    - New startup setting "Technology icons": Auto reuses the icon of the technology that unlocks the turret (checked for obvious problems, with a vanilla icon as fallback), Built-in only uses vanilla icons.
    - /range-tech (or /rangetech) shows your research per category and writes a full report (settings, turrets per category with ranges per level and the reason for their category, why ignored turrets are ignored, the research plan) to script-output/range-tech-report.txt.
    - Turrets that a script places without raising a build event are now upgraded by a periodic sweep. New runtime setting "Upgrade sweep interval" (default 10 seconds, 0 = off).
    - /range-tech-prep-uninstall turns every turret back into its normal version and pauses upgrades, also after saving and loading. Run it before removing the mod. /range-tech-resume turns upgrades back on and upgrades every turret that is not at its research level yet. These replace /rangetech-revert and /rangetech-resume.
    - Enhanced the turret type inference system to also check odd ammo types (looking at you Laser Mk2 with your lenses)
    - Range research icons now prioritize matching vanilla damage-upgrade technologies where available, then scan for technologies with relevant damage bonuses (including modded technologies), before falling back to turret unlock or category icons. The range overlay remains unchanged.
  Bugfixes:
    - Changed the logic for using fallback icons so it should happen less often.
  Compatibility:
    - Updated for Factorio 2.1. Fluid turrets keep their fluid when upgraded through the new 2.1 fluid functions (2.0 is still handled), and science packs, which are plain items in 2.1, are found for the research costs.
Version: 0.1.0
Date: 21. 10. 2026
  Bugfixes:
    - Fixed a crash while loading caused by the research icons. The icon of the technology that unlocks a turret was copied without its icon size, so the game tried to draw a small image at a much larger size. Icons are now copied with their size, and anything doubtful falls back to a vanilla icon.
Version: 0.0.1
Date: 17. 10. 2026
  Features:
    - Range research for turrets, grouped into categories (bullet, shotgun, cannon, railgun, grenade, missile, flame, laser, electric, cold, acid, support, other) by ammo type, falling back to damage type. Modded ammo categories and damage types are recognised by name, and every decision is logged with its reason.
    - Works with modded turrets (all ammo, electric and fluid turrets are detected automatically) and keeps the quality of upgraded turrets.
    - Artillery turrets are ignored by default, as are turrets that are not compatible with this mod (such as the scripted turrets of Additional Turrets), with the reason shown. Any turret can be moved to another category or to "ignored" with a startup setting.
    - Configurable number of levels, cost growth, research time, and flat or percentage range bonus per category.
    - Presets: all percentage, all flat, or custom.
    - Blueprints are always rewritten to the normal turret names, so they work with and without the mod.
    - /rangetech lists the turrets per category and your research progress.
    - /rangetech-revert turns every turret back into its normal version (run it before removing the mod), /rangetech-resume turns range upgrades back on.