Does icon_size really have any affect?
Does icon_size really have any affect?
The icon_size property was introduced not so long ago, but does it really have any effect at the moment? What happens if I enter the wrong value?
Re: Does icon_size really have any affect?
Your mod will either cause an error on startup or the icon won't be properly sized in game.
Re: Does icon_size really have any affect?
Why we haven't default value? If not specified, then 32.posila wrote:Your mod will either cause an error on startup or the icon won't be properly sized in game.
Re: Does icon_size really have any affect?
Because that's not the right size for like half of the icons? It's better to define it everywhere than to use a default that might/will change in the future.darkfrei wrote:Why we haven't default value? If not specified, then 32.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Does icon_size really have any affect?
The original question (topic). Yes. It has an effect. Currently all item icons are 32, but others like Technology are 128, and categories (tabs at the top when you open the crafting menu) are 64.Zomis wrote:The icon_size property was introduced not so long ago, but does it really have any effect at the moment? What happens if I enter the wrong value?
Those USED TO BE hard values, except technology, that was 128 if it was base game, and 64 for mods, unless you specified an icon_size tag.
This was strange, and meant you needed to add icon_size to all technology to make it work as expected. Which is the reason the default value was removed, forcing you to add the tag to all icons in 0.16.
Back in earlier versions (0.12 and earlier, etc), icon sizes for technology were automatic, just give it a file, and it scaled to fit. it was late 0.12 when they changed the research GUI that they introduced the icon_size fiasco, because the rules were all over the place (128 for the newly introduced base game icons, but 64 for mods, and if your mod was using a 32 size icon, it wouldn't be resized, just centred.)
To get back to the quoted question, if you for example have an icon you want to use for a technology, and a tab, and an item... you can use the same graphic in say, 64x64, and specify icon_size = 64 in all cases. Technology graphics will scale up, item graphics will scale down.
As specified above, it used to be. I'm not entirely sure why they decided to remove the default of 32 from items, recipes and entities, or the default of 64 from categories, but... they did. Even a default of 128 for technology would have been fine instead of doing what they did in 0.12 to 0.15, the issue is that it was inconsistent, and changing the defaults around over time was causing mods that didn't change the icon size caused loading errors.darkfrei wrote:Why we haven't default value? If not specified, then 32.
That's where you have different defaults for different things, 32 for items, recipes and entities, 64 for categories, and 128 for technology. The default should be whatever is appropriate for the situation.Bilka wrote:Because that's not the right size for like half of the icons? It's better to define it everywhere than to use a default that might/will change in the future.
In any case, it doesn't really matter, we do have an icon_size tag now, and those who have only just started modding will not know it was never there, while those of us who have been modding for a long time... well... if you've been modding as long as me, you'll just shrug and get on with it, just another change in a long list of changes, some more pointless, and some very revolutionary. This one is just "Meh" *Shrug* to me... A pain in the backside going through and adding it to everything, but at the end of the day, it does make sense, and doesn't add or remove anything from the game.
-
- Filter Inserter
- Posts: 841
- Joined: Mon Sep 14, 2015 7:40 am
- Contact:
Re: Does icon_size really have any affect?
Well, you can now use high-resolution icons, so they won't be badly pixelated when zoomed in!