The Ruins Mod 2.0 deprecated


This mod is now deprecated and merged with `AbandonedRuins_updated_fork`.

Content
a month ago
2.0
3.15K
Environment

b [FIXED] LuaPrototypes doesn't contain key splitter.

6 months ago
(updated 6 months ago)

Factorio:SA 2.0.32
Modded Game.

Crash with your mod at different situations:

The mod The Ruins Mod 2.0 (1.1.10) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event AbandonedRuins20::on_tick (ID 0)
LuaPrototypes doesn't contain key splitter.
stack traceback:
[C]: in function 'index'
__AbandonedRuins20
/lua/expression_parsing.lua:49: in function '?'
AbandonedRuins20/lua/expression_parsing.lua:77: in function 'entity'
AbandonedRuins20/lua/spawning.lua:134: in function 'parse_variables'
AbandonedRuins20/lua/spawning.lua:171: in function 'spawn_ruin'
AbandonedRuins20/lua/spawning.lua:184: in function 'spawn_random_ruin'
AbandonedRuins20/control.lua:58: in function <AbandonedRuins20/control.lua:53>

6 months ago

There is a recipe or an item with name (not type) splitter, but no type="splitter" exists. You can look this up for yourself, if you wish to check it out by search for "splitter". So I need to look on how to fix this, maybe reduce the searched prototypes only on type="item"? But the code here says entity_type.

6 months ago

I was just troubleshooting a similar crash caused by mods.factorio.com/mod/AbandonedRuins-ruinsnova not having proper dependencies causing mods.factorio.com/mod/AbandonedRuins_updated_fork to crash. items inside containers don't have error protection from bad ruins blueprints.
to fix this, in spawning.lua , change

if extra_options.items then
local items = {}
for name, count_expression in pairs(extra_options.items) do
local count = expressions.number(count_expression, vars)
if count > 0 then
items[name] = count
end
end
util.safe_insert(e, items)
end
end

to

if extra_options.items then
local items = {}
for name, count_expression in pairs(extra_options.items) do
if not prototypes[name] then
util.debugprint("item " .. name .. " does not exist")
return
end
local count = expressions.number(count_expression, vars)
if count > 0 then
items[name] = count
end
end
util.safe_insert(e, items)
end
end

6 months ago
(updated 6 months ago)

I have updated the mod, does this fix for you? Still this more feels like a workaround and it does crash (1.1.10 and prior) here even with a new game.

This thread has been locked.