The Ruins Mod 2.0


This mod is based on 1.1.6 (abondoned mod?) and contains many fixes for Factorio 2.0. The Ruins Mod adds randomly spawns ruins in the world. These ruins are destroyed fragments of bases, forts, small oases, and more. Explore them for loot, adventure, or entertainment, but beware, some still have running defenses from the last player that landed on the planet, with more successful colonies having better defenses.

Content
3 days ago
2.0
1.75K
Environment

b [FIXED] expression_parsing.lua:49: bad argument #2 of 3 to 'index' (string expected, got nil)

2 months ago

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

Error while running event AbandonedRuins20::on_tick (ID 0)
AbandonedRuins20/lua/expression_parsing.lua:49: bad argument #2 of 3 to 'index' (string expected, got nil)
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:24: in function 'spawn_entity'
AbandonedRuins20/lua/spawning.lua:94: in function 'spawn_entities'
AbandonedRuins20/lua/spawning.lua:172: in function 'spawn_ruin'
AbandonedRuins20/lua/spawning.lua:184: in function 'spawn_random_ruin'
AbandonedRuins20/control.lua:58: in function <AbandonedRuins20/control.lua:53>

2 months ago

1.1.10 is up, I guess I have to ignore first part (mostly key or index) from pairs() function?

2 months ago

ty

2 months ago
(updated 2 months ago)

Here some new crash
This one seems to be a repeat of https://mods.factorio.com/mod/AbandonedRuins20/discussion/67a7781679ab9cd57eb83e5a

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 tree.
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>

2 months ago

Sorry, I don't know how to fix it. The old code used a function game.get_filtered_entity_prototypes() but that is no longer available and I currently don't know how to replace it. Have to go to work.

2 months ago

Oh this issue seems to be trying to generate the old tree Entity and mentioned in the error LuaPrototypes doesn't contain key tree. i think that would be one of the issues.

a month ago

I have updated this mod to 1.1.11, does this fix it for you? You might see some (more?) debug messages. The fix actually more feels like a workaround: https://mods.factorio.com/mod/AbandonedRuins20/discussion/67ab8a4cd76ea0b3a7b6b750

a month ago
(updated a month ago)

Sorry, I don't know how to fix it. The old code used a function game.get_filtered_entity_prototypes() but that is no longer available and I currently don't know how to replace it. Have to go to work.

That function was replaced with:
https://lua-api.factorio.com/stable/classes/LuaPrototypes.html#get_entity_filtered
so: prototypes.get_entity_filtered()

a month ago

249.557 Error MainLoop.cpp:1435: Exception at tick 1: Мод The Ruins Mod 2.0 (1.1.11) вызвал неустранимую ошибку.
Пожалуйста, сообщите об этой ошибке автору мода.

Error while running event AbandonedRuins20::on_tick (ID 0)
LuaPrototypes doesn't contain key tree.
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:138: in function 'parse_variables'
AbandonedRuins20/lua/spawning.lua:175: in function 'spawn_ruin'
AbandonedRuins20/lua/spawning.lua:188: in function 'spawn_random_ruin'
AbandonedRuins20/control.lua:58: in function <AbandonedRuins20/control.lua:53>
278.883 Info AppManager.cpp:342: Deleting active scenario.

a month ago
(updated a month ago)

Sorry, I don't know how to fix it. The old code used a function game.get_filtered_entity_prototypes() but that is no longer available and I currently don't know how to replace it. Have to go to work.

That function was replaced with:
https://lua-api.factorio.com/stable/classes/LuaPrototypes.html#get_entity_filtered
so: prototypes.get_entity_filtered()

Ah, thank you! So do I need to replace the code recommended by @Samael25 in `lua/express_parsing.lua?

a month ago

249.557 Error MainLoop.cpp:1435: Exception at tick 1: Мод The Ruins Mod 2.0 (1.1.11) вызвал неустранимую ошибку.
Пожалуйста, сообщите об этой ошибке автору мода.

Error while running event AbandonedRuins20::on_tick (ID 0)
LuaPrototypes doesn't contain key tree.
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:138: in function 'parse_variables'
AbandonedRuins20/lua/spawning.lua:175: in function 'spawn_ruin'
AbandonedRuins20/lua/spawning.lua:188: in function 'spawn_random_ruin'
AbandonedRuins20/control.lua:58: in function <AbandonedRuins20/control.lua:53>
278.883 Info AppManager.cpp:342: Deleting active scenario.

That is a duplicate.

a month ago
(updated a month ago)

Sorry, I don't know how to fix it. The old code used a function game.get_filtered_entity_prototypes() but that is no longer available and I currently don't know how to replace it. Have to go to work.

That function was replaced with:
https://lua-api.factorio.com/stable/classes/LuaPrototypes.html#get_entity_filtered
so: prototypes.get_entity_filtered()

Ah, thank you! So do I need to replace the code recommended by @Samael25 in `lua/express_parsing.lua?

I don't know what are you referring to about Samael. But in the file you stated replace line 49 with
for entity in pairs(prototypes.get_entity_filtered({{filter = "type", type = t.entity_type}})) do
which is the line you commented out 1 line above but with replaced function

a month ago

I don't know what are you referring to about Samael. But in the file you stated replace line 49 with
for entity in pairs(prototypes.get_entity_filtered({{filter = "type", type = t.entity_type}})) do
which is the line you commented out 1 line above but with replaced function

I mean the code in lua/spawning.lua, line 26-29.

a month ago

1.1.12 is up now.

a month ago

I mean the code in lua/spawning.lua, line 26-29.

I think you mean line 75-78
That one is supposed to be a sanity check for items in ruin sets that don't exist. It probably doesn't actually work because it seems to check against the list of entities instead of the list of items. Also it might not be needed since the insert function used later is handling that anyways by just skipping over said item

a month ago

Yes, that is an identical line, written by original author.

This thread has been locked.