Scaling icons after stacking and/or game not generating mipmaps

Place to get help with not working mods / modding interface.
gridstop
Long Handed Inserter
Long Handed Inserter
Posts: 68
Joined: Sun Jul 17, 2016 1:46 am
Contact:

Scaling icons after stacking and/or game not generating mipmaps

Post by gridstop »

I'm programmatically generating some virtual signals based on the planets in the game, similar to how the game internally generates planet route icons (with the two planets and the arrows).

So I have a stackup like this:

Code: Select all

icons = {
        { icon = data.raw.planet[source].icon, icon_size = 64, scale = 0.60, shift = {-12,-12}, draw_background = false },
        { icon = data.raw.planet[dest].icon, icon_size = 64, scale = 0.60, shift = {12, 12}, draw_background = false },
        { icon = "__virtual-planet-channels__/graphics/icons/planet-channel.png", icon_size = 64, scale = 1, draw_background = true}
},
The end result looks great in the virtual signal list when choosing with a constant combinator, or when pulling up the factoriopedia. Looks very similar to the planet routes that are auto-generated. But when you select a single signal for a constant combinator and have alt display on, the icon is larger than the constant combinator. And if you select 4 signals, it overlaps the others, too. But if I try to scale it down at all, the icon in the selection menus looks wrong. I don't see a way to scale the end result of the icons array stackup.

I looked and other virtual signal icons seem to have 64x64 as their 'top' mipmap. But either my resulting stack is the wrong size, and I don't see how to change it, or the image is okay but the game is somehow not generating the smaller mipmaps for it?

Appreciate any help.
Attachments
missized.png
missized.png (427.01 KiB) Viewed 124 times
Post Reply

Return to “Modding help”