Icons get cut off in some menus

Place to get help with not working mods / modding interface.
Post Reply
User avatar
Brathahn
Fast Inserter
Fast Inserter
Posts: 121
Joined: Sat Aug 02, 2014 1:50 pm
Contact:

Icons get cut off in some menus

Post 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 286 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 286 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 286 times

Inventory works fine:
2024-06-27 14_54_21-Window.png
2024-06-27 14_54_21-Window.png (39.73 KiB) Viewed 286 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 286 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 286 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 286 times

Bilka
Factorio Staff
Factorio Staff
Posts: 3218
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Icons get cut off in some menus

Post 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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
Brathahn
Fast Inserter
Fast Inserter
Posts: 121
Joined: Sat Aug 02, 2014 1:50 pm
Contact:

Re: Icons get cut off in some menus

Post by Brathahn »

yes you are right. "icon_size = 64, icon_mipmaps = 4," was missing in the recipe.
Thank you!

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2765
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Icons get cut off in some menus

Post 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.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics

Post Reply

Return to “Modding help”