Page 1 of 1

[suggestion]Add "gun-range" modifier to research modifier prototypes

Posted: Mon Mar 21, 2022 9:42 am
by x2605
TL;DR
Please add "gun-range" modifier prototype to https://wiki.factorio.com/Types/ModifierPrototype
What ?
Which allows making mods about increasing weapon/turret ranges during game via researching.
Why ?
Why not?
There is damage upgrade exists.
There is speed upgrade exists.
Why is there no range upgrade exists?

Re: [suggestion]Add "gun-range" modifier to research modifier prototypes

Posted: Tue Mar 22, 2022 12:55 am
by ssilk
moved from suggestions to modding interface requests

Re: [suggestion]Add "gun-range" modifier to research modifier prototypes

Posted: Sun Mar 27, 2022 2:40 pm
by Rseding91
This isn't likely to ever be implemented due to how turret mechanics work in the game.

Turrets turn themselves off unless there is an enemy within their shooting area rounded up to the nearest chunk. As enemies move around they 'turn on' nearby turrets based off the maximum turret range in the game. This means the range is calculated at startup and doesn't support changing runtime.

Re: [suggestion]Add "gun-range" modifier to research modifier prototypes

Posted: Sun Mar 27, 2022 9:04 pm
by Xorimuth
Rseding91 wrote: Sun Mar 27, 2022 2:40 pm This isn't likely to ever be implemented due to how turret mechanics work in the game.

Turrets turn themselves off unless there is an enemy within their shooting area rounded up to the nearest chunk. As enemies move around they 'turn on' nearby turrets based off the maximum turret range in the game. This means the range is calculated at startup and doesn't support changing runtime.
Is that why artillery range can change at runtime then? Because they only target static entities, which don't move around?

Re: [suggestion]Add "gun-range" modifier to research modifier prototypes

Posted: Sun Mar 27, 2022 11:02 pm
by Rseding91
Xorimuth wrote: Sun Mar 27, 2022 9:04 pm
Rseding91 wrote: Sun Mar 27, 2022 2:40 pm This isn't likely to ever be implemented due to how turret mechanics work in the game.

Turrets turn themselves off unless there is an enemy within their shooting area rounded up to the nearest chunk. As enemies move around they 'turn on' nearby turrets based off the maximum turret range in the game. This means the range is calculated at startup and doesn't support changing runtime.
Is that why artillery range can change at runtime then? Because they only target static entities, which don't move around?
Artillery never goes inactive and so actively scans around itself when trying to shoot. So it can just change the range it wants to shoot and it will next time it updates shoot a bigger area.

Re: [suggestion]Add "gun-range" modifier to research modifier prototypes

Posted: Sun Mar 27, 2022 11:19 pm
by blahfasel2000
How about adding a "max-bonus" field to the modifier prototype that is mandatory for type "gun-range"? This wouldn't allow infinite research like with artillery range, but at least a fixed number of range research levels would be possible while still keeping the ability to calculate the max range at startup.

Re: [suggestion]Add "gun-range" modifier to research modifier prototypes

Posted: Sun Mar 27, 2022 11:31 pm
by x2605
Bad news. I wanted the developers to pay more attention to what Factorio should become as a game, but the developers seem to see Factorio as a finished program.

Re: [suggestion]Add "gun-range" modifier to research modifier prototypes

Posted: Mon Mar 28, 2022 7:06 am
by blahfasel2000
x2605 wrote: Sun Mar 27, 2022 11:31 pm Bad news. I wanted the developers to pay more attention to what Factorio should become as a game, but the developers seem to see Factorio as a finished program.
No, they are looking at the big picture. As Rseding91 pointed out implementing your suggestion would mean losing a very important optimization (remember that worms are turrets internally as well, it's not just the player's turrets!) which would likely come at a significant UPS cost. And because it's a fundamental engine change that price would have to be payed by everyone while only a few niche mod use cases would benefit from it.

Re: [suggestion]Add "gun-range" modifier to research modifier prototypes

Posted: Mon Mar 28, 2022 8:30 am
by x2605
blahfasel2000 wrote: Mon Mar 28, 2022 7:06 am
x2605 wrote: Sun Mar 27, 2022 11:31 pm Bad news. I wanted the developers to pay more attention to what Factorio should become as a game, but the developers seem to see Factorio as a finished program.
No, they are looking at the big picture. As Rseding91 pointed out implementing your suggestion would mean losing a very important optimization (remember that worms are turrets internally as well, it's not just the player's turrets!) which would likely come at a significant UPS cost. And because it's a fundamental engine change that price would have to be payed by everyone while only a few niche mod use cases would benefit from it.
Thanks for the explanation. I will respect the opinions of the developers. UPS is important. Now I agree.