Page 1 of 1
Change image of tiles
Posted: Tue Nov 17, 2020 5:31 pm
by patfre
So i know how to change the image of items.
Code: Select all
item.icons = {
{
icon=image,
tint={r=1,g=0,b=0,a=1}
}
}
What i want to know is how do you do the same to a tile?
I don't know if it is possible so that is why i am asking
Re: Change image of tiles
Posted: Tue Nov 17, 2020 8:08 pm
by darkfrei
I use the
info-mod to find such prototype definitions:
Code: Select all
data.raw.tile.water.variants.main[1].tint={r=1,g=0,b=0,a=1}
data.raw.tile.water.variants.main[1].hr_version.tint={r=1,g=0,b=0,a=1}
data.raw.tile.water.variants.main[2].tint={r=1,g=0,b=0,a=1}
data.raw.tile.water.variants.main[2].hr_version.tint={r=1,g=0,b=0,a=1}
data.raw.tile.water.variants.main[3].tint={r=1,g=0,b=0,a=1}
data.raw.tile.water.variants.main[3].hr_version.tint={r=1,g=0,b=0,a=1}
And all transitions:
Re: Change image of tiles
Posted: Tue Nov 17, 2020 8:13 pm
by darkfrei
Actually, it can be tinted as deep tint function:
Code: Select all
function deep_tint (tabl, tint)
for i, v in pairs (tabl) do
if type (v) == "table" then
deep_tint (v, tint)
end
end
if tabl.picture then
tabl.tint = tint
end
end
-- call the deep tint function:
deep_tint (data.raw.tile.water, {r=1,g=0,b=0,a=1})
Re: Change image of tiles
Posted: Tue Nov 17, 2020 8:53 pm
by patfre
So i just looked the above posts but non of them work.
Also i forgot to mention that i want to change water into the void so that water looks like the void but still functions as water.
Re: Change image of tiles
Posted: Wed Nov 18, 2020 6:35 am
by darkfrei
patfre wrote: Tue Nov 17, 2020 8:53 pm
So i just looked the above posts but non of them work.
Also i forgot to mention that i want to change water into the void so that water looks like the void but still functions as water.
It works, but makes no difference. Probably all pictures must be grayscale, not colored before tint.
UPD:
data.raw.tile.water.effect = nil
Try to take all graphics from out-of-map tiles, they are pretty void.
Code: Select all
data.raw.tile.water.effect = nil
data.raw.tile.water.variants = data.raw.tile["out-of-map"].variants
data.raw.tile.water.transitions = nil
data.raw.tile.deepwater.effect = nil
data.raw.tile.deepwater.variants = data.raw.tile["out-of-map"].variants
data.raw.tile.deepwater.transitions = nil