Increase range of gun turret with code for BB special games

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply
MartinMaxKing
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sun Oct 09, 2022 12:47 pm
Contact:

Increase range of gun turret with code for BB special games

Post by MartinMaxKing »

I want to increase gun-turret range for Bitters Battles server multiplayer special games
But can't figure it out. Preferably increase gun turrets range by force, similar to increasing arty range that i have and it works:

Code: Select all

game.forces.north.artillery_range_modifier = 1
I want to increase range for all turrets that belongs to specific force.
Thank you.

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: Increase range of gun turret with code for BB special games

Post by Deadlock989 »

MartinMaxKing wrote:
Sat Dec 03, 2022 12:37 pm
I want to increase range for all turrets that belongs to specific force.
Thank you.
This can't be be done per force for non-artillery turrets. Turret range is part of their prototype (within the attack_parameters property) and it can't be changed after the data stage. If the turret fires projectiles then those projectiles also have a range which also needs to be changed which also cannot be done after the data stage. Those changes would then affect every turret of that type, and force wouldn't matter. Artillery turrets have a different prototype and get special treatment at runtime.
Image

MartinMaxKing
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sun Oct 09, 2022 12:47 pm
Contact:

Re: Increase range of gun turret with code for BB special games

Post by MartinMaxKing »

Thank You for your explanations, shame :(

Post Reply

Return to “Modding discussion”