[1.1.82] runtime-sprite-reload option doesn't tolerate mipmap warnings

Post Reply
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

[1.1.82] runtime-sprite-reload option doesn't tolerate mipmap warnings

Post by Deadlock989 »

There are numerous mods which specify a mipmap value for icon sprites which don't match the width of the bitmap, often because they are copying post-1.0 mipmapped icon specifications without updating their non-mipmapped sprites to match, or maybe some other oversight - it's easily done. There are even some relatively high profile mods which do this. Usually it only results in spamming the startup log with messages such as:

Code: Select all

  21.483 Warning! Sprite at {0,0; 32x32} from __creative-mod__/graphics/icons/autofill-requester-chest.png is defined with 4 mipmap levels, but level 1 is expected to be at {32,0; 16x16} which is out of bounds of the source image.
  21.483 Warning! Sprite at {0,0; 32x32} from __creative-mod__/graphics/icons/creative-chest.png is defined with 4 mipmap levels, but level 1 is expected to be at {32,0; 16x16} which is out of bounds of the source image.
  21.484 Warning! Sprite at {0,0; 32x32} from __creative-mod__/graphics/icons/creative-provider-chest.png is defined with 4 mipmap levels, but level 1 is expected to be at {32,0; 16x16} which is out of bounds of the source image.
But otherwise the engine seems able to cope and ploughs on regardless.

However, if you enable the "hidden" runtime-sprite-reload option, the game flat out refuses to process this kind of thing and terminates itself. It halts with a crash dialog and appends the following to the log:

Untitled.jpg
Untitled.jpg (52.4 KiB) Viewed 797 times

Code: Select all

4.468 Loading sprites in reloadable mode.
26.762 Error Util.cpp:83: Icon mipmap 1 is outside of spritesheet: __creative-mod__/graphics/icons/autofill-requester-chest.png
32.071 Goodbye
This puts you in a situation where your only method of starting the game again is to hunt for the config.ini and turn the setting back to false.

It would be nice to be able to take advantage of this hidden feature without having to disable every mod that has minor and usually tolerable issues with its icon specs.
Image

Rseding91
Factorio Staff
Factorio Staff
Posts: 13232
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.82] runtime-sprite-reload option doesn't tolerate mipmap warnings

Post by Rseding91 »

Thanks for the report. This feature was (as far as I know) never intended to be released 'in the wild' and as such if it ends up having issues we aren't interested in working on them outside of internal problems blocking us.

I'm going to move this to minor issues on the off chance another developer wants to poke at it but I don't see that as likely.
If you want to get ahold of me I'm almost always on Discord.

Genhis
Factorio Staff
Factorio Staff
Posts: 127
Joined: Wed Dec 24, 2014 8:19 am
Contact:

Re: [1.1.82] runtime-sprite-reload option doesn't tolerate mipmap warnings

Post by Genhis »

While going through the code I noticed this was changed in 2.0. I hope it doesn't bother you too much in 1.1.

Post Reply

Return to “Fixed for 2.0”