Page 1 of 1

[2.0.66] Icons do not scale correctly in map view

Posted: Thu Sep 11, 2025 12:18 pm
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 325 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 325 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 325 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.

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

Posted: Thu Sep 11, 2025 2:52 pm
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.

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

Posted: Mon Sep 15, 2025 8:27 pm
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.