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
Owner:
TDSrock
Source:
https://github.com/TDSrock/Factorio-R...
Homepage:
N/A
License:
MIT
Created:
a month ago
Latest Version:
1.0.0 (3 days ago)
Factorio version:
2.0 - 2.1
Downloaded by:
211 users

Range Tech

Research longer weapon ranges for supported vanilla and modded turrets. Turrets are grouped by ammo or damage type, so you can improve gun turrets, lasers, flamethrowers, and other weapons independently.

Requires Factorio 2.1 or later. Space Age is optional.

How it works

Each turret gets a category based on its ammo type or, if that is inconclusive, its damage type. Range Tech recognizes many modded ammo and damage types by name. Turrets that fit none of the known categories go into Other. You can override a turret’s category in the startup settings. Artillery is always ignored.

Category Examples
Bullet Gun turrets
Shotgun Modded shotgun-shell turrets
Cannon Modded cannon-shell turrets
Railgun Railgun turrets
Grenade Modded grenade and capsule turrets
Missile Rocket turrets
Flame Flamethrower turrets
Laser Laser turrets
Electric Tesla turrets
Cold Modded frost and cryo turrets
Acid Acid throwers and other acid or poison turrets
Support Medic turrets
Other Turrets that do not match another category
Ignored Artillery, repair turrets, and certain turrets controlled by other mods

Research is generated for categories with eligible turrets. Each category has five levels by default. Research starts with the science packs needed to unlock the category’s easiest turret and adds packs in later levels. Costs start at 100 science packs and grow by a factor of 1.5 per level by default.

Startup settings

  • Preset gives all categories +10% of base range per level with Percent, or +3 tiles per level with Flat tiles. Choose Custom to configure levels, bonus type, and bonus amount per category, plus research cost and time.
  • Category overrides moves individual turrets between categories. For example, gun-turret=laser; some-modded-turret=ignored. Use the category names in the table in lowercase. Artillery cannot be reassigned.
  • Technology icons uses matching damage-research icons where available, with turret unlock and category icons as fallbacks. Choose Built-in to restrict the icon art to Factorio’s own assets.

Turrets placed by scripts

Turrets built by players or bots upgrade immediately. The same applies to scripts that raise a build event. For scripts that place turrets without raising one, Range Tech runs a periodic sweep in batches.

  • Upgrade sweep interval sets the time between batches. The default is 10 seconds. Set it to 0 to disable the sweep.
  • Upgrade sweep chunks per event caps each batch at 128 map chunks by default. A lower limit reduces the work done at each event and takes longer to cover the map.

Quality and blueprints

Upgrades preserve turret quality, ammo, fluid, health, kill counts, and target priorities. Quality bonuses still apply to the upgraded turret.

You build and mine the original turret item. Range Tech rewrites its turret variants to their original names in blueprints so those blueprints can be used with or without the mod.

Commands

/range-tech shows the installed version and a short description.
/range-tech help or /range-tech ? lists the available actions.
/range-tech report (or /rangetech) shows your research level per category and writes the full details to script-output/range-tech-report.txt in your Factorio user data folder: settings, every category with its turrets, base range and range per level, why each turret is in its category, why ignored turrets are ignored, the research plan (units, time, science packs per level) and warnings.
/range-tech disable (or /range-tech-prep-uninstall) restores the original turrets and pauses upgrades. Admin only.
/range-tech enable (or /range-tech-resume) reapplies researched bonuses and resumes upgrades. Admin only.

Removing the mod

Upgraded turrets use Range Tech prototypes. Factorio removes those entities when it loads a save without the mod.

  1. With Range Tech still enabled, run /range-tech disable as an admin.
  2. Save the game.
  3. Disable or remove Range Tech, then load the prepared save.

Mod compatibility

Range Tech upgrades turrets by swapping the placed entity for a longer-range variant. Some scripted turrets, including certain Additional Turrets models and Universal Turret, manage their own weapons or entities and are ignored. Use /range-tech to check how a turret was classified and why.

Other mods may see an upgraded turret’s variant name. Turret changes applied after Range Tech in the data stage may also require a load-order adjustment.