ReikaKalseki / Reika_FactorioMods_Issues

The issue tracker for all of my Factorio mods - EndgameCombat, NauvisDay, Geothermal, Oreverhaul, and the rest.
5 stars 1 forks source link

Bug preventing launch #399

Open kippercs opened 1 year ago

kippercs commented 1 year ago

Hello, Factorio has updated 5 mods through the ingame mod manager, and without changing my mod-list post update; the game no longer launches with Fast Furnaces. The ingame error message is "Failed to load mods: The given sprite rectangle (left_top=0x0, right_bottom=64x64) is outside the actual sprite size (left_top=0x0, right_bottom=32x32). If this is being used as an icon you may need to define the icon_size property. See the log file for more information.: FastFurnaces/graphics/icons/electric-mining-drill.png". The following mods to be disabled: reverse-factory (8.1.14), bobmining (1.1.3), Squeak Through (1.8.2), BottleneckLite (1.2.4), Noxys_StackSizeMultiplier (0.4.5) and FastFurnaces (1.152.1). All of the other mods except FastFurnaces can be loaded if it is disabled. Checking through FastFurnaces' files the aforementioned file appears to be the correct size, 32x32. The drill.lua in prototypes doesn't even seem to fetch "electric-mining-drill.png", infact I can't seem to find any line of code that references it. According to the more indepth log file from Factorio this is what message I am seeing. "5.465 Error AtlasSystem.cpp:1543: The given sprite rectangle (left_top=0x0, right_bottom=64x64) is outside the actual sprite size (left_top=0x0, right_bottom=32x32). If this is being used as an icon you may need to define the icon_size property. See the log file for more information.: FastFurnaces/graphics/icons/electric-mining-drill.png; mods: reverse-factory bobmining Squeak Through BottleneckLite Noxys_StackSizeMultiplier FastFurnaces Prototypes using sprite: reika-fast-electric-mining-drill reika-fast-electric-mining-drill rf-reika-fast-electric-mining-drill"

I think Dragon Industries is one of the mods that I updated. If you need me to, I can also provide an entire list of the mods I am using, their versions and the version of the game (which should be the most recent update). The game worked up until those mods were updated, so hopefully it is an easy fix--my current world of 200 hours or so is actually not useable right now without your Fast Furnaces mod!

jacobwatkinsgit commented 1 year ago

The error is in DragonIndustries_1.152.1/sprites.lua , in function reparentSprites(from, to, obj) \: icon_size is not changed anywhere, but the file is. Fast furnaces creates the mining drill, and FastFurnaces/prototypes/drill Line 7 local drill = createFastVersion("mining-drill", "electric-mining-drill", nil, true) has skipIcons true. I'm not saying to change that, but if skipIcons were true, then the icon_size is set to 32.

Sorry for not putting this into a diff/pull request: Starting around line 137:

    if obj.icon then
        obj.icon = genReparentedFilename(from, to, obj.icon)
        obj.icon_size = 32 -- should know this
        obj.icon_mipmaps = 0
    end
    if obj.icons then
        --log(serpent.block(obj.icons))
        for _,ico in pairs(obj.icons) do
            ico.icon = genReparentedFilename(from, to, ico.icon)
            ico.icon_size = 32 -- should know this
            ico.icon_mipmaps = 0
        end
    end

The difference is to write 32 as the icon size, and 0 or 1 mipmap levels (it is a warning now, but may be an error in the future, according to the developers). I cannot know anywhere the icons may now be cut off (if any should be 64x64), but the game loads.