Breaking change in 0.15.7

Place to post guides, observations, things related to modding that are not mods themselves.
posila
Factorio Staff
Factorio Staff
Posts: 5408
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Breaking change in 0.15.7

Post by posila »

Hi, in 0.15.7 will be possibly breaking change for lot of mods.

Code: Select all

    - Icons are now required to have correct size (which can be overridden by icon_size property). (https://forums.factorio.com/45700)
      - 32x32px for entity, fluid, item, item-group, recipe, technology, virtual-signal
      - 128x128px for achievement, tutorial
      - If icon path references base mod, technology icon is expected to be 128x128px and item-group icon 64x64px.
      - In near future, we may remove default sizes and require icon_size to be always specified.
Jürgen Erhard
Filter Inserter
Filter Inserter
Posts: 299
Joined: Sun Jun 12, 2016 11:29 pm
Contact:

Re: Breaking change in 0.15.7

Post by Jürgen Erhard »

Since this changes requires users to disable a *TON* of mods (basically all that use icons), it would be nice if the list of disabled mods were logged somewhere. I just checked my log and I only see the icon error, but no list of mods to be disabled. Now, I just exited and didn't do the disabling, so maybe(!) if I let the game disable them I get a list? I also can't copy/paste list, and screenshots, the only option I see, are damn annoying for text lists.
credomane
Filter Inserter
Filter Inserter
Posts: 311
Joined: Tue Apr 12, 2016 6:21 pm
Contact:

Re: Breaking change in 0.15.7

Post by credomane »

This change also seems to be inaccurate as well when listing the mods to be disabled.

My mod originally defined the height/width of the 5 images it uses as 32x32. I changed it to use icon_size of 32 yet my mod still appears in the list of "bad" mods. I even double checked my images to make sure they were 32x32 pixel of the png type.
Yet if I comment out all the sprite image prototypes it disappears from the list.

This is getting frustrating.


[edit]
Yeah this change is inaccurate for mods....Creating a bug report.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14597
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Breaking change in 0.15.7

Post by Rseding91 »

credomane wrote:This change also seems to be inaccurate as well when listing the mods to be disabled.

My mod originally defined the height/width of the 5 images it uses as 32x32. I changed it to use icon_size of 32 yet my mod still appears in the list of "bad" mods. I even double checked my images to make sure they were 32x32 pixel of the png type.
Yet if I comment out all the sprite image prototypes it disappears from the list.

This is getting frustrating.


[edit]
Yeah this change is inaccurate for mods....Creating a bug report.
The mods list is "all mods that use this icon". The game doesn't know which one gave the bad definition. That part wasn't changed with this update - the update just requires that all mods do it correctly now instead of just chopping icons incorrectly.
If you want to get ahold of me I'm almost always on Discord.
posila
Factorio Staff
Factorio Staff
Posts: 5408
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Breaking change in 0.15.7

Post by posila »

Rseding91 wrote:The mods list is "all mods that use this icon".
It is acutally little worse. It lists all mods that modified a thing that uses this icon, and if the thing is gui-style, it will list every mod that added/modified any style, because all styles are just one big prototype. This is for example what research queue mod does, creates new gui styles for every technology prototype. I want to improve that part.
credomane
Filter Inserter
Filter Inserter
Posts: 311
Joined: Tue Apr 12, 2016 6:21 pm
Contact:

Re: Breaking change in 0.15.7

Post by credomane »

I was really banging my head off the desk trying to figure this one out when I managed to create a small dozen line (that could really be reduced to a one-liner mod that would trigger the issue.)

Glad to know what the cause is. Believe I'm actually creating the gui-style in the wrong way causing my mod to appear in the list for "no" reason. Will have to experiment more later and see if I can't fix that.

[edit]
Guess I can't fix it the way I expected. Now I get "Only one gui style can be defined now, later we can make it more variable. Great. :(
Off to modding discussion!

[edit2]
I worked around it. LuaStyle is runtime editable on individual buttons. I just made a silly helper function that sets up the sprite buttons the way I want upon creation. Dirty but it works and gets rid of the custom button style. Gets my mod off of this list whenever that error happens.
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1196
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: Breaking change in 0.15.7

Post by Mooncat »

I really wonder why base mod has different technology icon size than custom mods.
The absence of icon_size in the base mod, with the need of icon_size = 128 for custom mods has caused confusion for quite a long time.
posila
Factorio Staff
Factorio Staff
Posts: 5408
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Breaking change in 0.15.7

Post by posila »

Mooncat wrote:I really wonder why base mod has different technology icon size than custom mods.
The absence of icon_size in the base mod, with the need of icon_size = 128 for custom mods has caused confusion for quite a long time.
It's a legacy thing from 0.13 where we changed technology gui and technology icons to 128x128px and decided to default mod icon to 32x32px because "that is what mods are used to".
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1196
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: Breaking change in 0.15.7

Post by Mooncat »

posila wrote:
Mooncat wrote:I really wonder why base mod has different technology icon size than custom mods.
The absence of icon_size in the base mod, with the need of icon_size = 128 for custom mods has caused confusion for quite a long time.
It's a legacy thing from 0.13 where we changed technology gui and technology icons to 128x128px and decided to default mod icon to 32x32px because "that is what mods are used to".
I thought 0.15.0 was a good opportunity to break existing mods for making things better (more consistent in this case), since they are already broken by "factorio_version" in info.json. But sounds like you have missed the opportunity. :?

Don't miss 0.16.0, if you want to require icon_size to be always specified.
Also, the event names. :D
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Breaking change in 0.15.7

Post by bobingabout »

Especially since previous versions demanded 64x64, it did feel odd that it demands for 32x32
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Post Reply

Return to “Modding discussion”