Atria1234 / NOverhang

Factorio mod
1 stars 0 forks source link

Loading conflict with Fluid Memory Storage #1

Closed shpaass closed 2 months ago

shpaass commented 2 months ago

Steps to reproduce:

  1. Reload with only two mods enabled: fluid-memory-storage (author: notnotmelon) and noverhang.
  2. Receive the following error:
    
    Error loading mods
    Failed to load mods: Error while loading entity prototype "fluid-memory-unit" (storage tank): 
    Key "filename" not found in property tree at ROOT.storage-tank.fluid-memory-unit.pictures.window_background 
    Modifications: Fluid Memory Storage > No Overhang

Mods to be disabled:

shpaass commented 2 months ago

Here's the log from factorio-current:

   1.765 Loading mod settings NOverhang 1.1.1 (settings.lua)
   1.766 Loading mod settings fluid-memory-storage 1.4.6 (settings.lua)
   1.768 Loading mod core 0.0.0 (data.lua)
   1.811 Loading mod base 1.1.109 (data.lua)
   1.985 Loading mod fluid-memory-storage 1.4.6 (data.lua)
   1.995 Loading mod base 1.1.109 (data-updates.lua)
   2.006 Loading mod NOverhang 1.1.1 (data-final-fixes.lua)
   2.008 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "accumulator", name: "accumulator"
   2.009 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "assembling-machine", name: "assembling-machine-1"
   2.009 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "assembling-machine", name: "assembling-machine-2"
   2.009 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "assembling-machine", name: "assembling-machine-3"
   2.010 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "assembling-machine", name: "oil-refinery"
   2.022 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "assembling-machine", name: "chemical-plant"
   2.039 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "assembling-machine", name: "centrifuge"
   2.091 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "beacon", name: "beacon"
   2.092 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "boiler", name: "boiler"
   2.095 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "boiler", name: "heat-exchanger"
   2.096 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "burner-generator", name: "burner-generator"
   2.097 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "furnace", name: "stone-furnace"
   2.104 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "furnace", name: "electric-furnace"
   2.108 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "furnace", name: "steel-furnace"
   2.115 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "generator", name: "steam-engine"
   2.115 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "generator", name: "steam-turbine"
   2.115 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "generator", name: "steam-engine"
   2.115 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "generator", name: "steam-turbine"
   2.116 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "lab", name: "lab"
   2.116 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "mining-drill", name: "electric-mining-drill"
   2.139 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "mining-drill", name: "burner-mining-drill"
   2.140 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "mining-drill", name: "pumpjack"
   2.140 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "reactor", name: "nuclear-reactor"
   2.140 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "roboport", name: "roboport"
   2.141 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "storage-tank", name: "storage-tank"
   2.141 Script @__NOverhang__/data-final-fixes.lua:13: Processing type: "storage-tank", name: "fluid-memory-unit"
   2.228 Checksum for core: 607699937
   2.228 Checksum of base: 1054619811
   2.228 Checksum of NOverhang: 2534341128
   2.228 Checksum of fluid-memory-storage: 678526299
   2.354 Error ModManager.cpp:1625: Error while loading entity prototype "fluid-memory-unit" (storage-tank): Key "filename" not found in property tree at ROOT.storage-tank.fluid-memory-unit.pictures.window_background
Modifications: Fluid Memory Storage › No Overhang
   2.543 Initial atlas bitmap size is 16384
   2.543 Created atlas bitmap 2048x784 [icon, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level]
   2.548 Texture processor created (2048). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
   2.587 Parallel Sprite Loader initialized (threads: 11)
   2.737 Sprites loaded
   2.756 Generated mipmaps (5) for atlas [0] of size 2048x784   
   2.756 Custom mipmaps uploaded (99)
   2.759 Factorio initialised
   6.520 Quitting: user-quit.
   6.664 Steam API shutdown.
   6.666 Goodbye
Atria1234 commented 2 months ago

The issue seems to be caused by weird behaviour how Factorio serializes references to same table. I'm contacting author of fluid memory storage mod, because it can be worked around in his mod: https://mods.factorio.com/mod/fluid-memory-storage/discussion/66ae0f51ecee9cd32639af6b

Unfortunately there is nothing I can do, except suggestion turning off overhang for storage tanks in mod settings.

shpaass commented 2 months ago

Thank you very much! You're awesome. Loading only Noverhang first, adding fluid-memory-unit in storage-tank exceptions, and then loading everything else fixed the issue.

notnotmelon commented 2 months ago

Thanks for the suggestion. I will implement this fix.