laser turret editor


allows you to edit laser turret properties

Content
a month ago
1.1
78

g Does not damage past range 24

a month ago

The beam does not damage past range 24 because of the way Factorio treats lasers. There is a parameter called "max_length" that must also be changed. If you increase the range but not the max_length, then the increased range will SEEM to work...the laser coverage will be larger, the laser turret will respond at a farther distance, the laser beam will shoot out farther...but there will be no damage done until the bugs are within max_length. To fix this, I added these lines to data.lua:
--laser length

local var4 = settings.startup["custom-laser-length"].value

data.raw["electric-turret"]["laser-turret"].attack_parameters.ammo_type.action.action_delivery.max_length = var4

In addition, add this to settings.lua:

-- laser turret length
data:extend({
{
type = "int-setting",
name = "custom-laser-length",
setting_type = "startup",
default_value = 24,
minimum_value = 5,
maximum_value = 1000

}
})

Oh...and I cleaned up locale.cfg with:

custom-laser-length=Laser Length

and...

custom-laser-length=This has to be set the same as range.\n\n[color=blue]Maximum:[/color] 1000\n[color=blue]Default:[/color] 24\n[color=blue]Minimum:[/color] 1

New response