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
3 days ago
2.0 - 2.1
211
Combat

Changelog

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.