Krastorio 2 Imersite Asteroids

by snakeru

Add more challenge to your game by postponing imersite mining on Nauvis until you mastered asteroid mining. This mod will lock the imersite drill behind the advanced tech card, and you'll need to bootstrap it by acquiring imersite in space - mostly en route to Aquilo or traversing the asteroid belt (should you choose to install that mod), though Fulgora also has some trace amounts of it too.

Content
9 days ago
2.0
5.60K
Factorio: Space Age Icon Space Age Mod
Environment Mining

b Sprite loading failure for imersite-asteroids-kr-quarry-drill tech

10 days ago
  44.018 Error AtlasBuilder.cpp:1266: The given sprite rectangle (left_top=0x0, right_bottom=512x512) is outside the actual sprite size (left_top=0x0, right_bottom=64x64).
If this is being used as an icon you may need to define the icon_size property.
See the log file for more information.: __Krastorio2Assets__/icons/entities/quarry-drill.png; mods: RenaiTransportation BottleneckLite planet-muluna maraxsis rubia Imersite-Asteroids rigor-module Krastorio2-spaced-out
         Prototypes using the sprite:
           data.raw["item"]["kr-quarry-drill"]
           data.raw["recipe"]["kr-quarry-drill-recycling"]
           data.raw["recipe"]["kr-crush-kr-quarry-drill"]
           data.raw["recipe"]["yeet-item-kr-quarry-drill"]
           data.raw["assembling-machine"]["kr-quarry-drill-ground-digger"]
           data.raw["mining-drill"]["kr-quarry-drill"]
           data.raw["stream"]["RTItemProjectile-kr-quarry-drill18"]
           data.raw["stream"]["RTItemProjectile-kr-quarry-drill25"]
           data.raw["stream"]["RTItemProjectile-kr-quarry-drill60"]
           data.raw["technology"]["imersite-asteroids-kr-quarry-drill"]
10 days ago
(updated 10 days ago)

Hi @zhuyifei1999

Thank you for the report, but I was unable to reproduce it. I did the following in my attempt to reproduce:
1) installed the latest factorio (2.0.77)
2) installed the imersite-asteroids mod (it installed all the dependencies)
3) launched a new game and entered the tech tree screen once
4) examined game logs

There were no errors present in the log. Please provide detailed instructions. I recommend that you start with the sequence of actions provided above and then add the components that you find missing one by one to figure out what is causing it.

--------------- UPDATE --------------
Actually, looking at your stack trace - I think it is caused by incompatibility with the RenaiTransportation. I do not mind including a fix, but you might need to provide it.

10 days ago

Please provide detailed instructions.

The error occurred on a friend's machine, not mine. Both of us runs Linux standalone version of factorio with the exact same set of mods yet it only happened on their machine. Sprite bugs have been inconsistent to reproduce, not just in this case, but in others too, for example:
- https://mods.factorio.com/mod/RenaiTransportation/discussion/6a186b75379e7ef76c065f00
- https://mods.factorio.com/mod/fulgora-orbital-defence/discussion/6a19f0569a33045e708db024

In both these threads, the mod author was unable to reproduce the error.

That's to say, I'm sorry, I cannot give a consistent reproducer that reproduces the error on all platforms. The best you can do is likely to follow this https://forums.factorio.com/129575 (which also means that the error will be consistent and checks enforced in 2.1)

Also note that the error happens, if it happens at all, at mod loading time, during sprite loading phase of the game, before the main menu appears.

I think it is caused by incompatibility with the RenaiTransportation.

That is not accurate.

The definition of imersite-asteroids-kr-quarry-drill tech is very clear:

    {
        name = "imersite-asteroids-kr-quarry-drill",
        type = "technology",
        icon = "__Krastorio2Assets__/icons/entities/quarry-drill.png",
        icon_size = 512,
        essential = false,
        prerequisites = {
            "kr-energy-control-unit"
        },
        unit = {
            count = 1000,
            time = 60,
            ingredients = {
                { "production-science-pack", 1 },
                { "utility-science-pack", 1 },
                { "kr-advanced-tech-card", 1 },
            }
        },
        effects = {
            { type = "unlock-recipe", recipe = "kr-quarry-drill" }
        }
    },

(Imersite-Asteroids_1.2.1/technology.lua)

Icon size = 512. And what is the size of the sprite?

$ file Krastorio2Assets_2.0.4/icons/entities/quarry-drill.png
Krastorio2Assets_2.0.4/icons/entities/quarry-drill.png: PNG image data, 64 x 64, 8-bit/color RGBA, non-interlaced

(https://github.com/raiguard/Krastorio2Assets/blob/main/icons/entities/quarry-drill.png)

The specified icon size 512 is illegal.

I do not mind including a fix, but you might need to provide it.

I can confirm that this was able to make the crash go away:

data.raw["technology"]["imersite-asteroids-kr-quarry-drill"].icon_size = 64
9 days ago

You are correct. I have also changed the icon while at it (size 256) as it was a wrong choice anyways.

Thank you for being persistent. The updated version is published now.

9 days ago

Thanks!

New response