Page 1 of 1

[Rseding91] [0.15.30] Layering Icons malfunctioning

Posted: Wed Jul 19, 2017 9:20 pm
by Arch666Angel
Layering icons show a strange behavior, it seems that the icon layer that is above the base icon is multiplied and also icons that are maybe next to them on the atlas are showing up.
As you can see the behavior is somewhat inconsistent, the roman numbers on the first row seem to display correctly

code example

Code: Select all

	icons = {
		{
			icon = "__angelssmelting__/graphics/icons/wire-copper.png",
		},
		{
			icon = "__angelssmelting__/graphics/icons/wire-coil-copper.png",
			scale = 0.4375,
			shift = { -10, -10},
		}
	},	
1.png
1.png (366.93 KiB) Viewed 8389 times
2.png
2.png (255.05 KiB) Viewed 8389 times

Re: [0.15.30] Layering Icons malfunctioning

Posted: Thu Jul 20, 2017 12:39 pm
by Rseding91
Can you upload a simple mod showing the issue?

Re: [0.15.30] Layering Icons malfunctioning

Posted: Thu Jul 20, 2017 1:10 pm
by Arch666Angel
I can try to set something up, but the issue is also present with other players: viewtopic.php?f=185&t=50153&start=40#p297680

Re: [0.15.30] Layering Icons malfunctioning

Posted: Thu Jul 20, 2017 2:02 pm
by Arch666Angel
Did some more investigation, I cannot reproduce it with a dummy mod, but my guess is that there are not enough sprite added by the dummy.

I compared the "malfunctions" with the sprite atlas though:
original icons for reference:
roll-aluminium.png
roll-aluminium.png (2.31 KiB) Viewed 8335 times
roll-copper.png
roll-copper.png (2.35 KiB) Viewed 8335 times
3.png
3.png (465.82 KiB) Viewed 8335 times
4.png
4.png (1.52 MiB) Viewed 8335 times
5.png
5.png (644.92 KiB) Viewed 8335 times
And then another issue popped up as well, I used the GUI scale option to better spot the errors and encountered this:
100% GUI scale
100p.png
100p.png (318.74 KiB) Viewed 8335 times
200% GUI scale
200p.png
200p.png (281.61 KiB) Viewed 8335 times

Re: [0.15.30] Layering Icons malfunctioning

Posted: Thu Jul 20, 2017 2:41 pm
by Rseding91
How are you defining these icons? Are they used as icons or are they arbitrary images?

Re: [0.15.30] Layering Icons malfunctioning

Posted: Thu Jul 20, 2017 2:48 pm
by Arch666Angel
Rseding91 wrote:How are you defining these icons? Are they used as icons or are they arbitrary images?
They are all used as icons themselves (32x32px), I use the layering for recipes to indicate from which start product/item the endproduct/item will be produced. Example in the picture is copper-plate from coil, copper-plate from molten, etc. Code snippet example is in the first post.

Re: [0.15.30] Layering Icons malfunctioning

Posted: Thu Jul 20, 2017 3:05 pm
by Rseding91
Images used as icons are marked as "no-crop" and in the screenshots you've posted they're being cropped which makes me think they aren't being used as icons or you've got some cached something going on causing problems.

Re: [0.15.30] Layering Icons malfunctioning

Posted: Thu Jul 20, 2017 4:40 pm
by Rseding91
Can you upload a full set of mods/save file that shows the problem? If you can't make it happen in a test case.

Re: [Rseding91] [0.15.30] Layering Icons malfunctioning

Posted: Thu Jul 20, 2017 5:24 pm
by Arch666Angel
Like I said all the 32x32px sprites are used in at least one item definition as icon. The only exeption are the roman numbers I only use as a layer, but even they are referenced in an icon path.

I'll upload the modpack which is causing the issue, a bit of experimenting showed that adding AAI-Vehicles-Warden causes the issue to appear. Removing the Warden Mod and adding Yuokis for example, which has far more sprites and gfx wont cause the issue to appear. So I'm not sure where or what the problem might be that leads to cropping the icons.

Re: [Rseding91] [0.15.30] Layering Icons malfunctioning

Posted: Thu Jul 20, 2017 5:35 pm
by Arch666Angel

Re: [Rseding91] [0.15.30] Layering Icons malfunctioning

Posted: Thu Jul 20, 2017 7:09 pm
by Arch666Angel

Re: [Rseding91] [0.15.30] Layering Icons malfunctioning

Posted: Thu Jul 20, 2017 11:54 pm
by Rseding91
Thanks for the mods. I was able to reproduce the problem and it's now fixed for the next version of 0.15.

Re: [Rseding91] [0.15.30] Layering Icons malfunctioning

Posted: Fri Jul 21, 2017 6:06 am
by Arch666Angel
Thanks for the effort

Re: [Rseding91] [0.15.30] Layering Icons malfunctioning

Posted: Fri Sep 08, 2017 7:42 pm
by Arch666Angel
I discovered another issue that is related to layering icons
rep2.png
rep2.png (653.04 KiB) Viewed 7703 times
The layers on top are missaligned. UI scale is default.

Re: [Rseding91] [0.15.30] Layering Icons malfunctioning

Posted: Fri Sep 08, 2017 11:19 pm
by Rseding91
Arch666Angel wrote:I discovered another issue that is related to layering icons
rep2.png
The layers on top are missaligned. UI scale is default.
Can you upload a mod and save file that shows it broken? Preferably a small save and not an end-game factory :)

Re: [Rseding91] [0.15.30] Layering Icons malfunctioning

Posted: Sat Sep 09, 2017 11:57 am
by Arch666Angel
There you go, it's consistently appearing for layered recipe icons. I think I ended up with this behavior also when you scale the UI to a different size (see some posts above). From that I take the guess that the images themselves are scaled up but not their relative position to each other.