GDIW - Gah! DarnItWater!


Allows switching liquid recipe inputs and outputs.

Utilities
3 years ago
0.13 - 1.1
44.0K

b Crash on startup with Space Exploration

4 years ago
(updated 4 years ago)

Hey there seems to be an incompatibility with Space Exploration. Got this on startup, just GDIW and SE with the minimal required mods.

2.180 Error ModManager.cpp:1319: Failed to load mod "GDIW": GDIW/data-final-fixes.lua:83: attempt to concatenate field 'type' (a nil value)
stack traceback:
GDIW/data-final-fixes.lua:83: in function 'GDIWdoprototype'
GDIW/data-final-fixes.lua:494: in main chunk

4 years ago

same here. need help :)

4 years ago

Same issue here as well.

4 years ago

Same

4 years ago

same

4 years ago

Same, from factorio-current.log:

[...]
  11.942 Loading mod GDIW 0.17.5 (data-final-fixes.lua)
  11.948 Error ModManager.cpp:1323: Failed to load mod "GDIW": __GDIW__/data-final-fixes.lua:83: attempt to concatenate field 'type' (a nil value)
stack traceback:
    __GDIW__/data-final-fixes.lua:83: in function 'GDIWdoprototype'
    __GDIW__/data-final-fixes.lua:494: in main chunk
  11.950 Loading mod core 0.0.0 (data.lua)
  12.115 Checksum for core: 3551490305
  12.195 Error ModManager.cpp:1323: Error in assignID, recipe-category with name 'crafting' does not exist.

Source: default (utility-sprites).
  12.278 Initial atlas bitmap size is 16384
  12.279 Created atlas bitmap 2048x416 [icon, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level]
  12.285 Texture processor created (2048). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
  12.291 Parallel Sprite Loader initialized (threads: 7)
  12.318 Sprites loaded
  12.330 Generated mipmaps (5) for atlas [0] of size 2048x416   
  12.330 Custom mipmaps uploaded.
  12.335 Factorio initialised
  12.340 Mods to disable:Failed to load mods: __GDIW__/data-final-fixes.lua:83: attempt to concatenate field 'type' (a nil value)
stack traceback:
    __GDIW__/data-final-fixes.lua:83: in function 'GDIWdoprototype'
    __GDIW__/data-final-fixes.lua:494: in main chunk

Mods to be disabled:
• GDIW
[...]

I hope this is helpful.

4 years ago

https://i.imgur.com/htnHIpm.png

got same issue here) hope it'll help!

4 years ago

Still here, in case the author thought he fixed it.

78.260 Mods to disable:Failed to load mods: GDIW/data-final-fixes.lua:83: attempt to concatenate field 'type' (a nil value)
stack traceback:
GDIW/data-final-fixes.lua:83: in function 'GDIWdoprototype'
GDIW/data-final-fixes.lua:494: in main chunk

Mods to be disabled:
• GDIW

4 years ago
(updated 4 years ago)

So, I'm not a lua neither a mod programmer, but I found a workaround to use till a proper fix will be deployed by the author.
WARNING: this fix will allow to lunch the game, but I think that it may skill some checks, so strange behaviour are likely to happen.

To deploy the fix you have to edit the file "data-final-fixes.lua" inside the %appdata%/Factorio/mods/GDIW_0.17.5.zip archive (change %appdata% and the mod version according to your system).
Navigate till around line 73 .
You should find

if vro.result then
vrn.localised_name = {"item-name." .. vro.result}
elseif vro.main_product then
if data.raw.fluid[vro.main_product] then
vrn.localised_name = {"fluid-name." .. vro.main_product}
else
vrn.localised_name = {"item-name." .. vro.main_product}
end
elseif vro.results then
if vro.results[1] and vro.results[1].name then
vrn.localised_name = {vro.results[1].type .. "-name." .. vro.results[1].name}
else
--log("--GDIW-----------")
--log("failure on R:" .. vro.name .. " ")
--log(serpent.block(vro.results))
vrn.localised_name = {"recipe-name." .. vro.name}
end
end

substitute the line after "if vro.results[1] and vro.results[1].name then" with the followings

    log("Loading recipe named " .. vro.results[1].name .." ")
    if vro.results[1].type and not vro.results[1].type == nil then
      log("it's a " .. vro.results[1].type .." ")
      vrn.localised_name = {vro.results[1].type .. "-name." .. vro.results[1].name}
    else
      log("it doesn't have a type")
      vrn.localised_name = {vro.results[1].name}
    end

Save, update the archive, lunch the game and cross your fingers

3 years ago
(updated 3 years ago)

0.18.0 still crashing :-(
https://prnt.sc/ug5ych

@jacorem
the workaround still works ;-)

3 years ago

So, I'm not a lua neither a mod programmer, but I found a workaround to use till a proper fix will be deployed by the author.
WARNING: this fix will allow to lunch the game, but I think that it may skill some checks, so strange behaviour are likely to happen.

To deploy the fix you have to edit the file "data-final-fixes.lua" inside the %appdata%/Factorio/mods/GDIW_0.17.5.zip archive (change %appdata% and the mod version according to your system).
Navigate till around line 73 .
You should find

if vro.result then
vrn.localised_name = {"item-name." .. vro.result}
elseif vro.main_product then
if data.raw.fluid[vro.main_product] then
vrn.localised_name = {"fluid-name." .. vro.main_product}
else
vrn.localised_name = {"item-name." .. vro.main_product}
end
elseif vro.results then
if vro.results[1] and vro.results[1].name then
vrn.localised_name = {vro.results[1].type .. "-name." .. vro.results[1].name}
else
--log("--GDIW-----------")
--log("failure on R:" .. vro.name .. " ")
--log(serpent.block(vro.results))
vrn.localised_name = {"recipe-name." .. vro.name}
end
end

substitute the line after "if vro.results[1] and vro.results[1].name then" with the followings

  log("Loading recipe named " .. vro.results[1].name .." ")
  if vro.results[1].type and not vro.results[1].type == nil then
    log("it's a " .. vro.results[1].type .." ")
    vrn.localised_name = {vro.results[1].type .. "-name." .. vro.results[1].name}
  else
    log("it doesn't have a type")
    vrn.localised_name = {vro.results[1].name}
  end

Save, update the archive, lunch the game and cross your fingers

Thanks for sharing the fix! Have no experience with modding either, but got some regular programming knowledge and the fix makes sense. Though have no clue where those variables come from. xD

3 years ago
(updated 3 years ago)

Should I create a new mod with the fix? this would require a change also with blueprint extension, but for this i have already a patch published.
I actually have enough other construction sites, but if it is desired I would do it :-)

3 years ago

I actually use Fluid Permutations now since you recommended it. Work like a charm in SEK2 for us (2 Player MP). So i personally don't see a need for it.
For those interested: https://mods.factorio.com/mod/fluid_permutations

3 years ago

@Der_Failer
I have started to integrate Fluid Permutations in my Blueprint Extensions. so it can be used for mirroring.

3 years ago

In the latest 1.1.0 release, I have put in some extra handling (based off the above code) so HOPEFULLY mods which do wonky things with the results list wont cause my mod to implode.

This thread has been locked.