strange icons behaviour

Things that has been reported already before.
Post Reply
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7049
Joined: Fri May 09, 2014 1:01 pm
Contact:

strange icons behaviour

Post by bobingabout »

I defined an icons as follows:

Code: Select all

    icons =
    {
      {
        icon = "__base__/graphics/icons/fluid/sulfuric-acid.png",
        icon_size = 32,
        scale = 0.625,
        shift = {-6, -6}
      },
      {
        icon = "__bobplates__/graphics/icons/nitric-acid.png",
        icon_size = 64,
        scale = 0.625 * 0.5,
        shift = {6, 6}
      }
    },
See screenshot
expected result is on the left, that's an old icon that I edited together.
actual result is on the right.
Attachments
Screenshot 2019-06-02 00.58.45.png
Screenshot 2019-06-02 00.58.45.png (7.59 KiB) Viewed 367 times
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 1941
Joined: Fri Nov 06, 2015 7:41 pm

Re: strange icons behaviour

Post by Deadlock989 »

It's been that way for a long time. The first icon in the definition is scaled to fit the container, regardless of what scale you give it. Successive icons are scaled relative to that. If you want to re-use icons to make a composite and they're all smaller than the originals, you have to put a blank icon with scale 1 on the bottom layer.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7049
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: strange icons behaviour

Post by bobingabout »

Deadlock989 wrote:
Sun Jun 02, 2019 9:15 am
It's been that way for a long time. The first icon in the definition is scaled to fit the container, regardless of what scale you give it. Successive icons are scaled relative to that. If you want to re-use icons to make a composite and they're all smaller than the originals, you have to put a blank icon with scale 1 on the bottom layer.
I figured that's what was going on, but I consider it a bug.
Depends what the devs think though I guess.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 1941
Joined: Fri Nov 06, 2015 7:41 pm

Re: strange icons behaviour

Post by Deadlock989 »

bobingabout wrote:
Sun Jun 02, 2019 2:26 pm
I figured that's what was going on, but I consider it a bug.
Depends what the devs think though I guess.
I would say more like undocumented behaviour, or a mismatch between user expectation and the actual mechanics, than a bug.

As long as changing it doesn't break everyone else's stuff, I'm fine with it changing. Vanilla never overlays icons on anything other than scale 1 base icons.

Qon
Smart Inserter
Smart Inserter
Posts: 1251
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: strange icons behaviour

Post by Qon »

Deadlock989 wrote:
Sun Jun 02, 2019 2:34 pm
I would say more like undocumented behaviour, or a mismatch between user expectation and the actual mechanics, than a bug.
How is scale not doing anything for the first icon in the list not a bug?
https://wiki.factorio.com/Types/IconData wrote:scale
Type: Types/double
Default: 1
Values different than 1 specify the scale of the icon on default gui scale. Scale 2 means that the icon will be 2 times bigger on screen (and more pixelated).
That's pretty clear what it should do.
Deadlock989 wrote:
Sun Jun 02, 2019 2:34 pm
As long as changing it doesn't break everyone else's stuff, I'm fine with it changing. Vanilla never overlays icons on anything other than scale 1 base icons.
Well if everyone who uses it starts their icon list with a clear icon for the first one to use scale, or doesn't specify scale at all, then it shouldn't break things. Only if you specify a scale != 1 for your first icon (which is really weird to do with the bug unless you never test your mod at all...) will it break things. So I would say fix the bug.

posila
Factorio Staff
Factorio Staff
Posts: 4297
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: strange icons behaviour

Post by posila »

Thanks for the report.
I consider this duplicate of 69221, please direct the discussion there.

Post Reply

Return to “Duplicates”

Who is online

Users browsing this forum: No registered users