[2.0.66] Icons do not scale correctly in map view

Bugs that are actually features.
All0y
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Jan 19, 2020 12:20 pm
Contact:

[2.0.66] Icons do not scale correctly in map view

Post by All0y »

This was discovered while fixing this issue. The scale defaults to (expected_icon_size / 2) / icon_size which makes the icons too large for the map view.
expected_icon_size defaults to 64 for recipes but the correct scale appears only when expected_icon_size is set to 32 for the recipe.

expected_icon_size = 32, icon_size = 64, scale = 0.25
09-11-2025, 14-09-23.png
09-11-2025, 14-09-23.png (18.08 KiB) Viewed 321 times
icon_size = 64, scale = nil (default equation to (64 / 2) / 64 = 0.5)
09-11-2025, 14-12-10.png
09-11-2025, 14-12-10.png (28.67 KiB) Viewed 321 times
This also happens with vanilla items/pure vanilla gameplay:
(you can see the overlap in the science packs)
09-11-2025, 14-17-25.png
09-11-2025, 14-17-25.png (8.33 KiB) Viewed 321 times
This could be intended to make the items bigger in map view as they would be too small otherwise, I'm not sure though.
Bilka
Factorio Staff
Factorio Staff
Posts: 3634
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [2.0.66] Icons do not scale correctly in map view

Post by Bilka »

The icons are intentionally bigger in the map view: they are scaled by 2.5 and by the machine's radius. For 2.0.67 I have added a utility constant so mods can control this number.

Those specific icons being larger is likely covered under "The final icon will always be resized and centered in GUI so that all its layers (except the floating ones) fit the target slot, but won't be resized when displayed on machines in alt-mode." on IconData so expected behaviour.

I don't know whether we should adjust the general chart recipe icon scale for the base game.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16103
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.66] Icons do not scale correctly in map view

Post by Rseding91 »

Given the constant scaling factor of 2.5, and that recipe icons load with an expected icon size of 64 - which is the same icon used in map view - I'm going to put this into not-a-bug.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Not a bug”