Page 1 of 1
Trying to change a mod tech icon to a HD version
Posted: Thu Jan 28, 2016 2:39 am
by devilwarriors
Hi,
I'm trying to change the icon of the
nixie tube mod for a 128px wide version that I made from the building sprite, but it won't display right and I don't see what I'm doing wrong.
inside technology.lua I change the icon path to my file
icon = "__nixie-tubes__/graphics/technology/nixie-tube.png"
nixie-tube.png - 128px x 128px
But when I launch the game it look like that
Why?
Re: Trying to change a mod tech icon to a HD version
Posted: Thu Jan 28, 2016 2:42 am
by Supercheese
You need to also set the icon_size property to 128 in your technology definition.
For example:
Code: Select all
data:extend({
{
type = "technology",
name = "alert-systems",
icon = "__Red Alerts__/graphics/AlertSystems.png",
icon_size = 128,
prerequisites = {"circuit-network"},
effects =
{
{
type = "unlock-recipe",
recipe = "power-sensor"
},
},
unit =
{
count = 40,
ingredients =
{
{"science-pack-1", 1},
{"science-pack-2", 1}
},
time = 15
},
order = "a-d-e",
},
})
Re: Trying to change a mod tech icon to a HD version
Posted: Thu Jan 28, 2016 2:44 am
by devilwarriors
Nice, thanks for the fast answer!
Re: Trying to change a mod tech icon to a HD version
Posted: Thu Jan 28, 2016 2:45 am
by keyboardhack
You need to add this line aswell
Code: Select all
icon_size = 128(or whatever size your image has)
Default size for icon_size is 64.
You can read more about it here
https://forums.factorio.com/forum/viewtop ... =3&t=18182
EDIT: damn too slow
Re: Trying to change a mod tech icon to a HD version
Posted: Thu Jan 28, 2016 2:49 am
by devilwarriors
Oh that a pretty recent change, that explain why all mod have horribly pixelated icons right now (I'm new to the game).
Re: Trying to change a mod tech icon to a HD version
Posted: Thu Jan 28, 2016 3:08 am
by keyboardhack
Made two new icons from the one you posted. Feel free to use if you want although they might not fit with the style you are going for.
These two are 256x256 in size.
Re: Trying to change a mod tech icon to a HD version
Posted: Thu Jan 28, 2016 3:18 am
by devilwarriors
Why 256? is the game accepting this size?
Re: Trying to change a mod tech icon to a HD version
Posted: Thu Jan 28, 2016 3:21 am
by keyboardhack
Haven't tried it but i don't see why it shouldn't.
icon_size is an integer so i assume it can have any value.
Re: Trying to change a mod tech icon to a HD version
Posted: Thu Jan 28, 2016 3:31 am
by devilwarriors
I feel like icons is one thing where I would prefer to control the render of the final size, since I know that this box is 128px wide on screen I prefer to make it that size rather than have the game resize it smaller. Photoshop probably have a better re-sizing algorithm than the game anyway if the max zoom quality is any indication.
Maybe it's because I come from web development where you couldn't trust IE6 to resize an image correctly.
Re: Trying to change a mod tech icon to a HD version
Posted: Thu Jan 28, 2016 4:05 am
by devilwarriors
I tried and yeah 256 work and look fine.