As seen here:
https://github.com/ReikaKalseki/Reika_F ... /issues/91
Bilka seems to think this is a bug in the base game:
Bonus GUI not grouping some turret types
Re: Bonus GUI not grouping some turret types
Thanks for the report however that's working as intended.
Ammo bonuses stack up all of the different entities that use that ammo type. Turret bonuses only apply to a specific entity so it shows that specific entity. You appear to be using the turret bonus instead of the ammo bonus.
https://lua-api.factorio.com/latest/Lua ... e_modifier
vs
https://lua-api.factorio.com/latest/Lua ... k_modifier
Ammo bonuses stack up all of the different entities that use that ammo type. Turret bonuses only apply to a specific entity so it shows that specific entity. You appear to be using the turret bonus instead of the ammo bonus.
https://lua-api.factorio.com/latest/Lua ... e_modifier
vs
https://lua-api.factorio.com/latest/Lua ... k_modifier
If you want to get ahold of me I'm almost always on Discord.
Re: Bonus GUI not grouping some turret types
I am table.deepcopy'ing the effects from the vanilla gun/laser turret damage technologies, though; why does it only half-work (ie only splits the gun-type ones)?Rseding91 wrote:Thanks for the report however that's working as intended.
Ammo bonuses stack up all of the different entities that use that ammo type. Turret bonuses only apply to a specific entity so it shows that specific entity. You appear to be using the turret bonus instead of the ammo bonus.
https://lua-api.factorio.com/latest/Lua ... e_modifier
vs
https://lua-api.factorio.com/latest/Lua ... k_modifier
Code: Select all
for _,tech in pairs(data.raw.technology) do
if tech.effects then
local effectsToAdd = {}
for _,effect in pairs(tech.effects) do
if effect.type == "turret-attack" and effect.turret_id then
local base = data.raw["ammo-turret"][effect.turret_id]
if not base then
base = data.raw["fluid-turret"][effect.turret_id]
end
if not base then
base = data.raw["electric-turret"][effect.turret_id]
end
if not base then
base = data.raw["artillery-turret"][effect.turret_id]
end
if not base then
base = data.raw["artillery-wagon"][effect.turret_id]
end
if not base then Config.error("Tech " .. tech.name .. " set to boost turret '" .. effect.turret_id .. "', which does not exist! This is a bug in that mod!") end
if base then
if shouldCreateRangeTurret(base) then
for i=1,10 do
local effectcp = table.deepcopy(effect)--{type="turret-attack", turret_id=base.name .. "-rangeboost-" .. i, modifier=effect.modifier}
effectcp.turret_id = base.name .. "-rangeboost-" .. i
effectcp.effect_key = {"modifier-description." .. effect.turret_id .. "-attack-bonus"}
table.insert(effectsToAdd, effectcp)
end
end
end
end
end
for _,effect in pairs(effectsToAdd) do
table.insert(tech.effects, effect)
end
end
end
Re: Bonus GUI not grouping some turret types
Because gun turrets use that damage bonus system and laser turrets don't.
If you want to get ahold of me I'm almost always on Discord.
Re: Bonus GUI not grouping some turret types
Does that mean I cannot make the "gun turret" damage upgrades affect all the rangeboost ones directly, without having them be marked separately?Rseding91 wrote:Because gun turrets use that damage bonus system and laser turrets don't.
Re: Bonus GUI not grouping some turret types
If you use the turret_damage system yes.Reika wrote:Does that mean I cannot make the "gun turret" damage upgrades affect all the rangeboost ones directly, without having them be marked separately?Rseding91 wrote:Because gun turrets use that damage bonus system and laser turrets don't.
If you want to get ahold of me I'm almost always on Discord.