Page 1 of 1
Request minimize turret mod
Posted: Mon May 23, 2016 7:37 pm
by Nebbeh
I have tried to search and google to the best of my abillites but I could not find a mod for this. Is anyone here able to make a small mod just to minimize turrets to 1x1? No other changes just the size?
Would be super appreciated!
Re: Request minimize turret mod
Posted: Mon May 23, 2016 8:11 pm
by prg
Code: Select all
for _, turret in pairs({{"ammo-turret", "gun-turret"}, {"electric-turret", "laser-turret"}}) do
local t = data.raw[turret[1]][turret[2]]
t.collision_box = {{-.45, -.45}, {.45, .45}}
t.selection_box = {{-.5, -.5}, {.5, .5}}
for _, img in pairs({"folded_animation", "preparing_animation", "prepared_animation", "attacking_animation", "folding_animation", "base_picture"}) do
if t[img] then
for _, layer in pairs(t[img].layers) do
layer.scale = .5
layer.shift[2] = layer.shift[2]/2
end
end
end
end
if you don't mind the hovering shadows.
Re: Request minimize turret mod
Posted: Mon May 23, 2016 8:27 pm
by Nebbeh
prg wrote:Code: Select all
for _, turret in pairs({{"ammo-turret", "gun-turret"}, {"electric-turret", "laser-turret"}}) do
local t = data.raw[turret[1]][turret[2]]
t.collision_box = {{-.45, -.45}, {.45, .45}}
t.selection_box = {{-.5, -.5}, {.5, .5}}
for _, img in pairs({"folded_animation", "preparing_animation", "prepared_animation", "attacking_animation", "folding_animation", "base_picture"}) do
if t[img] then
for _, layer in pairs(t[img].layers) do
layer.scale = .5
layer.shift[2] = layer.shift[2]/2
end
end
end
end
if you don't mind the hovering shadows.
Well that doesnt matter, tho what do I do with this?

Re: Request minimize turret mod
Posted: Mon May 23, 2016 8:41 pm
by prg
Throw it into a data-updates.lua alongside a valid
info.json in the proper
directory structure.
Re: Request minimize turret mod
Posted: Mon May 23, 2016 10:07 pm
by Nebbeh
Ok, I tried my best without luck, could you or someone have a look at it?
Re: Request minimize turret mod
Posted: Mon May 23, 2016 10:25 pm
by prg
It works with a properly named data-updates.lua (instead of data-update.lua)
Re: Request minimize turret mod
Posted: Mon May 23, 2016 10:27 pm
by Nebbeh
Oh such a small mistake. Thanks for the help prg!