Page 1 of 1

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

Posted: Wed Jun 14, 2023 12:27 pm
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 1255 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.

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

Posted: Wed Jun 14, 2023 12:52 pm
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.

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

Posted: Tue Nov 28, 2023 3:04 pm
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.