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

i Recommend set [Upgrade sweep interval] default to 0

6 days ago

I experienced huge lag every 10s, then I found it is caused by this mod. Set [Upgrade sweep interval] to 0 fixed the lag.
The sweep is very expensive in my save and will cause the game to stuck for about 1s.
BTW your implementation of turrend replacing will cause all the turrents disappear when I try to remove this mod from my save.

4 days ago
(updated 4 days ago)

Thats why the mod ships with settings to alter and commands to undo/disable the mod and vice versa. Your turrets are safe. I went out of my way to make them as safe as I can.

The respective commands:
/range-tech-prep-uninstall and /range-tech-resume
Sadly there is NO other way to give turrets more range then replacing them with a different prototype.

Removing the sweep fully has one side-effect. There are a few rare ways in which uninteded towers can be built (mainly through commands, maybe mods like recursive blueprints too, not sure). If you ever spot a turret that is missing the range-tech. The sweep would have fixed that. I'll look into optmizing the sweep behavior to be more kind to saves with tons of turrets. I assume you have thousands upon thousands in your save?

4 days ago

Thanks for the explanation.
Currently I have 5k+ turrets in my save, along with 30 planets, not sure which part is more related to the lag.
Thanks to your command I have restored my turrets.

3 days ago
(updated 3 days ago)

My save has more turrets but I don't have issues with the sweep (yet). However I did re-do the sweep logic to instead process chunks at a time and stop. Makes it on large saves slower, but its more of a fallback anyway to cover super rare-cases. It shouldn't ever be the source of ups issues.

The new sweep spreads the work across multiple timer events. That should reduce the periodic hitch, though a full pass will take longer on large saves. If you still see a spike after updating, lowering Upgrade sweep chunks per event will reduce the work each batch does.

New response