Page 1 of 1

Icons get cut off in some menus

Posted: Thu Jun 27, 2024 1:06 pm
by Brathahn
Hello,
im making a mod with mipmapped icons but somehow the game cuts off some of the icons.
what am i doing wrong? i copied the item definition from the base game so i think it should be correct?

my item definition is as follows:

Code: Select all

{
    type = "item",
    name = "supercharged-burnerdrill",
    icon = "__superchargedburnerdrill__/graphics/icons/supercharged-burnerdrill-icon.png",
    icon_size = 64, icon_mipmaps = 4,
    subgroup = "extraction-machine",
    order = "a[items]-a[burner-mining-drill]",
    place_result = "supercharged-burnerdrill",
    stack_size = 50
}
the icon file:
supercharged-burnerdrill-icon.png
supercharged-burnerdrill-icon.png (10.2 KiB) Viewed 296 times

unlocked item in technology screen is cut off:
2024-06-27 14_48_15-Window.png
2024-06-27 14_48_15-Window.png (46.75 KiB) Viewed 296 times

item in crafting menu is cut off:
2024-06-27 14_48_27-Window.png
2024-06-27 14_48_27-Window.png (69.2 KiB) Viewed 296 times

Inventory works fine:
2024-06-27 14_54_21-Window.png
2024-06-27 14_54_21-Window.png (39.73 KiB) Viewed 296 times

Map markers work fine:
2024-06-27 14_49_04-Window.png
2024-06-27 14_49_04-Window.png (27.9 KiB) Viewed 296 times

Combinator signals work fine:
2024-06-27 14_48_44-Window.png
2024-06-27 14_48_44-Window.png (90.85 KiB) Viewed 296 times

Item on belt works fine:
2024-06-27 15_01_33-Window.png
2024-06-27 15_01_33-Window.png (51.18 KiB) Viewed 296 times

Re: Icons get cut off in some menus

Posted: Thu Jun 27, 2024 1:41 pm
by Bilka
The screenshots that you show where the icon is broken are all recipes, the places where it works you're looking at items. Make sure that the icon size is also set correctly on the recipe prototype, you only pasted the item prototype.

Re: Icons get cut off in some menus

Posted: Thu Jun 27, 2024 3:51 pm
by Brathahn
yes you are right. "icon_size = 64, icon_mipmaps = 4," was missing in the recipe.
Thank you!

Re: Icons get cut off in some menus

Posted: Thu Jun 27, 2024 9:54 pm
by FuryoftheStars
Brathahn wrote:
Thu Jun 27, 2024 3:51 pm
yes you are right. "icon_size = 64, icon_mipmaps = 4," was missing in the recipe.
Thank you!
Iirc, at one point they change the default (when it's omitted) to 128, so that makes sense.