Sea Block


No ore patches, expand from a small island. Also install the 'Sea Block Pack - Official' mod for a complete modpack

Overhaul
9 months ago
0.14 - 1.1
97.6K

g [Fixed]Seablock currently incompatible with Factorio v1.0

4 years ago

Hello. Bad news, I'm afraid; Seablock (0.4.6) is currently incompatible with the shiny new Factorio v1.0.

Error is as follows:

Error ModManager.cpp:1514: Failed to load mod "SeaBlock": SeaBlock/data-final-fixes.lua:38: attempt to index local 'recipe' (a nil value)
stack traceback:
SeaBlock/data-final-fixes.lua:38: in function 'func'
SeaBlock/lib.lua:50: in function 'iteraterecipes'
SeaBlock/data-final-fixes.lua:49: in main chunk

Hope it's an easy fix.

4 years ago

This requires two fixes, both of which are derived from this answer: https://mods.factorio.com/mod/CircuitProcessing/discussion/5f3688a73b315081c5cd6d11

in data-fixes-final.lua, starting at line 225 reads:
if r.normal then
iset = {r.normal.ingredients, r.expensive.ingredients}
else
iset = {r.ingredients}
end

Needs to be changed to something like:
iset = {}
if r.normal then
table.insert(iset, r.normal.ingredients)
end
if r.expensive then
table.insert(iset, r.expensive.ingredients)
end
if not (r.normal or r.expensive) then
table.insert(iset, r.ingredients)
end

Then, lib.lua, starting at line 48 reads:
if recipe.normal then
func(recipe.normal)
func(recipe.expensive)
else
func(recipe)
end

Needs to be changed to something like:
if recipe.normal then
func(recipe.normal)
end
if recipe.expensive then
func(recipe.expensive)
end
if not (recipe.normal or recipe.expensive) then
func(recipe)
end

If you're using Circuit Processing, you'll have to apply the linked fix as well.

(I'm a bit of a Lua novice, so take it with a grain of salt)

4 years ago

I have got my game to load by 2 small edits:

lib.lua:

replace

lib.iteraterecipes = function(recipe, func)
if recipe.normal then
func(recipe.normal)
func(recipe.expensive)
else
func(recipe)
end
end

with

lib.iteraterecipes = function(recipe, func)
if recipe.normal then
func(recipe.normal)
end
if recipe.expensive then
func(recipe.expensive)
end
if not (recipe.normal or recipe.expensive) then
func(recipe)
end
end

data-final-fixes.lua:

replace

if r.normal then
iset = {r.normal.ingredients, r.expensive.ingredients}
else
iset = {r.ingredients}
end

with

if r.normal then
iset = {r.normal.ingredients}
end
if r.expensive then
iset = {r.expensive.ingredients}
end
if not (r.normal or r.expensive) then
iset = {r.ingredients}
end

hope this works for you too

4 years ago

Tivrusky, your suggested edits seem to work! Thanks very much. Now to check out the new, shiny Factorio 1.0.

4 years ago
(updated 4 years ago)

Tivrusky, your version is slightly risky because it results in the normal ingredient list not being checked for impossibilities when the expensive ingredient list exists. It's unlikely to cause any problems (because if the normal ingredient list is impossible the expensive ingredient list probably is too); nonetheless it isn't quite the right check.

4 years ago

Do anybody knows when there will be an official update for SeaBlock?

4 years ago

Tivrusky, your version is slightly risky because it results in the normal ingredient list not being checked for impossibilities when the expensive ingredient list exists. It's unlikely to cause any problems (because if the normal ingredient list is impossible the expensive ingredient list probably is too); nonetheless it isn't quite the right check.

Do you mean something like this by the right check?

if r.normal then
  table.insert(iset, r.normal.ingredients)
end
if r.expensive then
  table.insert(iset, r.expensive.ingredients)
end
if not (r.normal or r.expensive) then
  iset = {r.ingredients}
end
4 years ago

Yes, like that.

4 years ago

Unfortunatly the following error still pops up for Factorio v1.0:

Failed to load mods: SeaBlock/data-updates.lua:696: attempt to index field '?' (a nil value)
stack traceback:
SeaBlock/data-updates.lua:696: in main chunk

4 years ago

Unfortunatly the following error still pops up for Factorio v1.0:

Failed to load mods: SeaBlock/data-updates.lua:696: attempt to index field '?' (a nil value)
stack traceback:
SeaBlock/data-updates.lua:696: in main chunk

Did you apply both the fix to lib.lua and the fix to data-final-fixes.lua?

4 years ago

Unfortunatly the following error still pops up for Factorio v1.0:

Failed to load mods: SeaBlock/data-updates.lua:696: attempt to index field '?' (a nil value)
stack traceback:
SeaBlock/data-updates.lua:696: in main chunk

Got the same error message

4 years ago

Unfortunatly the following error still pops up for Factorio v1.0:

Failed to load mods: SeaBlock/data-updates.lua:696: attempt to index field '?' (a nil value)
stack traceback:
SeaBlock/data-updates.lua:696: in main chunk

Got the same error message

installing "Bob's Metals, Chemicals and Intermediates" fixed this error

4 years ago

Unfortunatly the following error still pops up for Factorio v1.0:

Failed to load mods: SeaBlock/data-updates.lua:696: attempt to index field '?' (a nil value)
stack traceback:
SeaBlock/data-updates.lua:696: in main chunk

Got the same error message

installing "Bob's Metals, Chemicals and Intermediates" fixed this error

worked - thanks! :D

New response