EarendelDevelopers / factorio-mods

This is a public repository for tracking issues with Earendel's factorio mods.
19 stars 3 forks source link

Error when trying to view surface with arty40 ruin (attempt to index local 'tile_type' (a nil value)) #299

Closed fm9000 closed 1 year ago

fm9000 commented 1 year ago

Hi there!

I recently discovered a new moon (Sage). The universe explorer shows me that it has a ruin. When I want to view the surface, I get an error:

The mod Space Exploration (0.6.108) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event space-exploration::on_gui_click (ID 1)
__space-exploration__/scripts/ruin.lua:86: attempt to index local 'tile_type' (a nil value)
stack traceback:
    __space-exploration__/scripts/ruin.lua:86: in function 'build'
    __space-exploration__/scripts/ruin.lua:301: in function 'zone_build_ruins'
    __space-exploration__/scripts/zone.lua:723: in function 'create_surface'
    __space-exploration__/scripts/zone.lua:1005: in function 'get_make_surface'
    __space-exploration__/scripts/remote-view.lua:672: in function 'start'
    __space-exploration__/scripts/zonelist.lua:2559: in function 'callback'
    __space-exploration__/scripts/event.lua:15: in function <__space-exploration__/scripts/event.lua:13>

When I try to launch a rocket to this surface, I get essentially the same error (just triggered by launchpad.lua and not remote-view.lua I guess).

The mod Space Exploration (0.6.108) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event space-exploration::on_gui_click (ID 1)
__space-exploration__/scripts/ruin.lua:86: attempt to index local 'tile_type' (a nil value)
stack traceback:
    __space-exploration__/scripts/ruin.lua:86: in function 'build'
    __space-exploration__/scripts/ruin.lua:301: in function 'zone_build_ruins'
    __space-exploration__/scripts/zone.lua:723: in function 'create_surface'
    __space-exploration__/scripts/zone.lua:1005: in function 'get_make_surface'
    __space-exploration__/scripts/launchpad.lua:268: in function 'lock_destination'
    __space-exploration__/scripts/launchpad.lua:477: in function 'launch'
    __space-exploration__/scripts/launchpad-gui.lua:391: in function 'callback'
    __space-exploration__/scripts/event.lua:15: in function <__space-exploration__/scripts/event.lua:13>

This is the second surface with a ruin that I've discovered. The first was Calidus Asteroid belt with the space ship that can be reclaimed. That worked fine.

Line 301 in ruin.lua refers to some ruin_name = "arty40".

Link to savegame (312 MB):

https://drive.google.com/file/d/1Kb2QmThDNGWjZMcJ1MfS8VTZ4p83zXQR/view?usp=sharing

Link to factorio-current.log:

https://drive.google.com/file/d/1IjteG9_HauJzRtCdUrozL70XIG4UNhRw/view?usp=sharing

What can I do to fix it? Thank you so much already!

Wiwiweb commented 1 year ago

Looks like SE expects to be able to use the "black-refined-concrete" tile, but that tile type no longer exists in your game.

It was removed by Alien Biomes because you reached the 255 tile limit:

   7.977 Script @__alien-biomes__/data-final-fixes.lua:217: Tile 253 included: Arci-marking-yellow-dl-left-turn-down
   7.977 Script @__alien-biomes__/data-final-fixes.lua:217: Tile 254 included: Arci-marking-yellow-dl-left-turn-left
   7.977 Script @__alien-biomes__/data-final-fixes.lua:293: Priority 5:
   7.977 Script @__alien-biomes__/data-final-fixes.lua:217: Tile 255 included: red-refined-concrete
   7.977 Script @__alien-biomes__/data-final-fixes.lua:221: Tile 256 excluded: green-refined-concrete
   7.979 Script @__alien-biomes__/data-final-fixes.lua:221: Tile 257 excluded: blue-refined-concrete
   7.981 Script @__alien-biomes__/data-final-fixes.lua:221: Tile 258 excluded: orange-refined-concrete
   7.982 Script @__alien-biomes__/data-final-fixes.lua:221: Tile 259 excluded: yellow-refined-concrete
   7.984 Script @__alien-biomes__/data-final-fixes.lua:221: Tile 260 excluded: pink-refined-concrete
   7.985 Script @__alien-biomes__/data-final-fixes.lua:221: Tile 261 excluded: purple-refined-concrete
   7.986 Script @__alien-biomes__/data-final-fixes.lua:221: Tile 262 excluded: black-refined-concrete
   7.988 Script @__alien-biomes__/data-final-fixes.lua:221: Tile 263 excluded: brown-refined-concrete
   7.989 Script @__alien-biomes__/data-final-fixes.lua:221: Tile 264 excluded: cyan-refined-concrete
   7.990 Script @__alien-biomes__/data-final-fixes.lua:221: Tile 265 excluded: acid-refined-concrete

The colored refined concrete tiles are first to go when reaching the tile limit because they're not usually useful. I think it makes sense for SE to have an alternative tile when the expected tile doesn't exist.

I'll make that modification for the next SE version, but in the meantime you can uninstall a decorative tile mod and that should be enough to get black-refined-concrete back.

fm9000 commented 1 year ago

Thank you so much! I knew that I had too many tiles, but so far that didn't cause any issues. I disabled some tiles from the Asphalt Paving mod and now it works - and now I get to capture the ruin! :)